usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
Noroxi assessment
Priority: Monitor (action score 22/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.23% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 00bdd9bf1ac6d401ad926d3d8df41b9f1399f646, 16b1941eac2bd499f065a6739a40ce0011a3d740, 2015c23610cd0efadaeca4d3a8d1dae9a45aa35a.
- Mentioned 1 time in Turkish national cyber security advisories (siberguvenlik.gov.tr).
Low priority for now. Upgrade to Linux Linux 00bdd9bf1ac6d401ad926d3d8df41b9f1399f646, 16b1941eac2bd499f065a6739a40ce0011a3d740, 2015c23610cd0efadaeca4d3a8d1dae9a45aa35a or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: Fix use-after-free bug by not setting udc->dev.driver The syzbot fuzzer found a use-after-free bug: BUG: KASAN: use-after-free in dev_uevent+0x712/0x780 drivers/base/core.c:2320 Read of size 8 at addr ffff88802b934098 by task udevd/3689 CPU: 2 PID: 3689 Comm: udevd Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x303 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 dev_uevent+0x712/0x780 drivers/base/core.c:2320 uevent_show+0x1b8/0x380 drivers/base/core.c:2391 dev_attr_show+0x4b/0x90 drivers/base/core.c:2094 Although the bug manifested in the driver core, the real cause was a race with the gadget core. dev_uevent() does: if (dev->driver) add_uevent_var(env, "DRIVER=%s", dev->driver->name); and between the test and the dereference of dev->driver, the gadget core sets dev->driver to NULL. The race wouldn't occur if the gadget core registered its devices on a real bus, using the standard synchronization techniques of the driver core. However, it's not necessary to make such a large change in order to fix this bug; all we need to do is make sure that udc->dev.driver is always NULL. In fact, there is no reason for udc->dev.driver ever to be set to anything, let alone to the value it currently gets: the address of the gadget's driver. After all, a gadget driver only knows how to manage a gadget, not how to manage a UDC. This patch simply removes the statements in the gadget core that touch udc->dev.driver.
- Published
- Jul 16, 2024
- Updated
- Jun 17, 2026
- EPSS
- 0.2% · 13th percentile
- CWE
- CWE-416
Report tools
Action score
22
Monitor
Low priority for now.
- CVSS
- 22 / 40 · 5.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.2%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel3.1 and later · before 4.9.308
- linux linux kernel4.10 and later · before 4.14.273
- linux linux kernel4.15 and later · before 4.19.236
- linux linux kernel4.20 and later · before 5.4.187
- linux linux kernel5.5 and later · before 5.10.108
- linux linux kernel5.11 and later · before 5.15.31
- linux linux kernel5.16 and later · before 5.16.17
Versions reported by the vendor
Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.
Linux Linux
- 3.1affected
- 2ccea03a8f7ec93641791f2760d7cdc6cab6205f and later · before 4325124dde6726267813c736fee61226f1d38f0baffected · git
- 2ccea03a8f7ec93641791f2760d7cdc6cab6205f and later · before e2d3a7009e505e120805f449c832942660f3f7f3affected · git
- 2ccea03a8f7ec93641791f2760d7cdc6cab6205f and later · before 609a7119bffe3ddd7c93f2fa65be8917e02a0b7eaffected · git
- 2ccea03a8f7ec93641791f2760d7cdc6cab6205f and later · before 2282a6eb6d4e118e294e43dcc421e0e0fe4040b5affected · git
- 2ccea03a8f7ec93641791f2760d7cdc6cab6205f and later · before 00bdd9bf1ac6d401ad926d3d8df41b9f1399f646affected · git
- 2ccea03a8f7ec93641791f2760d7cdc6cab6205f and later · before 2015c23610cd0efadaeca4d3a8d1dae9a45aa35aaffected · git
- 2ccea03a8f7ec93641791f2760d7cdc6cab6205f and later · before 27d64436984fb8835a8b7e95993193cc478b162eaffected · git
- 2ccea03a8f7ec93641791f2760d7cdc6cab6205f and later · before 16b1941eac2bd499f065a6739a40ce0011a3d740affected · git
- before 3.1not affected · semver
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | linux | before 5.17.3-1 | 5.17.3-1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kernel-default | before 4.12.14-122.293.1 | 4.12.14-122.293.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_77 | before 1-8.3.1 | 1-8.3.1 |
| SUSE:Linux Enterprise Micro 5.1 | kernel-rt | before 5.3.18-150300.181.2 | 5.3.18-150300.181.2 |
| SUSE:Linux Enterprise Micro 5.1 | kernel-source-rt | before 5.3.18-150300.181.2 | 5.3.18-150300.181.2 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | kernel-source | before 4.12.14-122.293.1 | 4.12.14-122.293.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | kernel-syms | before 4.12.14-122.293.1 | 4.12.14-122.293.1 |
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
- CVE-2016-5195Race condition in mm/gup.c in the Linux kernel 2.x through 4.x before 4.8.3 allows local users to gain privileges by leveraging incorrect haKEV83Now
- CVE-2019-13272In the Linux kernel before 5.1.17, ptrace_link in kernel/ptrace.c mishandles the recording of the credentials of a process that wants to creKEV77This week
- CVE-2013-6282The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the v6k and v7 ARM platforms do not validate certain addKEV77This week
- CVE-2013-2094The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9 uses an incorrect integer data type, which allows loKEV77This week
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 00bdd9bf1ac6d401ad926d3d8df41b9f1399f646 | Vendor (CNA) |
| Linux Linux | 16b1941eac2bd499f065a6739a40ce0011a3d740 | Vendor (CNA) |
| Linux Linux | 2015c23610cd0efadaeca4d3a8d1dae9a45aa35a | Vendor (CNA) |
| Linux Linux | 2282a6eb6d4e118e294e43dcc421e0e0fe4040b5 | Vendor (CNA) |
| Linux Linux | 27d64436984fb8835a8b7e95993193cc478b162e | Vendor (CNA) |
| Linux Linux | 4325124dde6726267813c736fee61226f1d38f0b | Vendor (CNA) |
| Linux Linux | 609a7119bffe3ddd7c93f2fa65be8917e02a0b7e | Vendor (CNA) |
| Linux Linux | e2d3a7009e505e120805f449c832942660f3f7f3 | Vendor (CNA) |
| debian:linux | 5.17.3-1 · Debian:12 | Package registry (OSV) |
| suse:kernel-default | 4.12.14-122.293.1 · SUSE:Linux Enterprise Live Patching 12 SP5 | Package registry (OSV) |
| suse:kernel-rt | 5.3.18-150300.181.2 · SUSE:Linux Enterprise Micro 5.1 | Package registry (OSV) |
| suse:kernel-source | 4.12.14-122.293.1 · SUSE:Linux Enterprise Server 12 SP5-LTSS | Package registry (OSV) |
| suse:kernel-source-rt | 5.3.18-150300.181.2 · SUSE:Linux Enterprise Micro 5.1 | Package registry (OSV) |
| suse:kernel-syms | 4.12.14-122.293.1 · SUSE:Linux Enterprise Server 12 SP5-LTSS | Package registry (OSV) |
| suse:kgraft-patch-SLE12-SP5_Update_77 | 1-8.3.1 · SUSE:Linux Enterprise Live Patching 12 SP5 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
National notice (Türkiye Cybersecurity Directorate / USOM)
Official security notices citing this record; remediation advice is on the agency's page.
- TR-24-0977 · Jul 17, 2024(Linux Kernel Güncellemesi)
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-416 · Use After FreeCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Root cause
After a memory region is freed, another reference pointing to it is still used. By then, the same region may have been allocated for different data.
The bug in code
The whole CWE-416 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
free(dev->buf);/* ... another thread is still running ... */process(dev->buf);Fixed
lock(&dev->lock);free(dev->buf);dev->buf = NULL;unlock(&dev->lock);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (7 more)Show less
- git.kernel.org/stable/c/16b1941eac2bd499f065a6739a40ce0011a3d740
- git.kernel.org/stable/c/2015c23610cd0efadaeca4d3a8d1dae9a45aa35a
- git.kernel.org/stable/c/2282a6eb6d4e118e294e43dcc421e0e0fe4040b5
- git.kernel.org/stable/c/27d64436984fb8835a8b7e95993193cc478b162e
- git.kernel.org/stable/c/4325124dde6726267813c736fee61226f1d38f0b
- git.kernel.org/stable/c/609a7119bffe3ddd7c93f2fa65be8917e02a0b7e
- git.kernel.org/stable/c/e2d3a7009e505e120805f449c832942660f3f7f3
Vendor advisories and official records. Exploit/PoC links are deliberately left out.