MGASA-2017-0396

Source
https://advisories.mageia.org/MGASA-2017-0396.html
Import Source
https://advisories.mageia.org/MGASA-2017-0396.json
JSON Data
https://api.osv.dev/v1/vulns/MGASA-2017-0396
Related
Published
2017-10-30T19:23:17Z
Modified
2017-10-30T10:35:30Z
Summary
Updated wget packages fix security vulnerabilities
Details

The http.c:skipshortbody() function is called in some circumstances, such as when processing redirects. When the response is sent chunked, 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 skip the chunk in pieces of 512 bytes by using the MIN() macro, but ends up passing the negative chunk length to connect.c:fdread(). As fdread() takes an int argument, the high 32 bits of the chunk length are discarded, leaving fd_read() with a completely attacker controlled length argument (CVE-2017-13089).

The retr.c:fdreadbody() function is called when processing OK responses. When the response is sent chunked, 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:fdread(). As fdread() 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 (CVE-2017-13090).

References
Credits

Affected packages

Mageia:6 / wget

Package

Name
wget
Purl
pkg:rpm/mageia/wget?distro=mageia-6

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.19.2-1.mga6

Ecosystem specific

{
    "section": "core"
}

Mageia:5 / wget

Package

Name
wget
Purl
pkg:rpm/mageia/wget?distro=mageia-5

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.15-5.3.mga5

Ecosystem specific

{
    "section": "core"
}