CVE-2021-47205
Assigner: Linux
Published: 2024-04-10T18:56:38.347Z
State: PUBLISHED
descriptions: value: 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: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions: version: 1da177e4c3f4
lessThan: b5dd513daa70
status: affected
versionType: git
version: 1da177e4c3f4
lessThan: 9bec2b9c6134
status: affected
versionType: git
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions: version: 5.15.5
lessThanOrEqual: 5.15.*
status: unaffected
versionType: custom
version: 5.16
lessThanOrEqual: *
status: unaffected
versionType: original_commit_for_fix
title: clk: sunxi-ng: Unregister clocks/resets when unbinding
x_generator: engine: bippy-d175d3acf727