REDHAT-BUG-2569520: High severity BusyBox BusyBox wget vulnerability
A flaw was found in BusyBox wget. When resuming an FTP download, prepareftpsession() in networking/wget.c subtracts the resume offset from the file size reported by the server without validating that the offset does not exceed it, allowing the contentlen variable to become negative. In retrievefiledata(), a (int) cast lets a negative contentlen whose low 32 bits are positive pass the length check, and the truncated value is then used as the fread() size into the heap-allocated wget buffer. A malicious FTP server, or an on-path attacker when plain FTP is used, can trigger this when wget resumes a download whose offset is more than 2 GiB larger than the reported file size, overwriting heap memory beyond the buffer with server-controlled data, which may lead to a crash or potentially code execution.
Affected Software
Event History
Frequently Asked Questions
Who is realistically exposed to exploitation?
Systems using BusyBox wget to resume downloads over FTP are exposed when the saved resume offset is more than 2 GiB larger than the file size reported by the server.
What level of attacker access is required?
An attacker must control a malicious FTP server, or be able to modify traffic in transit when the download uses plain FTP. The attacker also needs the client to resume a download under the affected offset and reported-size condition.