CVE-2022-50523
📋 TL;DR
This CVE describes a memory leak vulnerability in the Linux kernel's Rockchip clock driver. When clk_register() fails in rockchip_clk_register_pll(), the kmemdup()-allocated memory for the rate table is not freed, causing a kernel memory leak. This affects Linux systems using Rockchip processors.
💻 Affected Systems
- Linux kernel with Rockchip clock driver
⚠️ Risk & Real-World Impact
Worst Case
Sustained exploitation could lead to kernel memory exhaustion, causing system instability, denial of service, or potential kernel crashes.
Likely Case
Gradual memory consumption over time leading to performance degradation and eventual system instability requiring reboots.
If Mitigated
Minimal impact with proper monitoring and regular system maintenance; memory leaks would be detected before causing critical issues.
🎯 Exploit Status
Exploitation requires local access and ability to trigger the clk_register() failure condition. No known public exploits.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in Linux kernel stable releases via the referenced commits
Vendor Advisory: https://git.kernel.org/stable/c/20201c3a0a32f127fa4bdf379d6ac01c2978702d
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commits. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel package. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Unload rockchip_clk module
linuxPrevent vulnerability by unloading the affected kernel module if not required
rmmod rockchip_clk
Blacklist module loading
linuxPrevent automatic loading of vulnerable module
echo 'blacklist rockchip_clk' >> /etc/modprobe.d/blacklist.conf
🧯 If You Can't Patch
- Monitor system memory usage closely for unusual increases
- Implement regular system reboots to clear accumulated memory leaks
🔍 How to Verify
Check if Vulnerable:
Check if rockchip_clk module is loaded: lsmod | grep rockchip_clk AND check kernel version against patched versions
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commits: grep -r 'rockchip_clk_register_pll' /lib/modules/$(uname -r)/source/ OR check kernel changelog
📡 Detection & Monitoring
Log Indicators:
- Kernel oops messages
- Out of memory errors in dmesg
- Increasing memory usage in system logs
SIEM Query:
source="kernel" AND ("out of memory" OR "kernel panic" OR "slab error")
🔗 References
- https://git.kernel.org/stable/c/20201c3a0a32f127fa4bdf379d6ac01c2978702d
- https://git.kernel.org/stable/c/26b94635f1c84d7f6cb482179125cb17e59c90a5
- https://git.kernel.org/stable/c/5b0a1f1247cd42ac5e0d369f8dbb58762692edee
- https://git.kernel.org/stable/c/739a6a6bbdb793bd57938cb24aa5a6df89983546
- https://git.kernel.org/stable/c/86e1e080ad14c5fb6c14a5f0eb530b1b38cbc968
- https://git.kernel.org/stable/c/dcd4ba068b194c6ef0071491aa3f12bec8c14d5b
- https://git.kernel.org/stable/c/f02c1d8dc8d880cbaaf9094b4f396fe868ee23ff
- https://git.kernel.org/stable/c/f2ffb8653ea85ae39ce44347751fcc4c3e41f6bb
- https://git.kernel.org/stable/c/f4d70c139d313948e02360304a6cbcd3a4f5deb5