CVE-2024-44952: driver core: Fix uevent_show() vs driver detach race

Published Sep 4, 2024
·
Updated

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

driver core: Fix ueventshow() vs driver detach race

ueventshow() wants to de-reference dev->driver->name. There is no clean way for a device attribute to de-reference dev->driver unless that attribute is defined via (struct devicedriver).devgroups. Instead, the anti-pattern of taking the devicelock() in the attribute handler risks deadlocks with code paths that remove device attributes while holding the lock.

This deadlock is typically invisible to lockdep given the devicelock() is marked lockdepsetnovalidateclass(), but some subsystems allocate a local lockdep key for @dev->mutex to reveal reports of the form:

====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc7+ #275 Tainted: G OE N ------------------------------------------------------ modprobe/2374 is trying to acquire lock: ffff8c2270070de0 (kn->active#6){++++}-{0:0}, at: kernfsremove+0xde/0x220

but task is already holding lock: ffff8c22016e88f8 (&cxlrootkey){+.+.}-{3:3}, at: devicereleasedriverinternal+0x39/0x210

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #1 (&cxlrootkey){+.+.}-{3:3}: mutexlock+0x99/0xc30 ueventshow+0xac/0x130 devattrshow+0x18/0x40 sysfskfseqshow+0xac/0xf0 seqreaditer+0x110/0x450 vfsread+0x25b/0x340 ksysread+0x67/0xf0 dosyscall64+0x75/0x190 entrySYSCALL64afterhwframe+0x76/0x7e

-> #0 (kn->active#6){++++}-{0:0}: lockacquire+0x121a/0x1fa0 lockacquire+0xd6/0x2e0 kernfsdrain+0x1e9/0x200 kernfsremove+0xde/0x220 kernfsremovebynamens+0x5e/0xa0 devicedel+0x168/0x410 deviceunregister+0x13/0x60 devresreleaseall+0xb8/0x110 deviceunbindcleanup+0xe/0x70 devicereleasedriverinternal+0x1c7/0x210 driverdetach+0x47/0x90 busremovedriver+0x6c/0xf0 cxlacpiexit+0xc/0x11 [cxlacpi] dosysdeletemodule.isra.0+0x181/0x260 dosyscall64+0x75/0x190 entrySYSCALL64afterhwframe+0x76/0x7e

The observation though is that driver objects are typically much longer lived than device objects. It is reasonable to perform lockless de-reference of a @driver pointer even if it is racing detach from a device. Given the infrequency of driver unregistration, use synchronizercu() in moduleremovedriver() to close any potential races. It is potentially overkill to suffer synchronizercu() just to handle the rare module removal racing ueventshow() event.

Thanks to Tetsuo Handa for the debug analysis of the syzbot report [1].

Other sources

Rejected reason: This CVE ID has been rejected or withdrawn by its CVE Numbering Authority.

— NVD

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 4, 2024
CVE Published
via MITRE·06:35 PM
Rejected
via MITRE·06:35 PM
Data Sourced
via NVD·07:15 PM
Description
Data Sourced
via Red Hat·07:20 PM
DescriptionSeverityAffected Software
Nov 9, 2024
Rejected
via MITRE·10:04 AM

Frequently Asked Questions

1

What is the current status of CVE-2024-44952?

CVE-2024-44952 has been rejected or withdrawn by its CVE Numbering Authority.

2

What does it mean that CVE-2024-44952 is rejected?

A rejected CVE ID like CVE-2024-44952 indicates that the reported vulnerability did not meet the criteria for inclusion.

3

Is there any software affected by CVE-2024-44952?

There are currently no identified software vulnerabilities for CVE-2024-44952 as it has been rejected.

4

Will there be any patches related to CVE-2024-44952?

No patches are expected for CVE-2024-44952 since the vulnerability has been withdrawn.

5

Should I be concerned about CVE-2024-44952?

Since CVE-2024-44952 was rejected, there is no need for concern as it does not represent a valid vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203