CVE-2017-13090
GNU Wget: heap overflow in HTTP protocol handling
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
The retr.c:fd_read_body() function is called when processing OK responses. When the response is sent chunked in wget before 1.19.2, the chunk parser uses strtol() to read each chunk's length, but doesn't check that the chunk length is a non-negative number. The code then tries to read the chunk in pieces of 8192 bytes by using the MIN() macro, but ends up passing the negative chunk length to retr.c:fd_read(). As fd_read() takes an int argument, the high 32 bits of the chunk length are discarded, leaving fd_read() with a completely attacker controlled length argument. The attacker can corrupt malloc metadata after the allocated buffer.
Se llama a la función retr.c:fd_read_body() cuando se procesan las respuestas OK. Cuando la respuesta se envía fragmentada en wget en versiones anteriores a la 1.19.2, el analizador de fragmentos utiliza srtol() para leer la longitud de cada fragmento, pero no comprueba si esta longitud es un número no negativo. El código entonces intenta leer el fragmento en partes de 8192 bytes utilizando la macro MIN(), pero acaba pasando la longitud negativa del fragmento a retr.c:fd_read(). Ya que fd_read() toma un argumento int, los 32 bits de la longitud del fragmento se descartan, dejando fd_read() con un argumento de longitud controlado por completo por el atacante. El atacante puede corromper metadatos malloc después del búfer asignado.
A heap-based buffer overflow, when processing chunked encoded HTTP responses, was found in wget. By tricking an unsuspecting user into connecting to a malicious HTTP server, an attacker could exploit this flaw to potentially execute arbitrary code.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2017-08-22 CVE Reserved
- 2017-10-26 CVE Published
- 2024-01-31 EPSS Updated
- 2024-09-16 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
- CWE-122: Heap-based Buffer Overflow
CAPEC
References (10)
URL | Tag | Source |
---|---|---|
http://www.securityfocus.com/bid/101590 | Issue Tracking | |
http://www.securitytracker.com/id/1039661 | Issue Tracking | |
https://www.synology.com/support/security/Synology_SA_17_62_Wget | X_refsource_confirm |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
http://www.debian.org/security/2017/dsa-4008 | 2017-12-30 | |
https://access.redhat.com/errata/RHSA-2017:3075 | 2017-12-30 | |
https://security.gentoo.org/glsa/201711-06 | 2017-12-30 | |
https://access.redhat.com/security/cve/CVE-2017-13090 | 2017-10-26 | |
https://bugzilla.redhat.com/show_bug.cgi?id=1505445 | 2017-10-26 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Gnu Search vendor "Gnu" | Wget Search vendor "Gnu" for product "Wget" | <= 1.19.1 Search vendor "Gnu" for product "Wget" and version " <= 1.19.1" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 8.0 Search vendor "Debian" for product "Debian Linux" and version "8.0" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 9.0 Search vendor "Debian" for product "Debian Linux" and version "9.0" | - |
Affected
|