{"id":"CVE-2024-49889","summary":"ext4: avoid use-after-free in ext4_ext_show_leaf()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: avoid use-after-free in ext4_ext_show_leaf()\n\nIn ext4_find_extent(), path may be freed by error or be reallocated, so\nusing a previously saved *ppath may have been freed and thus may trigger\nuse-after-free, as follows:\n\next4_split_extent\n  path = *ppath;\n  ext4_split_extent_at(ppath)\n  path = ext4_find_extent(ppath)\n  ext4_split_extent_at(ppath)\n    // ext4_find_extent fails to free path\n    // but zeroout succeeds\n  ext4_ext_show_leaf(inode, path)\n    eh = path[depth].p_hdr\n    // path use-after-free !!!\n\nSimilar to ext4_split_extent_at(), we use *ppath directly as an input to\next4_ext_show_leaf(). Fix a spelling error by the way.\n\nSame problem in ext4_ext_handle_unwritten_extents(). Since 'path' is only\nused in ext4_ext_show_leaf(), remove 'path' and use *ppath directly.\n\nThis issue is triggered only when EXT_DEBUG is defined and therefore does\nnot affect functionality.","modified":"2026-04-16T00:03:10.397281136Z","published":"2024-10-21T18:01:24.941Z","related":["USN-7276-1","USN-7277-1","openSUSE-SU-2024:14500-1","openSUSE-SU-2025:14705-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49889.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2eba3b0cc5b8de624918d21f32b5b8db59a90b39"},{"type":"WEB","url":"https://git.kernel.org/stable/c/34b2096380ba475771971a778a478661a791aa15"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4999fed877bb64e3e7f9ab9996de2ca983c41928"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4e2524ba2ca5f54bdbb9e5153bea00421ef653f5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8b114f2cc7dd5d36729d040b68432fbd0f0a8868"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b0cb4561fc4284d04e69c8a66c8504928ab2484e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d483c7cc1796bd6a80e7b3a8fd494996260f6b67"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49889.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-49889"},{"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":"dfe5080939ea4686b3414b5d970a9b26733c57a4"},{"fixed":"b0cb4561fc4284d04e69c8a66c8504928ab2484e"},{"fixed":"4999fed877bb64e3e7f9ab9996de2ca983c41928"},{"fixed":"2eba3b0cc5b8de624918d21f32b5b8db59a90b39"},{"fixed":"34b2096380ba475771971a778a478661a791aa15"},{"fixed":"8b114f2cc7dd5d36729d040b68432fbd0f0a8868"},{"fixed":"d483c7cc1796bd6a80e7b3a8fd494996260f6b67"},{"fixed":"4e2524ba2ca5f54bdbb9e5153bea00421ef653f5"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-49889.json"}}],"schema_version":"1.7.5"}