CVE-2024-39494: ima: Fix use-after-free on a dentry's dname.name

Description

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

ima: Fix use-after-free on a dentry's dname.name

->d_name.name can change on rename and the earlier value can be freed;
there are conditions sufficient to stabilize it (->d_lock on dentry,
->d_lock on its parent, ->i_rwsem exclusive on the parent's inode,
rename_lock), but none of those are met at any of the sites. Take a stable
snapshot of the name instead.

Classification

CVE ID: CVE-2024-39494

Affected Products

Vendor: Linux

Product: Linux

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.04% (probability of being exploited)

EPSS Percentile: 5.08% (scored less or equal to compared to others)

EPSS Date: 2025-02-04 (when was this score calculated)

References

https://git.kernel.org/stable/c/0b31e28fbd773aefb6164687e0767319b8199829
https://git.kernel.org/stable/c/7fb374981e31c193b1152ed8d3b0a95b671330d4
https://git.kernel.org/stable/c/dd431c3ac1fc34a9268580dd59ad3e3c76b32a8c
https://git.kernel.org/stable/c/a78a6f0da57d058e2009e9958fdcef66f165208c
https://git.kernel.org/stable/c/be84f32bb2c981ca670922e047cdde1488b233de

Timeline