Miroslav Lachman
2021-Jan-31 11:29 UTC
[FreeBSD-Announce] FreeBSD Security Advisory FreeBSD-SA-21:01.fsdisclosure
On 29/01/2021 03:28, FreeBSD Security Advisories wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > ============================================================================> FreeBSD-SA-21:01.fsdisclosure Security Advisory > The FreeBSD Project > > Topic: Uninitialized kernel stack leaks in several file systems > > Category: core > Module: fs > Announced: 2021-01-29 > Credits: Syed Faraz Abrar > Affects: All supported versions of FreeBSD. > Corrected: 2021-01-06 14:58:41 UTC (stable/12, 12.2-STABLE) > 2021-01-29 01:20:59 UTC (releng/12.2, 12.2-RELEASE-p3) > 2021-01-29 01:06:09 UTC (releng/12.1, 12.1-RELEASE-p13) > 2021-01-18 19:16:24 UTC (stable/11, 11.4-STABLE) > 2021-01-29 00:20:09 UTC (releng/11.4, 11.4-RELEASE-p7) > CVE Name: CVE-2020-25578, CVE-2020-25579 > > 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 > > The FreeBSD kernel exports file system directory entries to userspace > using the generic "dirent" structure. Individual file systems implement > VOP_READDIR to convert from the file system's internal directory entry > layout to the generic form. dirent structures can be fetched from > userspace using the getdirentries(2) system call. > > II. Problem Description > > Several file systems were not properly initializing the d_off field of > the dirent structures returned by VOP_READDIR. In particular, tmpfs(5), > smbfs(5), autofs(5) and mqueuefs(5) were failing to do so. As a result, > eight uninitialized kernel stack bytes may be leaked to userspace by > these file systems. This problem is not present in FreeBSD 11.There is a Corrected in: stable/11, 11.4-STABLE and releng/11.4, 11.4-RELEASE-p7, but later is a statement "This problem is not present in FreeBSD 11". What is true? Is it fixed in newer patchlevel of FreeBSD 11.4 or it was not present in 11.x at all? Kind regards Miroslav Lachman
Andrea Venturoli
2021-Jan-31 15:25 UTC
[FreeBSD-Announce] FreeBSD Security Advisory FreeBSD-SA-21:01.fsdisclosure
On 1/31/21 12:29 PM, Miroslav Lachman wrote:>> Several file systems were not properly initializing the d_off field of >> the dirent structures returned by VOP_READDIR.? In particular, tmpfs(5), >> smbfs(5), autofs(5) and mqueuefs(5) were failing to do so.? As a result, >> eight uninitialized kernel stack bytes may be leaked to userspace by >> these file systems.? This problem is not present in FreeBSD 11. > > There is a Corrected in: stable/11, 11.4-STABLE and releng/11.4, > 11.4-RELEASE-p7, but later is a statement "This problem is not present > in FreeBSD 11". > What is true? Is it fixed in newer patchlevel of FreeBSD 11.4 or it was > not present in 11.x at all?My understanding is that the problem described in that paragraph does not affect 11.x, but the next one does (and is "Corrected..."). I.e. 11.x is affected by:> Additionally, msdosfs(5) was failing to zero-fill a pair of padding > fields in the dirent structure, resulting in a leak of three > uninitialized bytes.Is that right? bye av.