{"id":"CVE-2022-50300","summary":"btrfs: fix extent map use-after-free when handling missing device in read_one_chunk","details":"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","modified":"2026-04-02T08:28:23.644138Z","published":"2025-09-15T14:45:55.896Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50300.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/169a4cf46882974d4db6d85eb623ec898e51bbc0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1742e1c90c3da344f3bb9b1f1309b3f47482756a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b8e7ed42bc3ca0d0e4191ee394d34962d3624c22"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fce3713197ebba239e1c7e02174ed216ea1ee014"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50300.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50300"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"adfb69af7d8cb6a3958f75aad1ef4bc96891d116"},{"fixed":"b8e7ed42bc3ca0d0e4191ee394d34962d3624c22"},{"fixed":"fce3713197ebba239e1c7e02174ed216ea1ee014"},{"fixed":"169a4cf46882974d4db6d85eb623ec898e51bbc0"},{"fixed":"1742e1c90c3da344f3bb9b1f1309b3f47482756a"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50300.json"}}],"schema_version":"1.7.5"}