LiveActive security incident?Get immediate response
CVE Record

CVE-2023-53693: USB: gadget: Fix the memory leak in raw_gadget driver

In the Linux kernel, the following vulnerability has been resolved: USB: gadget: Fix the memory leak in raw_gadget driver Currently, increasing raw_dev->count happens before invoke the raw_queue_event(), if the raw_queue_event() return error, invoke raw_release() will not trigger the dev_free() to be called. [ 268.905865][ T5067] raw-gadget.0 gadget.0: failed to queue event [ 268.912053][ T5067] udc dummy_udc.0: failed to start USB Raw Gadget: -12 [ 268.918885][ T5067] raw-gadget.0: probe of gadget.0 failed with error -12 [ 268.925956][ T5067] UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy [ 268.934657][ T5067] misc raw-gadget: fail, usb_gadget_register_driver returned -16 BUG: memory leak [<ffffffff8154bf94>] kmalloc_trace+0x24/0x90 mm/slab_common.c:1076 [<ffffffff8347eb55>] kmalloc include/linux/slab.h:582 [inline] [<ffffffff8347eb55>] kzalloc include/linux/slab.h:703 [inline] [<ffffffff8347eb55>] dev_new drivers/usb/gadget/legacy/raw_gadget.c:191 [inline] [<ffffffff8347eb55>] raw_open+0x45/0x110 drivers/usb/gadget/legacy/raw_gadget.c:385 [<ffffffff827d1d09>] misc_open+0x1a9/0x1f0 drivers/char/misc.c:165 [<ffffffff8154bf94>] kmalloc_trace+0x24/0x90 mm/slab_common.c:1076 [<ffffffff8347cd2f>] kmalloc include/linux/slab.h:582 [inline] [<ffffffff8347cd2f>] raw_ioctl_init+0xdf/0x410 drivers/usb/gadget/legacy/raw_gadget.c:460 [<ffffffff8347dfe9>] raw_ioctl+0x5f9/0x1120 drivers/usb/gadget/legacy/raw_gadget.c:1250 [<ffffffff81685173>] vfs_ioctl fs/ioctl.c:51 [inline] [<ffffffff8154bf94>] kmalloc_trace+0x24/0x90 mm/slab_common.c:1076 [<ffffffff833ecc6a>] kmalloc include/linux/slab.h:582 [inline] [<ffffffff833ecc6a>] kzalloc include/linux/slab.h:703 [inline] [<ffffffff833ecc6a>] dummy_alloc_request+0x5a/0xe0 drivers/usb/gadget/udc/dummy_hcd.c:665 [<ffffffff833e9132>] usb_ep_alloc_request+0x22/0xd0 drivers/usb/gadget/udc/core.c:196 [<ffffffff8347f13d>] gadget_bind+0x6d/0x370 drivers/usb/gadget/legacy/raw_gadget.c:292 This commit therefore invoke kref_get() under the condition that raw_queue_event() return success.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

This Linux kernel issue is a memory leak in the USB Raw Gadget driver. If an event queue operation fails during setup, the driver can keep an extra reference and miss cleanup. The public sources do not provide CVSS, impact scoring, or evidence of real-world exploitation.

Executive priority

Treat as a targeted Linux kernel maintenance issue. Prioritize affected embedded, lab, and USB gadget systems, but do not treat it as internet-wide emergency without additional exposure or exploitation evidence.

Technical view

The flaw is in drivers/usb/gadget/legacy/raw_gadget.c. raw_dev->count was incremented before raw_queue_event(); when raw_queue_event() failed, raw_release() did not trigger dev_free(). The fix moves kref_get() so it occurs only after raw_queue_event() succeeds.

Likely exposure

Likely exposure is limited to Linux systems with the USB Raw Gadget driver present and reachable. This is more relevant to kernel testing, embedded, USB gadget, or specialized device environments than typical general-purpose servers.

Exploitation context

The source bundle marks KEV as false and provides no source claiming active exploitation. The described failure is a memory leak triggered by an error path, suggesting denial-of-service or resource exhaustion concern rather than direct code execution evidence.

Researcher notes

Evidence is incomplete for severity and exploitability: no CVSS, CWE, or exploit report is provided. The strongest source details are the kernel commit description and stack traces showing leaked allocations in raw_open, raw_ioctl_init, and dummy_alloc_request.

Mitigation direction

  • Apply Linux vendor kernel updates containing the referenced stable fixes.
  • If unused, disable or avoid loading the raw_gadget driver.
  • Restrict access to raw-gadget device interfaces to trusted users only.
  • Check distribution advisories for backported fixes and package names.

Validation and detection

  • Inventory kernels and map them to vendor fixed builds or stable commits.
  • Check whether raw_gadget is built, loaded, or exposed on affected systems.
  • Review kernel logs for raw-gadget event queue failures and memory pressure.
  • Confirm patched source increments the reference only after queue success.
Prepared
Confidence
medium
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2023-53693 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
3Timeline events
0ADP providers
6Source links

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinuxf2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10, f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10, f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10, f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10, f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10unaffected
LinuxLinux5.7, 0, 5.10.190, 5.15.124, 6.1.43, 6.4.8, 6.5affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.