A number of important vulnerabilities affecting Mali Graphics Processing Models (GPUs) have surfaced, permitting hackers to take advantage of flaws in GPU drivers to realize full management of gadgets.
The vulnerabilities tracked as CVE-2022-22706 and CVE-2021-39793, expose tens of millions of gadgets to privilege escalation assaults, enabling attackers to bypass safety mechanisms, manipulate reminiscence permissions, and execute arbitrary code as a root person.
Technical Breakdown: How the Flaw Works
On the core of the problem is the kbase_jd_user_buf_pin_pages() operate within the Mali GPU kernel driver.
This operate, liable for managing GPU operations and reminiscence buffer permissions, fails to accurately implement permission flags.
Particularly, it checks solely the KBASE_REG_GPU_WR flag (representing GPU write entry) and ignores the KBASE_REG_CPU_WR flag (indicating CPU write entry).
This oversight opens the door for malicious functions to realize write entry to read-only reminiscence areas, granting privileges they need to not have. The affected drivers embrace the next variations:
- Midgard GPU Kernel Driver: r26p0 to r31p0
- Bifrost GPU Kernel Driver: r0p0 to r35p0
- Valhall GPU Kernel Driver: r19p0 to r35p0
Proof-of-Idea Exploit
In line with the Star Labs Report, Researchers demonstrated how these vulnerabilities are exploited to realize root entry:
Exploit Steps
- Reminiscence Manipulation: Hackers first allocate a reminiscence web page with write permissions after which exploit the driving force to govern its mapping, bypassing restrictions.
- Hijacking Kernel Processes: Utilizing their newfound write entry, attackers can tamper with privileged system processes resembling init or vold.
- Escalating Privileges: By concentrating on the init course of (the mother or father course of in Android gadgets), hackers can disable SELinux (Android’s key safety enforcement mechanism) and execute arbitrary code.
- Root-Stage Reverse Shell: With SELinux disabled, a reverse shell payload is executed, permitting distant attackers to realize root entry and full management of the compromised machine.
Right here’s code from the patched driver highlighting the mounted vulnerability:
@@ -1683,7 +1683,8 @@
kbase_jd_user_buf_unmap(kctx, reg->gpu_alloc,
- (reg->flags & KBASE_REG_GPU_WR));
+ (reg->flags & (KBASE_REG_CPU_WR | KBASE_REG_GPU_WR)));
![patched driver](https://gbhackers.com/wp-content/uploads/2025/02/image-1.jpg)
![patched driver](https://gbhackers.com/wp-content/uploads/2025/02/image-1.jpg)
The repair introduces the KBASE_REG_CPU_WR flag test alongside KBASE_REG_GPU_WR, guaranteeing each CPU and GPU write permissions are validated.
The exploit underscores the severity of hardware-level vulnerabilities. Attackers leveraging this method can:
- Steal Private Information: Photographs, paperwork, and different delicate info might be exfiltrated.
- Spy on Conversations: Microphones and cameras could also be activated remotely.
- Brick Units: Attackers might render gadgets unusable by corrupting important system parts.
A key demonstration of the assault concerned reaching a root reverse shell, bypassing SELinux enforcement and utilizing malicious payloads to hijack system processes like vold and init.
The next Termux output exhibits how the exploit originates from an unprivileged app person:
~ $ cat /proc/self/attr/present
u:r:untrusted_app_27:s0:c222,c256,c512,c768
~ $ id
uid=10222(u0_a222) gid=10222(u0_a222) teams=10222(u0_a222),3003(inet),9997(all people)
The vulnerabilities in Mali GPU drivers function a stark reminder of the rising sophistication of hardware-level exploits.
The phrase “Hackers Can Exploit GPU Flaws to Achieve Full Management of Your Gadget” is now not a hypothetical state of affairs—it’s a actuality that underscores the significance of well timed safety updates and heightened person vigilance.
For those who’re utilizing a tool with Mali GPU drivers, take quick motion to replace your software program or patch the vulnerabilities to safeguard your information and privateness.
Examine Actual-World Malicious Hyperlinks & Phishing Assaults With Risk Intelligence Lookup - Attempt for Free