GPSd NTRIP Stream Parsing access violation vulnerability
An integer underflow in GPSd's NTRIP stream parsing allows a malicious NTRIP caster to send a response that causes a negative-size memmove, leading to memory corruption and a crash. An attacker could trigger a denial of service by sending a crafted packet.
Originally disclosed on Cisco Talos
An integer underflow vulnerability exists in the NTRIP Stream Parsing functionality of GPSd 3.25.1~dev. A specially crafted network packet can lead to memory corruption.
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
The code decrements a buffer length variable without checking if it is already zero, causing an integer underflow that is later used as a size argument in memmove.
Impact
An attacker could cause a denial of service by crashing GPSd, but the CVSS score indicates high attack complexity and only availability impact.
What the attacker needed
GPSd configured to use NTRIP; Attacker controls NTRIP caster
The fix
The vulnerability was fixed in a vendor patch release.
How it was found
- Act as an NTRIP caster and respond to a GET request with a source table containing a stream record.
- When GPSd requests the stream path, send an HTTP response that is not properly terminated as GPSd expects.
- GPSd crashes due to the integer underflow and subsequent memmove with a negative size.
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.
GPSd is a program that collects GPS data, and it can also fetch data from the internet using a protocol called NTRIP. A bug in how it reads the response from a server can cause it to miscalculate the size of data, leading to a crash. This means an attacker who controls the server can make the program crash.
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.