Skip to content
OpenAdvisories
Unscored CVE-2021-36159 EUVD-2021-22783GHSA-cqp5-89fm-vp89

libfetch before 2021-07-26, as used in apk-tools, xbps, and other products, mishandles numeric strings for the FTP and HTTP protocols. The …

Published Aug 3, 2021 · Updated Aug 4, 2024 · Assigned by mitre

Description

libfetch before 2021-07-26, as used in apk-tools, xbps, and other products, mishandles numeric strings for the FTP and HTTP protocols. The FTP passive mode implementation allows an out-of-bounds read because strtol is used to parse the relevant numbers into address bytes. It does not check if the line ends prematurely. If it does, the for-loop condition checks for the '\0' terminator one byte too late.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Alpine v3.24 apk-tools 2.12.6-r0 —
Alpine v3.23 apk-tools 2.12.6-r0 —
Alpine v3.22 apk-tools 2.12.6-r0 —
Alpine v3.21 apk-tools 2.12.6-r0 —
Alpine v3.20 apk-tools 2.12.6-r0 —
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 apk-tools 2.12.6-r0 —
Alpine v3.18 apk-tools 2.12.6-r0 —
Alpine v3.17 apk-tools 2.12.6-r0 —
Alpine v3.16 apk-tools 2.12.6-r0 —
Alpine v3.15 apk-tools 2.12.6-r0 —
Alpine v3.14 apk-tools 2.12.6-r0 —
Alpine v3.13 apk-tools 2.12.6-r0 —
Alpine v3.12 apk-tools 2.10.7-r0 —
Alpine v3.11 apk-tools 2.10.7-r0 —
Alpine v3.10 apk-tools 2.10.7-r0 —

References