(Pwn2Own) Sony XAV-9500ES gpsd Buffer Overflow Arbitrary Code Execution Vulnerability
The gpsd daemon on Sony XAV-9500ES devices does not properly validate the length of NMEA data before copying it into a fixed-length buffer, causing a buffer overflow. A physically present attacker could exploit this, in combination with other vulnerabilities, to execute arbitrary code as the gpsd daemon.
Originally disclosed on Zero Day Initiative
This vulnerability allows physically present attackers to execute arbitrary code on affected installations of Sony XAV-9500ES devices. 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 gpsd daemon fails to validate the length of NMEA data before copying it into a fixed-length buffer, leading to a buffer overflow.
Impact
A physically present attacker could execute arbitrary code in the context of the gpsd daemon, but only in conjunction with other vulnerabilities.
What the attacker needed
Physical access to the device
The fix
Sony 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.
A buffer overflow happens when a program copies more data into a fixed-size memory space than it can hold, so the extra data spills over and can overwrite other memory. Here, the gpsd program that processes GPS data does not check how long the incoming data is before copying it. An attacker who can physically access the device could send specially crafted data to trigger this overflow and potentially run their own code.
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.