dax/kmem: account for partial discontiguous resource upon removal
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel ef4fc53898bd6c4d0119cc6d419ebef7f2560f31, Kernel 30ea97affbcce236c57287c82dc6ef7a29c63b76, Kernel 598ed7393a639c7547b28ff3e14db9f1ac37c132 and 10 more.
In the Linux kernel, the following vulnerability has been resolved: dax/kmem: account for partial discontiguous resource upon removal When dev_dax_kmem_probe() partially succeeds (at least one range is mapped) but a subsequent range fails request_mem_region() or add_memory_driver_managed(), the probe silently continues, ultimately returning success, but with the corresponding range resource NULL'ed out. dev_dax_kmem_remove() iterates over all dax_device ranges regardless of if the underlying resource exists. When remove_memory() is called later, it returns 0 because the memory was never added which causes dev_dax_kmem_remove() to incorrectly assume the (nonexistent) resource can be removed and attempts cleanup on a NULL pointer. Fix this by skipping these ranges altogether, noting that these cases are considered success, such that the cleanup is still reached when all actually-added ranges are successfully removed.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=60e93dc097f7f13a16a7e4b75b8803eb2adbb721 <ef4fc53898bd6c4d0119cc6d419ebef7f2560f31, >=60e93dc097f7f13a16a7e4b75b8803eb2adbb721 <30ea97affbcce236c57287c82dc6ef7a29c63b76, >=60e93dc097f7f13a16a7e4b75b8803eb2adbb721 <598ed7393a639c7547b28ff3e14db9f1ac37c132, >=60e93dc097f7f13a16a7e4b75b8803eb2adbb721 <5d3139abb9d1671fa5e42c3d6d8cb3b05479c5bb, >=60e93dc097f7f13a16a7e4b75b8803eb2adbb721 <799e54c510a03a65a57627018a817838d72f35bd, >=60e93dc097f7f13a16a7e4b75b8803eb2adbb721 <8aa442cfce79e2d69e72fc8e0c0864ac2971149d, >=60e93dc097f7f13a16a7e4b75b8803eb2adbb721 <d47b0b8a69a13e06afafa54723f3e8c99b0c788f, =5.10 | ef4fc53898bd6c4d0119cc6d419ebef7f2560f31, 30ea97affbcce236c57287c82dc6ef7a29c63b76, 598ed7393a639c7547b28ff3e14db9f1ac37c132, 5d3139abb9d1671fa5e42c3d6d8cb3b05479c5bb, 799e54c510a03a65a57627018a817838d72f35bd, 8aa442cfce79e2d69e72fc8e0c0864ac2971149d, d47b0b8a69a13e06afafa54723f3e8c99b0c788f |
| linux-kernel: Kernel | >=5.16.0 <6.1.178, >=6.13.0 <6.18.40, >=6.19.0 <7.1.5, >=6.2.0 <6.6.145, >=6.7.0 <6.12.97, >=5.10.0 <5.15.212 | 6.1.178, 6.18.40, 7.1.5, 6.6.145, 6.12.97, 5.15.212 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket