{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50300","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-09-15T14:18:36.812Z","datePublished":"2025-09-15T14:45:55.896Z","dateUpdated":"2026-08-05T08:58:04.535Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T08:58:04.535Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix extent map use-after-free when handling missing device in read_one_chunk\n\nStore the error code before freeing the extent_map. Though it's\nreference counted structure, in that function it's the first and last\nallocation so this would lead to a potential use-after-free.\n\nThe error can happen eg. when chunk is stored on a missing device and\nthe degraded mount option is missing.\n\nBugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216721"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path runs only during btrfs mount (open_ctree → btrfs_read_sys_array/btrfs_read_chunk_tree → read_one_chunk), reached via a local mount of a crafted or incomplete multi-device image, not via network packet processing.\nAC:L - An attacker can reliably trigger the UAF by supplying a filesystem whose chunk stripe references a missing device and ensuring mount without the non-default degraded option; the freshly allocated extent_map always has refcount 1 so free_extent_map unconditionally frees map before the PTR_ERR read.\nPR:N - btrfs lacks FS_USERNS_MOUNT so the attacker need not hold privileges on the victim host; crafting and delivering a malicious image (USB, download, shared disk) is sufficient, matching other mount-time filesystem UAF scores.\nUI:R - Exploitation requires a user or administrator to mount the attacker-controlled btrfs image, which is the necessary interaction that enters open_ctree and reaches read_one_chunk.\nS:U - Impact is confined to kernel memory in the host's btrfs mount path; this is standard kernel memory corruption without crossing a VM, IOMMU, or other security authority boundary.\nC:H - This is a genuine use-after-free of the kmalloc'd map_lookup and extent_map objects; per CVSS kernel guidance a UAF enables reclaim and disclosure of freed object contents for arbitrary kernel memory read.\nI:H - Use-after-free of heap objects during mount enables heap grooming and write/control-flow primitives once the freed map_lookup/extent_map slabs are reused, so integrity impact is High.\nA:H - The UAF on freed map_lookup memory can cause kernel oops/panic (including via inconsistent mount continuation if a reused object yields a misleading return code), so availability impact is High."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/volumes.c"],"versions":[{"version":"adfb69af7d8cb6a3958f75aad1ef4bc96891d116","lessThan":"b8e7ed42bc3ca0d0e4191ee394d34962d3624c22","status":"affected","versionType":"git"},{"version":"adfb69af7d8cb6a3958f75aad1ef4bc96891d116","lessThan":"fce3713197ebba239e1c7e02174ed216ea1ee014","status":"affected","versionType":"git"},{"version":"adfb69af7d8cb6a3958f75aad1ef4bc96891d116","lessThan":"169a4cf46882974d4db6d85eb623ec898e51bbc0","status":"affected","versionType":"git"},{"version":"adfb69af7d8cb6a3958f75aad1ef4bc96891d116","lessThan":"1742e1c90c3da344f3bb9b1f1309b3f47482756a","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/volumes.c"],"versions":[{"version":"4.15","status":"affected"},{"version":"0","lessThan":"4.15","status":"unaffected","versionType":"semver"},{"version":"5.15.87","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.0.18","lessThanOrEqual":"6.0.*","status":"unaffected","versionType":"semver"},{"version":"6.1.4","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.15","versionEndExcluding":"5.15.87"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.15","versionEndExcluding":"6.0.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.15","versionEndExcluding":"6.1.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.15","versionEndExcluding":"6.2"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/b8e7ed42bc3ca0d0e4191ee394d34962d3624c22"},{"url":"https://git.kernel.org/stable/c/fce3713197ebba239e1c7e02174ed216ea1ee014"},{"url":"https://git.kernel.org/stable/c/169a4cf46882974d4db6d85eb623ec898e51bbc0"},{"url":"https://git.kernel.org/stable/c/1742e1c90c3da344f3bb9b1f1309b3f47482756a"}],"title":"btrfs: fix extent map use-after-free when handling missing device in read_one_chunk","x_generator":{"engine":"bippy-1.2.0"}}}}