CVE-2021-47535·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: drm/msm/a6xx: Allocate enough space for GMU registers In commit 142639a52a01 ("drm/msm/a6xx: fix crashstate capture for A650") we changed a6xx_get_gmu_registers() to read 3 sets of registers. Unfortunately, we didn't change the memory allocation for the array. That leads to a KASAN warning (this was on the chromeos-5.4 kernel, which has the problematic commit backported to it): BUG: KASAN: slab-out-of-bounds in _a6xx_get_gmu_registers+0x144/0x430 Write of size 8 at addr ffffff80c89432b0 by task A618-worker/209 CPU: 5 PID: 209 Comm: A618-worker Tainted: G W 5.4.156-lockdep #22 Hardware name: Google Lazor Limozeen without Touchscreen (rev5 - rev8) (DT) Call trace: dump_backtrace+0x0/0x248 show_stack+0x20/0x2c dump_stack+0x128/0x1ec print_address_description+0x88/0x4a0 __kasan_report+0xfc/0x120 kasan_report+0x10/0x18 __asan_report_store8_noabort+0x1c/0x24 _a6xx_get_gmu_registers+0x144/0x430 a6xx_gpu_state_get+0x330/0x25d4 msm_gpu_crashstate_capture+0xa0/0x84c recover_worker+0x328/0x838 kthread_worker_fn+0x32c/0x574 kthread+0x2dc/0x39c ret_from_fork+0x10/0x18 Allocated by task 209: __kasan_kmalloc+0xfc/0x1c4 kasan_kmalloc+0xc/0x14 kmem_cache_alloc_trace+0x1f0/0x2a0 a6xx_gpu_state_get+0x164/0x25d4 msm_gpu_crashstate_capture+0xa0/0x84c recover_worker+0x328/0x838 kthread_worker_fn+0x32c/0x574 kthread+0x2dc/0x39c ret_from_fork+0x10/0x18
- Severity
- medium
- Software
- Kernel
- Fixed in
- 5.15.7
- Published
- 2024-05-24
Affected versions
From: 5.11
Until: 5.15.7
Fixed in: 5.15.7
How to fix this CVE
Update your Linux kernel to version 5.15.7 or later to address a memory allocation vulnerability in the MSM GPU driver's GMU register handling. This flaw could cause a kernel crash (denial of service) when the GPU crashstate capture mechanism attempts to read register data beyond the allocated buffer. Apply the patch immediately if you are running kernel versions 5.11 through 5.15.6.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Run 'uname -r' to check your current kernel version. Versions 5.11.0 to 5.15.6 are vulnerable.
- Check if your system uses a Qualcomm Adreno A6xx GPU by running 'lspci | grep -i adreno' or examining dmesg for GPU initialization messages.
- Monitor kernel logs for KASAN warnings: 'grep -i "kasan\|slab-out-of-bounds" /var/log/kern.log' or 'journalctl -p err | grep -i kasan'.
- Verify the patch is applied by confirming kernel version is 5.15.7 or later with 'uname -r', then check for GPU state capture logs in dmesg without KASAN warnings.
FAQ
What is CVE-2021-47535?
This is a buffer overflow vulnerability in the Linux kernel's MSM GPU driver where the GMU register allocation was not updated to accommodate an increased register read count, allowing writes beyond allocated memory boundaries during GPU crash diagnostics.
Is CVE-2021-47535 being actively exploited?
No, there is no evidence of active exploitation or public exploits available for this vulnerability. It is primarily a denial-of-service vector triggered during GPU error recovery scenarios.
What versions of Kernel are affected by CVE-2021-47535?
Linux kernel versions 5.11.0 through 5.15.6 are affected. The vulnerability was introduced in commit 142639a52a01 and fixed in version 5.15.7.
How do I check if my server is vulnerable to CVE-2021-47535?
Run 'uname -r' and compare the output to the affected range (5.11-5.15.6). If your kernel falls within this range and includes Qualcomm Adreno GPU support, you are vulnerable.
Does Defensia detect CVE-2021-47535?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2021-47535 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/83e54fcf0b14ca2d869dd37abe1bb6542805f538
- https://git.kernel.org/stable/c/b4d25abf9720b69a03465b09d0d62d1998ed6708
- https://git.kernel.org/stable/c/d646856a600e8635ba498f20b194219b158626e8
- https://git.kernel.org/stable/c/83e54fcf0b14ca2d869dd37abe1bb6542805f538
- https://git.kernel.org/stable/c/b4d25abf9720b69a03465b09d0d62d1998ed6708
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47535. Free for 1 server.
Get started free