Home / mailings FreeBSD Security Advisory FreeBSD-SA-21:15.libfetch
Posted on 24 August 2021
FreeBSD security notificat=============================================================================FreeBSD-SA-21:15.libfetch Security Advisory
The FreeBSD Project
Topic: libfetch out of bounds read
Category: core
Module: libfetch
Announced: 2021-08-24
Credits: Samanta Navarro
Affects: All supported versions of FreeBSD.
Corrected: 2021-08-24 17:59:43 UTC (stable/13, 13.0-STABLE)
2021-08-24 18:00:47 UTC (releng/13.0, 13.0-RELEASE-p4)
2021-08-24 18:30:16 UTC (stable/12, 12.2-STABLE)
2021-08-24 18:32:17 UTC (releng/12.2, 12.2-RELEASE-p10)
2021-08-24 18:29:40 UTC (stable/11, 11.4-STABLE)
2021-08-24 18:31:31 UTC (releng/11.4, 11.4-RELEASE-p13)
CVE Name: CVE-2021-36159
For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:https://security.FreeBSD.org/>.
I. Background
libfetch(3) is a multi-protocol file transfer library included with FreeBSD
and used by the fetch(1) command-line tool, pkg(8) package manager, and
others.
II. Problem Description
The passive mode in FTP communication allows an out of boundary read while
libfetch uses strtol 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 *p == '