Breaking: Ruby2Shell - Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2026-31721

kernel: usb: gadget: f_hid: move list and spinlock inits from bind to alloc

Overview

Published
1 May 2026
Modified
11 Nov 2026
Medium CVE
0 Registry packages
134 OS packages
9 Linux distributions
Yes Fix available

Description

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

usb: gadget: f_hid: move list and spinlock inits from bind to alloc

There was an issue when you did the following:

  • setup and bind an hid gadget
  • open /dev/hidg0
  • use the resulting fd in EPOLL_CTL_ADD
  • unbind the UDC
  • bind the UDC
  • use the fd in EPOLL_CTL_DEL

When CONFIG_DEBUG_LIST was enabled, a list_del corruption was reported within remove_wait_queue (via ep_remove_wait_queue). After some debugging I found out that the queues, which f_hid registers via poll_wait were the problem. These were initialized using init_waitqueue_head inside hidg_bind. So effectively, the bind function re-initialized the queues while there were still items in them.

The solution is to move the initialization from hidg_bind to hidg_alloc to extend their lifetimes to the lifetime of the function instance.

Additionally, I found many other possibly problematic init calls in the bind function, which I moved as well.

Source: OX vulnerability database

Severity

5.5 · MEDIUM

CVSS 3.1 base score, scored by NVD.

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected packages · 0

No registry package. This ID affects operating system packages only.

Operating systems · 73 fixes

Photon OS 2 releases · 1 package

fixed 2
bpftool
Photon OS fixes for CVE-2026-31721
ReleasePackageFixed in
4.0 bpftool +9 5.10.253-1.ph4
5.0 bpftool +10 6.1.169-1.ph5

SUSE Linux Enterprise 1 release · 2 packages

fixed 2
cluster-md-kmp-default kernel-default-base
SUSE Linux Enterprise fixes for CVE-2026-31721
ReleasePackageFixed inAdvisory
16.0 cluster-md-kmp-default +26 6.12.0-160000.37.1 SUSE-SU-2026:23221-1
16.0 kernel-default-base 6.12.0-160000.37.1.160000.2.19 SUSE-SU-2026:23221-1

SUSE Linux Enterprise Micro 1 release · 2 packages

fixed 2
kernel-64kb kernel-default-base
SUSE Linux Enterprise Micro fixes for CVE-2026-31721
ReleasePackageFixed inAdvisory
6.2 kernel-64kb +11 6.12.0-160000.37.1 SUSE-SU-2026:23068-1
6.2 kernel-default-base 6.12.0-160000.37.1.160000.2.19 SUSE-SU-2026:23068-1

debian 4 releases · 2 packages

fixed 5
linux linux-6-1
debian fixes for CVE-2026-31721
ReleasePackageFixed in
11 linux 5.10.257-1
11 linux-6-1 6.1.170-1~deb11u1
12 linux 6.1.170-1
13 linux 6.12.85-1
14 linux 6.19.12-1

echo 1 release · 1 package

fixed 1
linux
echo fixes for CVE-2026-31721
ReleasePackageFixed in
linux 1

openSUSE Leap 1 release · 2 packages

fixed 2
cluster-md-kmp-64kb kernel-default-base
openSUSE Leap fixes for CVE-2026-31721
ReleasePackageFixed inAdvisory
16.0 cluster-md-kmp-64kb +74 6.12.0-160000.37.1 openSUSE-SU-2026:21555-1
16.0 kernel-default-base 6.12.0-160000.37.1.160000.2.19 openSUSE-SU-2026:21555-1

root.io debian 3 releases · 2 packages

fixed 3
linux rootio-linux
root.io debian fixes for CVE-2026-31721
ReleasePackageFixed in
11 linux +1 5.10.251-5.root.io.85
12 rootio-linux 6.1.170-1
13 rootio-linux 6.12.85-1

root.io ubuntu 2 releases · 1 package

fixed 2
linux
root.io ubuntu fixes for CVE-2026-31721
ReleasePackageFixed in
22.04 linux +1 5.15.0-179.189.root.io.88
24.04 linux +1 6.8.0-117.117.root.io.67

ubuntu 4 releases · 41 packages

fixed 53 affected 1
linux-nvidia-tegra-5-15 linux-ibm-5-15 linux-intel-iotg-5-15 linux-oracle-5-15 linux-aws-5-15 linux-gcp-5-15 +35
ubuntu fixes for CVE-2026-31721
ReleasePackageFixed in
20.04-ESM linux-nvidia-tegra-5-15 5.15.0-1064.66~20.04.1
20.04-ESM linux-ibm-5-15 +1 5.15.0-1106.110~20.04.1
20.04-ESM linux-intel-iotg-5-15 5.15.0-1107.113~20.04.1
20.04-ESM linux-oracle-5-15 5.15.0-1109.115~20.04.1
20.04-ESM linux-aws-5-15 5.15.0-1112.119~20.04.1
20.04-ESM linux-gcp-5-15 5.15.0-1112.122~20.04.1

48 more rows

References

Show all 40 references

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.