CVE-2021-47476: comedi: ni_usb6501: fix NULL-deref in command paths
In the Linux kernel, the following vulnerability has been resolved:
comedi: ni_usb6501: fix NULL-deref in command paths
The driver uses endpoint-sized USB transfer buffers but had no sanity
checks on the sizes. This can lead to zero-size-pointer dereferences or
overflowed transfer buffers in ni6501_port_command() and
ni6501_counter_command() if a (malicious) device has smaller max-packet
sizes than expected (or when doing descriptor fuzz testing).
Add the missing sanity checks to probe().
Security readout for executives and security teams
Plain-English summary
CVE-2021-47476 is a Linux kernel driver flaw that can let a malicious or malformed USB device crash an affected system. It concerns the Comedi ni_usb6501 driver. The business risk is mainly downtime where untrusted physical USB devices can be connected.
Executive priority
Treat as normal-priority kernel hygiene, with faster action for systems where users or visitors can attach USB hardware. It is not currently supported as internet-exploitable or actively exploited by the provided evidence.
Technical view
The ni_usb6501 Comedi driver lacked endpoint max-packet size checks during probe. Small or malformed USB descriptors could trigger zero-size pointer dereferences or overflowed transfer buffers in ni6501_port_command() and ni6501_counter_command(), causing high availability impact.
Likely exposure
Exposure is most likely on Linux systems with the ni_usb6501 Comedi USB driver present and reachable by physical USB attachment. Locked-down servers without accessible USB ports are less exposed.
Exploitation context
The CVSS vector requires physical access. The provided sources do not show active exploitation, and KEV is false. Evidence supports crash or denial-of-service risk, not confidentiality or integrity compromise.
Researcher notes
The issue is CWE-476 and availability-focused. The root cause is missing sanity checks on USB endpoint-sized transfer buffers during probe, affecting command paths when descriptors report smaller max-packet sizes than expected.
Mitigation direction
Apply Linux kernel updates containing the referenced stable fixes.
Follow distribution vendor advisories for exact fixed kernel packages.
Disable or avoid loading ni_usb6501 if the hardware is not needed.
Restrict physical USB access on exposed workstations, kiosks, and lab systems.
Validation and detection
Inventory Linux systems for affected kernel versions and Comedi driver use.
Check whether the ni_usb6501 module is present or loaded.
Compare deployed kernels against vendor fixed package guidance or stable commit backports.
Review physical USB access controls for systems where the driver is enabled.
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.
cwe · low confidence lookup
CWE-476: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
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.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-476 · source CWE mapping
NULL Pointer Dereference
NULL Pointer Dereference represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.