Skip to content
Memory corruption Advisory Advanced CVE-2025-0072

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.

m-y-mo Follow

Originally disclosed on GitHub Security Lab

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.

m-y-mo, on GitHub Security Lab

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

  1. Create a kbase_queue and bind it to a kbase_queue_group.
  2. Map memory to user space via mmap, allocating pages to the queue.
  3. Terminate the queue group to unbind the queue.
  4. Bind the queue to another queue group and mmap again, allocating new pages.
  5. 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.

More by m-y-mo

View all

64 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.