CVE-2024-49889

Source
https://cve.org/CVERecord?id=CVE-2024-49889
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-49889.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-49889
Downstream
Related
Published
2024-10-21T18:01:24.941Z
Modified
2026-03-20T12:39:28.696796Z
Summary
ext4: avoid use-after-free in ext4_ext_show_leaf()
Details

In the Linux kernel, the following vulnerability has been resolved:

ext4: avoid use-after-free in ext4extshow_leaf()

In ext4findextent(), path may be freed by error or be reallocated, so using a previously saved *ppath may have been freed and thus may trigger use-after-free, as follows:

ext4splitextent path = *ppath; ext4splitextentat(ppath) path = ext4findextent(ppath) ext4splitextentat(ppath) // ext4findextent fails to free path // but zeroout succeeds ext4extshowleaf(inode, path) eh = path[depth].phdr // path use-after-free !!!

Similar to ext4splitextentat(), we use *ppath directly as an input to ext4extshowleaf(). Fix a spelling error by the way.

Same problem in ext4exthandleunwrittenextents(). Since 'path' is only used in ext4extshow_leaf(), remove 'path' and use *ppath directly.

This issue is triggered only when EXT_DEBUG is defined and therefore does not affect functionality.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49889.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / 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"