CVE-2024-49889

Source
https://nvd.nist.gov/vuln/detail/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
2025-11-28T02:35:24.561800Z
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
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49889.json"
}
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
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
b0cb4561fc4284d04e69c8a66c8504928ab2484e
Fixed
4999fed877bb64e3e7f9ab9996de2ca983c41928
Fixed
2eba3b0cc5b8de624918d21f32b5b8db59a90b39
Fixed
34b2096380ba475771971a778a478661a791aa15
Fixed
8b114f2cc7dd5d36729d040b68432fbd0f0a8868
Fixed
d483c7cc1796bd6a80e7b3a8fd494996260f6b67
Fixed
4e2524ba2ca5f54bdbb9e5153bea00421ef653f5

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.227
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.168
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.113
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.55
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.10.14
Type
ECOSYSTEM
Events
Introduced
6.11.0
Fixed
6.11.3