CVE-2003-0865
Description
Heap-based buffer overflow in readstring of httpget.c for mpg123 0.59r and 0.59s allows remote attackers to execute arbitrary code via a long request.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Patches
Vulnerability mechanics
Root cause
"The readstring function in httpget.c does not properly limit the amount of data written to a buffer."
Attack vector
A remote attacker can send a long request to the mpg123 client when it attempts to read from a remote host, such as an HTTP audio streaming service. The `readstring` function, used in this context, does not utilize its `maxlen` argument, allowing it to write beyond the allocated buffer. This can lead to heap corruption and arbitrary code execution [ref_id=1].
Affected code
The vulnerability exists in the `readstring` function, located in `httpget.c`. This function is responsible for reading strings from remote hosts and is used in conjunction with the `*request` buffer, which is allocated to 1024 bytes [ref_id=1].
What the fix does
The advisory indicates that the `readstring` function in `httpget.c` does not properly limit the amount of data written to a buffer. A quick fix suggested involves modifying the `while(1)` loop to `while(maxlen>pos)`, ensuring that the `maxlen` argument is respected and preventing buffer overflows [ref_id=1].
Preconditions
- inputThe attacker must be able to send a crafted, long request to the mpg123 client.
- networkThe mpg123 client must be configured to connect to a remote resource, such as an HTTP audio stream.
Generated on Jun 2, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- www.debian.org/security/2004/dsa-435nvdPatchVendor Advisory
- www.securityfocus.com/archive/1/338641nvdExploitVendor Advisory
- www.securityfocus.com/bid/8680nvdExploitPatchVendor Advisory
- ftp.sco.com/pub/updates/OpenLinux/3.1.1/Server/CSSA-2004-002.0/CSSA-2004-002.0.txtnvd
- distro.conectiva.com.br/atualizacoes/nvd
- marc.infonvd
News mentions
0No linked articles in our index yet.