CVE-2021-47205

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

State
Published
Severity
Not scored
Published
Apr 10, 2024
Updated
May 11, 2026
Reserved
Mar 25, 2024

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • c6a0637460c29799f1e63a6a4a65bda22caf4a54 to before b5dd513daa70ee8f6d281a20bd28485ee9bb7db2Affected
  • c6a0637460c29799f1e63a6a4a65bda22caf4a54 to before 9bec2b9c6134052994115d2d3374e96f2ccb9b9dAffected
LinuxLinux
  • 4.10Affected
  • before 4.10Not affected
  • 5.15.5 through 5.15.*Not affected
  • 5.16 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.