GHSL-2024-356: Arbitrary kernel code execution after UAF in the Arm Mali GPU - CVE-2025-0072
A use-after-free in the Arm Mali GPU driver allows memory pages to be freed while still mapped to user space, because a queue can be rebound to a new group and then the old mapping closed. An attacker with a malicious user space application could exploit this to gain arbitrary kernel code execution.
In the Mali GPU driver that uses CSF, a kbasequeue can be created and then bound to a kbasequeuegroup. It can then map memory to the user space via mmap.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the driver does not properly track which memory pages belong to which mapping when a queue is rebound, so closing an old mapping frees pages that are still in use by a new mapping.
Impact
This issue can be exploited to gain arbitrary kernel code execution from a malicious user space application.
What the attacker needed
Malicious user space application; access to Mali GPU driver
How it was found
- Create a kbase_queue and bind it to a kbase_queue_group.
- Map memory to user space via mmap, allocating pages to the queue.
- Terminate the queue group to unbind the queue.
- Bind the queue to another queue group and mmap again, allocating new pages.
- Close the original vma, which frees the new pages while they are still mapped.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The GPU driver manages memory for programs that use the GPU. A bug lets a program free memory that is still being used, which can corrupt the system and let an attacker run their own code with high privileges.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.