Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C8CB3C5837 for ; Sat, 22 Aug 2026 15:41:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787413267; cv=none; b=FoUci6chn3h6DMw22dWfRWIyYAhw97enN+jTRfPeGutxfXa6ZR3Lr13p3339XKZEgIeHz0YsfzETyJKXsA3RqA3IQ6AfGJvI8MMcr8I0d5YgLM9EUYTbGXfcJ5EQmZu4jQdhYeuuN4RFpG/T6uCM4r2Y7hmj954fKMueJ7Le9MY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787413267; c=relaxed/simple; bh=b+0ynw8cdJ9o4CiQXy+5FmEHPol/IxloA4EddQYNSY0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RZ0P2PWjj/VYBKuGJ8CZFt16BSJe+iiJWYVACOB17UARuq/vmXo9D9E2cIYZrjsA+s1LR2upbZlN3CCNq65eJ+qxlll73QRa5ce2XOnnWrwDxvsijW0dgNm1e+CU/+uEoR2ospDAVaaUOdiXC2ZDX0oIdcqk6/cUYb/yiEDkmyg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GXcXOTMp; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GXcXOTMp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 519721F000E9; Sat, 22 Aug 2026 15:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787413264; bh=nWfjktowzR2D55pOdCxB6WE1fPNYn0X3LGornFk264E=; h=From:To:Cc:Subject:Date:Reply-To; b=GXcXOTMpRztgsHLPwDj6fEaif1oCGnLc9Mxo6zmCcGiP8hscTc+ftkK7ytyCft7lY A2OysBsXYJng6lZnv88lHNEfa6Cl5QF3byKk9DlpNMz/PEtvBZKmDzUl7lNRo97MQ9 dApYFwHRxKj48/SG7AmC9f0eXfUYX/BpN0D+fAVs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-74722: btrfs: fix memory leak in btrfs_do_encoded_write() Date: Sat, 22 Aug 2026 17:33:26 +0200 Message-ID: <2026082240-CVE-2026-74722-c4c2@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5739; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=S+Sx9hUEL7QqtSB+N79PxphW9zVWY7C6vVOq8W+Wupc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFmdB+54/3SLWRzctelH0QMfgfD1fX9l2J2nKMka77Vrc fP2e/a2I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZy8D/Dgh0HP+bMb5p1YNnJ N6oXFA84HovvmsowP67Ne27eqsKNqwIDL0gXycTksAUYAQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: btrfs: fix memory leak in btrfs_do_encoded_write() Local fuzzing of 6.12.94 has found the following memory leak: Unreferenced object 0xffff888018050a80 (size 64): comm "syz.0.17", pid 10297, jiffies 4294953601 hex dump (first 32 bytes): 00 10 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................ 10 0a 05 18 80 88 ff ff 10 0a 05 18 80 88 ff ff ................ backtrace (crc a8a6fc29): kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline] slab_post_alloc_hook mm/slub.c:4152 [inline] slab_alloc_node mm/slub.c:4197 [inline] __kmalloc_cache_noprof+0x168/0x2c0 mm/slub.c:4358 kmalloc_noprof include/linux/slab.h:878 [inline] extent_changeset_alloc fs/btrfs/extent_io.h:207 [inline] qgroup_reserve_data+0x1c5/0x7d0 fs/btrfs/qgroup.c:4305 btrfs_qgroup_reserve_data+0x2e/0xb0 fs/btrfs/qgroup.c:4355 btrfs_do_encoded_write+0x92e/0x1040 fs/btrfs/inode.c:9746 btrfs_encoded_write fs/btrfs/file.c:1482 [inline] btrfs_do_write_iter+0x280/0x610 fs/btrfs/file.c:1507 btrfs_ioctl_encoded_write+0x3d6/0x490 fs/btrfs/ioctl.c:4738 btrfs_ioctl+0x6f9/0xc90 fs/btrfs/ioctl.c:-1 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0xbe/0x1a0 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x77/0x7f Unreferenced object 0xffff888018050a00 (size 64): comm "syz.0.17", pid 10297, jiffies 4294953601 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 ff 0f 00 00 00 00 00 00 ................ 90 0a 05 18 80 88 ff ff 90 0a 05 18 80 88 ff ff ................ backtrace (crc cb5c9580): kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline] slab_post_alloc_hook mm/slub.c:4152 [inline] slab_alloc_node mm/slub.c:4197 [inline] __kmalloc_cache_noprof+0x168/0x2c0 mm/slub.c:4358 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] ulist_prealloc+0x9c/0x110 fs/btrfs/ulist.c:114 extent_changeset_prealloc fs/btrfs/extent_io.h:217 [inline] __set_extent_bit+0x16b/0x1a70 fs/btrfs/extent-io-tree.c:1086 set_record_extent_bits+0x50/0x90 fs/btrfs/extent-io-tree.c:1821 qgroup_reserve_data+0x274/0x7d0 fs/btrfs/qgroup.c:4312 btrfs_qgroup_reserve_data+0x2e/0xb0 fs/btrfs/qgroup.c:4355 btrfs_do_encoded_write+0x92e/0x1040 fs/btrfs/inode.c:9746 btrfs_encoded_write fs/btrfs/file.c:1482 [inline] btrfs_do_write_iter+0x280/0x610 fs/btrfs/file.c:1507 btrfs_ioctl_encoded_write+0x3d6/0x490 fs/btrfs/ioctl.c:4738 btrfs_ioctl+0x6f9/0xc90 fs/btrfs/ioctl.c:-1 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0xbe/0x1a0 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fix this by freeing an extent changeset before returning from btrfs_do_encoded_write(). The Linux kernel CVE team has assigned CVE-2026-74722 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22 and fixed in 6.1.183 with commit 0f0da96ccb1b9f35f4d3d4540dcaab0969d9d6b0 Issue introduced in 5.18 with commit 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22 and fixed in 6.6.152 with commit e2c7e88815edd5ecfb88e7660ab9fd42bda6bc47 Issue introduced in 5.18 with commit 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22 and fixed in 6.12.104 with commit 20c0eeb4313f9f89d47b80b672b5846f9827cb31 Issue introduced in 5.18 with commit 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22 and fixed in 6.18.45 with commit 24a8f2c29aebb753ccb962fbb25bae18d7978f6e Issue introduced in 5.18 with commit 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22 and fixed in 7.1.9 with commit 60b50ceba6243802f8d2c0a9a7c2d549a93b1d64 Issue introduced in 5.18 with commit 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22 and fixed in 7.2 with commit d2a4e4e626b2f4670b69b430c357f03f53eb6632 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-74722 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/btrfs/inode.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/0f0da96ccb1b9f35f4d3d4540dcaab0969d9d6b0 https://git.kernel.org/stable/c/e2c7e88815edd5ecfb88e7660ab9fd42bda6bc47 https://git.kernel.org/stable/c/20c0eeb4313f9f89d47b80b672b5846f9827cb31 https://git.kernel.org/stable/c/24a8f2c29aebb753ccb962fbb25bae18d7978f6e https://git.kernel.org/stable/c/60b50ceba6243802f8d2c0a9a7c2d549a93b1d64 https://git.kernel.org/stable/c/d2a4e4e626b2f4670b69b430c357f03f53eb6632