{"id":"CVE-2024-42314","summary":"btrfs: fix extent map use-after-free when adding pages to compressed bio","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix extent map use-after-free when adding pages to compressed bio\n\nAt add_ra_bio_pages() we are accessing the extent map to calculate\n'add_size' after we dropped our reference on the extent map, resulting\nin a use-after-free. Fix this by computing 'add_size' before dropping our\nextent map reference.","modified":"2026-04-02T12:17:56.929272Z","published":"2024-08-17T09:09:23.047Z","related":["MGASA-2024-0309","MGASA-2024-0310","SUSE-SU-2024:3194-1","SUSE-SU-2024:3195-1","SUSE-SU-2024:3383-1","SUSE-SU-2025:20044-1","SUSE-SU-2025:20047-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42314.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/8e7860543a94784d744c7ce34b78a2e11beefa5c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b7859ff398b6b656e1689daa860eb34837b4bb89"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c1cc3326e27b0bd7a2806b40bc48e49afaf951e7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c205565e0f2f439f278a4a94ee97b67ef7b56ae8"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42314.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42314"},{"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":"6a4049102055250256623ab1875fabd89004bff8"},{"fixed":"c1cc3326e27b0bd7a2806b40bc48e49afaf951e7"},{"fixed":"c205565e0f2f439f278a4a94ee97b67ef7b56ae8"},{"fixed":"b7859ff398b6b656e1689daa860eb34837b4bb89"},{"fixed":"8e7860543a94784d744c7ce34b78a2e11beefa5c"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42314.json"}}],"schema_version":"1.7.5"}