{"id":"CVE-2026-68442","state":"PUBLISHED","title":"btrfs: don't propagate EXTENT_FLAG_LOGGING to split extent maps","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: don't propagate EXTENT_FLAG_LOGGING to split extent maps\n\nWhen btrfs_drop_extent_map_range() splits an extent map, the new split\nmaps inherit the original map's flags through a local 'flags' variable.\nCommit f86f7a75e2fb (\"btrfs: use the flags of an extent map to identify\nthe compression type\") changed the EXTENT_FLAG_LOGGING clearing to\noperate on em->flags instead of that local 'flags' copy, so a split of\nan extent map that is currently being logged wrongly inherits\nEXTENT_FLAG_LOGGING.\n\nThe flag is then never cleared on the split, and when it is freed while\nstill on the inode's modified_extents list (for example by the extent\nmap shrinker) it trips the WARN_ON(!list_empty(&em->list)) in\nbtrfs_free_extent_map() and leads to a use-after-free.\n\nClear EXTENT_FLAG_LOGGING from the local 'flags' copy used for the\nsplits and only clear EXTENT_FLAG_PINNED from em->flags, restoring the\nbehaviour prior to f86f7a75e2fb.","publishedAt":"2026-08-12T00:07:31.981Z","updatedAt":"2026-10-19T21:09:10.486Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9","status":"affected","lessThan":"2a9246a424f45f33a1b8367052611ebe874868ad","versionType":"git"},{"version":"f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9","status":"affected","lessThan":"9304713b70e7e1450e3a76e758836fe5391bfa95","versionType":"git"},{"version":"f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9","status":"affected","lessThan":"0e465c63f103a5ce6849614d6bda048d70eebec8","versionType":"git"},{"version":"f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9","status":"affected","lessThan":"5eff4d5b17fa1950e80bfd1ba43dc0699e61a644","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/extent_map.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/extent_map.c"]}],"references":["https://git.kernel.org/stable/c/2a9246a424f45f33a1b8367052611ebe874868ad","https://git.kernel.org/stable/c/9304713b70e7e1450e3a76e758836fe5391bfa95","https://git.kernel.org/stable/c/0e465c63f103a5ce6849614d6bda048d70eebec8","https://git.kernel.org/stable/c/5eff4d5b17fa1950e80bfd1ba43dc0699e61a644"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/68xxx/CVE-2026-68442.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-68442","state":"PUBLISHED","datePublished":"2026-08-12T00:07:31.981Z","dateUpdated":"2026-10-19T21:09:10.486Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-30T09:28:09.394Z"},"containers":{"cna":{"title":"btrfs: don't propagate EXTENT_FLAG_LOGGING to split extent maps","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: don't propagate EXTENT_FLAG_LOGGING to split extent maps\n\nWhen btrfs_drop_extent_map_range() splits an extent map, the new split\nmaps inherit the original map's flags through a local 'flags' variable.\nCommit f86f7a75e2fb (\"btrfs: use the flags of an extent map to identify\nthe compression type\") changed the EXTENT_FLAG_LOGGING clearing to\noperate on em->flags instead of that local 'flags' copy, so a split of\nan extent map that is currently being logged wrongly inherits\nEXTENT_FLAG_LOGGING.\n\nThe flag is then never cleared on the split, and when it is freed while\nstill on the inode's modified_extents list (for example by the extent\nmap shrinker) it trips the WARN_ON(!list_empty(&em->list)) in\nbtrfs_free_extent_map() and leads to a use-after-free.\n\nClear EXTENT_FLAG_LOGGING from the local 'flags' copy used for the\nsplits and only clear EXTENT_FLAG_PINNED from em->flags, restoring the\nbehaviour prior to f86f7a75e2fb."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9","status":"affected","lessThan":"2a9246a424f45f33a1b8367052611ebe874868ad","versionType":"git"},{"version":"f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9","status":"affected","lessThan":"9304713b70e7e1450e3a76e758836fe5391bfa95","versionType":"git"},{"version":"f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9","status":"affected","lessThan":"0e465c63f103a5ce6849614d6bda048d70eebec8","versionType":"git"},{"version":"f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9","status":"affected","lessThan":"5eff4d5b17fa1950e80bfd1ba43dc0699e61a644","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/extent_map.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/extent_map.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/2a9246a424f45f33a1b8367052611ebe874868ad"},{"url":"https://git.kernel.org/stable/c/9304713b70e7e1450e3a76e758836fe5391bfa95"},{"url":"https://git.kernel.org/stable/c/0e465c63f103a5ce6849614d6bda048d70eebec8"},{"url":"https://git.kernel.org/stable/c/5eff4d5b17fa1950e80bfd1ba43dc0699e61a644"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is in the btrfs in-memory extent map code, reached only through local file operations (write/writeback, fallocate punch hole, truncate, clone, fsync) on a btrfs filesystem; no remote protocol data is involved.\nAC:L - Although the flag is only mis-propagated while an fsync has an extent map flagged for logging, the attacker controls both sides of the race - one thread loops fsync() while another loops writes/punch-hole on the same file - and the resulting bogus map is then freed deterministically by any later drop of that range.\nPR:L - Any unprivileged local user who can create and write a file on a btrfs filesystem (btrfs is the default root fs on several major distros, and /tmp or a home directory suffices) can drive the splitting and logging paths; no capabilities are required.\nUI:N - The attacker performs all the required operations itself (write, punch hole, fsync on its own file); no victim action or administrator involvement is needed.\nS:U - The corruption is confined to kernel memory within the same security authority; there is no crossing of a VM, IOMMU, or other boundary.\nC:H - The freed extent_map stays linked in the inode's modified_extents list, so later traversal in btrfs_log_changed_extents() dereferences freed slab memory; an attacker who reallocates the object controls what is read back, giving a use-after-free read primitive usable to disclose kernel memory.\nI:H - The dangling list node is written through by list_del_init()/list_add_tail() during fsync, writing attacker-influenced pointers into and from a freed heap object; such list-corruption use-after-frees are the classic basis for arbitrary write and privilege escalation.\nA:H - The bug already trips WARN_ON(!list_empty(&em->list)) and then operates on freed memory, causing list corruption and an oops or panic (immediately fatal with panic_on_warn or list debugging enabled), which an unprivileged user can trigger repeatedly."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-17T05:05:39.676Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.12.101"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.18.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"7.1.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-68442","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:48:58.466646Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T21:09:10.486Z"}}]}}}