CVE Vulnerabilities

CVE-2020-25578

Improper Initialization

Published: Mar 26, 2021 | Modified: Jun 28, 2022
CVSS 3.x
5.3
MEDIUM
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:P/I:N/A:N
RedHat/V2
RedHat/V3
Ubuntu

In FreeBSD 12.2-STABLE before r368969, 11.4-STABLE before r369047, 12.2-RELEASE before p3, 12.1-RELEASE before p13 and 11.4-RELEASE before p7 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.

Weakness

The product does not initialize or incorrectly initializes a resource, which might leave the resource in an unexpected state when it is accessed or used.

Affected Software

Name Vendor Start Version End Version
Freebsd Freebsd 11.4 (including) 11.4 (including)
Freebsd Freebsd 11.4-p1 (including) 11.4-p1 (including)
Freebsd Freebsd 11.4-p2 (including) 11.4-p2 (including)
Freebsd Freebsd 11.4-p3 (including) 11.4-p3 (including)
Freebsd Freebsd 11.4-p4 (including) 11.4-p4 (including)
Freebsd Freebsd 11.4-p5 (including) 11.4-p5 (including)
Freebsd Freebsd 11.4-p6 (including) 11.4-p6 (including)
Freebsd Freebsd 12.1 (including) 12.1 (including)
Freebsd Freebsd 12.1-p1 (including) 12.1-p1 (including)
Freebsd Freebsd 12.1-p10 (including) 12.1-p10 (including)
Freebsd Freebsd 12.1-p11 (including) 12.1-p11 (including)
Freebsd Freebsd 12.1-p12 (including) 12.1-p12 (including)
Freebsd Freebsd 12.1-p2 (including) 12.1-p2 (including)
Freebsd Freebsd 12.1-p3 (including) 12.1-p3 (including)
Freebsd Freebsd 12.1-p4 (including) 12.1-p4 (including)
Freebsd Freebsd 12.1-p5 (including) 12.1-p5 (including)
Freebsd Freebsd 12.1-p6 (including) 12.1-p6 (including)
Freebsd Freebsd 12.1-p7 (including) 12.1-p7 (including)
Freebsd Freebsd 12.1-p8 (including) 12.1-p8 (including)
Freebsd Freebsd 12.1-p9 (including) 12.1-p9 (including)
Freebsd Freebsd 12.2 (including) 12.2 (including)
Freebsd Freebsd 12.2-p1 (including) 12.2-p1 (including)
Freebsd Freebsd 12.2-p2 (including) 12.2-p2 (including)

Potential Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • For example, in Java, if the programmer does not explicitly initialize a variable, then the code could produce a compile-time error (if the variable is local) or automatically initialize the variable to the default value for the variable’s type. In Perl, if explicit initialization is not performed, then a default value of undef is assigned, which is interpreted as 0, false, or an equivalent value depending on the context in which the variable is accessed.

References