(Pwn2Own) Samba fruit_pwrite Heap-based Buffer Overflow Remote Code Execution Vulnerability
A heap-based buffer overflow in Samba's fruit_pwrite function allows remote unauthenticated attackers to execute arbitrary code as root. The flaw arises from missing validation of user-supplied data length before copying into a fixed-size heap buffer.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Samba. Authentication is not required to exploit this vulnerability.
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 fruit_pwrite function fails to check the length of user-supplied data before copying it into a fixed-size heap buffer, leading to a heap overflow.
Impact
Remote attackers could execute arbitrary code with root privileges on affected Samba installations.
What the attacker needed
No authentication required; Network access to Samba service
The fix
Samba has issued an update to correct this vulnerability.
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.
This is a memory corruption bug in Samba, a file-sharing service. An attacker can send specially crafted data to overflow a buffer and run their own code on the server, without needing to log in. The code runs with the highest privileges (root), so the attacker could take full control of the machine.
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.