CVE-2021-47120
JSON

5.5medium

HID: magicmouse: fix NULL-deref on disconnect

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.24% (higher than 15% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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

Affected

Product or packageVersionsReported by
Linux Linuxfrom 9d7b18668956c411a422d04c712994c5fdb23a4b before 368c5d45a87e1bcc7f1e98e0c255c37b7b12c5d6, from 9d7b18668956c411a422d04c712994c5fdb23a4b before b5d013c4c76b276890135b5d32803c4c63924b77, from 9d7b18668956c411a422d04c712994c5fdb23a4b before 9cf27473f21913a3eaf4702dd2a25415afd5f33f, from 9d7b18668956c411a422d04c712994c5fdb23a4b before 4b4f6cecca446abcb686c6e6c451d4f1ec1a7497, 4.20
Not affected: before 4.20, from 5.4.125 up to 5.4.*, from 5.10.43 up to 5.10.*, from 5.12.10 up to 5.12.*, from 5.13 up to *
CVE List
linux linux_kernelfrom 4.20 before 5.4.125, from 5.5 before 5.10.43, from 5.11 before 5.12.10, 5.13NVD

Classification

CWE-476

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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

NVD (es)

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: HID: magicmouse: corrige NULL-deref al desconectarse. el commit 9d7b18668956 ("HID: magicmouse: agrega soporte para Apple Magic Trackpad 2") agregó una verificación de cordura para un trackpad de Apple pero devolvió el éxito. en lugar de -ENODEV cuando falló la verificación. Esto significa que la devolución de llamada de eliminación eliminará la referencia al puntero de datos del controlador nunca inicializado cuando el controlador se desvincule posteriormente (por ejemplo, al desconectarse el USB).

References

Sources

SourceRecordLicence
CVE ListCVE-2021-47120 changed 2026-05-11CVE Terms of Use
NVDCVE-2021-47120 changed 2026-06-17Public domain