CVE-2021-47205
JSON

5.5medium

clk: sunxi-ng: Unregister clocks/resets when unbinding

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

Description

In the Linux kernel, the following vulnerability has been resolved: clk: sunxi-ng: Unregister clocks/resets when unbinding Currently, unbinding a CCU driver unmaps the device's MMIO region, while leaving its clocks/resets and their providers registered. This can cause a page fault later when some clock operation tries to perform MMIO. Fix this by separating the CCU initialization from the memory allocation, and then using a devres callback to unregister the clocks and resets. This also fixes a memory leak of the `struct ccu_reset`, and uses the correct owner (the specific platform driver) for the clocks and resets. Early OF clock providers are never unregistered, and limited error handling is possible, so they are mostly unchanged. The error reporting is made more consistent by moving the message inside of_sunxi_ccu_probe.

Affected

Product or packageVersionsReported by
Linux Linuxfrom c6a0637460c29799f1e63a6a4a65bda22caf4a54 before b5dd513daa70ee8f6d281a20bd28485ee9bb7db2, from c6a0637460c29799f1e63a6a4a65bda22caf4a54 before 9bec2b9c6134052994115d2d3374e96f2ccb9b9d, 4.10
Not affected: before 4.10, from 5.15.5 up to 5.15.*, from 5.16 up to *
CVE List
linux linux_kernelbefore 5.15.5NVD

Classification

CWE-401

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: clk: sunxi-ng: Unregister clocks/resets when unbinding Currently, unbinding a CCU driver unmaps the device's MMIO region, while leaving its clocks/resets and their providers registered. This can cause a page fault later when some clock operation tries to perform MMIO. Fix this by separating the CCU initialization from the memory allocation, and then using a devres callback to unregister the clocks and resets. This also fixes a memory leak of the `struct ccu_reset`, and uses the correct owner (the specific platform driver) for the clocks and resets. Early OF clock providers are never unregistered, and limited error handling is possible, so they are mostly unchanged. The error reporting is made more consistent by moving the message inside of_sunxi_ccu_probe.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: clk: sunxi-ng: Anular el registro de relojes/reinicios al desvincular Actualmente, desvincular un controlador CCU anula la asignación de la región MMIO del dispositivo, mientras que deja sus relojes/reinicios y sus proveedores registrados. Esto puede causar una falla de página más adelante cuando alguna operación de reloj intenta realizar MMIO. Solucione esto separando la inicialización de CCU de la asignación de memoria y luego usando una devolución de llamada devres para anular el registro de los relojes y reinicios. Esto también corrige una pérdida de memoria de `struct ccu_reset` y usa el propietario correcto (el controlador de plataforma específico) para los relojes y reinicios. Los primeros proveedores de reloj OF nunca se anulan del registro y es posible un manejo de errores limitado, por lo que en su mayoría no se modifican. El informe de errores se hace más consistente moviendo el mensaje dentro de of_sunxi_ccu_probe.

References

Sources

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