CVE-2026-64346: usb: gadget: udc: Fix use-after-free in gadget_match_driver

High 7.8 EPSS 0.2% Linux kernel

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: udc: Fix use-after-free in gadget_match_driver The udc structure acts as the management structure for the gadget, but their lifecycles are decoupled. A race condition exists where usb_del_gadget() frees the udc memory (e.g., via mode-switch work) while gadget_match_driver() concurrently accesses the freed udc memory (e.g., via configfs), causing a Use-After-Free (UAF) that triggers a NULL pointer dereference when the freed memory is zeroed: [39430.908615][ T1171] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [39430.911397][ T1171] pc : __pi_strcmp+0x20/0x140 [39430.911441][ T1171] lr : gadget_match_driver+0x34/0x60 ... [39430.911890][ T1171] usb_gadget_register_driver_owner+0x50/0xf8 [39430.911910][ T1171] gadget_dev_desc_UDC_store+0xf4/0x140 [39430.931308][ T1171] configfs_write_iter+0xec/0x134 [39430.957058][ T1171] Workqueue: events_freezable __dwc3_set_mode [39430.957287][ T1171] dwc3_gadget_exit+0x34/0x8c [39430.957304][ T1171] __dwc3_set_mode+0xc0/0x664 Fix this by ensuring the udc structure remains allocated until the gadget is released. To achieve this, introduce a new usb_gadget_release() routine to the core. When the gadget is added, usb_add_gadget() stores the gadget's release routine in the udc structure and takes a reference to the udc. When the gadget is released, usb_gadget_release() drops the reference to the udc and then calls the gadget's release routine.

What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms

What to do now

  1. Check whether you run Linux kernel and which version (commands below).
  2. Install the fixed version for your system: see “Patch it” below.
  3. Reboot into the new kernel (uname -r to confirm); live patching (kpatch, Ubuntu Livepatch, SUSE kGraft/klp) can defer the reboot for some CVEs

Affected and fixed versions

Affected:

Patch it

Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.

Debian
sudo apt update
sudo apt install --only-upgrade linux-image-amd64
Ubuntu
sudo apt update
sudo apt install --only-upgrade linux-image-generic (or the installed flavour: linux-image-aws, -azure, -gcp, -virtual)
RHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade --refresh kernel
Fedora
sudo dnf upgrade --refresh kernel
SUSE / openSUSE
sudo zypper refresh
sudo zypper update kernel-default
Amazon Linux
sudo dnf upgrade --releasever=latest kernel kernel6.12
Arch Linux
sudo pacman -Syu
Alpine
apk update && apk upgrade linux-lts linux-virt
FreeBSD
not Linux

General update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.

Fix status in Linux distributions

ReleasePackageStatusFixed version / advisory
Debian 12linuxfixed6.1.180-1
Debian 13linuxfixed6.12.96-1
Debian testinglinuxfixed7.1.4-1
Debian 12linux-6.12fixed6.12.100-1~deb12u1
Ubuntu 26.04linuxfixed7.0.0-31.31
Ubuntu 24.04linuxfixed6.8.0-147.147
Ubuntu 18.04 (ESM)linuxnot affected
Ubuntu 20.04 (ESM)linuxnot affected
Ubuntu 22.04linuxnot affected
Ubuntu 26.10linuxnot affected
Ubuntu 18.04 (ESM)linux-hwenot planned
Ubuntu 18.04 (ESM)linux-hwe-5.4not affected
Ubuntu 20.04 (ESM)linux-hwe-5.8not planned
Ubuntu 20.04 (ESM)linux-hwe-5.11not planned
Ubuntu 20.04 (ESM)linux-hwe-5.13not planned
Ubuntu 20.04 (ESM)linux-hwe-5.15not affected
Ubuntu 22.04linux-hwe-5.19not planned
Ubuntu 22.04linux-hwe-6.2not planned
Ubuntu 22.04linux-hwe-6.5not planned
Ubuntu 22.04linux-hwe-6.8fix pending
Ubuntu 24.04linux-hwe-6.11not planned
Ubuntu 24.04linux-hwe-6.14not planned
Ubuntu 24.04linux-hwe-6.17not fixed yet
Ubuntu 24.04linux-hwe-7.0fixed7.0.0-31.31~24.04.1
Ubuntu 18.04 (ESM)linux-hwe-edgenot planned
Ubuntu 22.04linux-kvmnot affected
Ubuntu 18.04 (ESM)linux-kvmnot affected
Ubuntu 20.04 (ESM)linux-kvmnot affected
Ubuntu 22.04linux-allwinner-5.19not planned
Ubuntu 24.04linux-awsfixed6.8.0-1067.70
Ubuntu 26.04linux-awsfixed7.0.0-1012.12
Ubuntu 18.04 (ESM)linux-awsnot affected
Ubuntu 20.04 (ESM)linux-awsnot affected
Ubuntu 22.04linux-awsnot affected
Ubuntu 26.10linux-awsnot affected
Ubuntu 18.04 (ESM)linux-aws-5.0not planned
Ubuntu 18.04 (ESM)linux-aws-5.3not planned
Ubuntu 18.04 (ESM)linux-aws-5.4not affected
Ubuntu 20.04 (ESM)linux-aws-5.8not planned
Ubuntu 20.04 (ESM)linux-aws-5.11not planned
Ubuntu 20.04 (ESM)linux-aws-5.13not planned
Ubuntu 20.04 (ESM)linux-aws-5.15not affected
Ubuntu 22.04linux-aws-5.19not planned
Ubuntu 22.04linux-aws-6.2not planned
Ubuntu 22.04linux-aws-6.5not planned
Ubuntu 22.04linux-aws-6.8fixed6.8.0-1069.74~22.04.1
Ubuntu 24.04linux-aws-6.14not planned
Ubuntu 24.04linux-aws-6.17not planned
Ubuntu 24.04linux-azurefixed6.8.0-1071.79
Ubuntu 18.04 (ESM)linux-azurenot planned
Ubuntu 20.04 (ESM)linux-azurenot affected
Ubuntu 26.04linux-azurefixed7.0.0-1014.14
Ubuntu 22.04linux-azurenot affected
Ubuntu 26.10linux-azurenot affected
Ubuntu 18.04 (ESM)linux-azure-4.15not affected
Ubuntu 18.04 (ESM)linux-azure-5.3not planned
Ubuntu 18.04 (ESM)linux-azure-5.4not affected
Ubuntu 20.04 (ESM)linux-azure-5.8not planned
Ubuntu 20.04 (ESM)linux-azure-5.11not planned
Ubuntu 20.04 (ESM)linux-azure-5.13not planned

From the Debian security tracker, Ubuntu CVE tracker and Red Hat Security Data API, refreshed every few hours.

Sources

Page generated automatically from official sources on 2026-11-11 17:22 UTC. Always confirm with your vendor's advisory.