GLSA-202401-22 : libspf2: Multiple vulnerabilities

critical Nessus Plugin ID 188051

Description

The remote host is affected by the vulnerability described in GLSA-202401-22 (libspf2: Multiple vulnerabilities)

- Stack buffer overflow in libspf2 versions below 1.2.11 when processing certain SPF macros can lead to Denial of service and potentially code execution via malicious crafted SPF explanation messages.
(CVE-2021-20314)

- libspf2 before 1.2.11 has a four-byte heap-based buffer overflow that might allow remote attackers to execute arbitrary code (via an unauthenticated e-mail message from anywhere on the Internet) with a crafted SPF DNS record, because of incorrect sprintf usage in SPF_record_expand_data in spf_expand.c. The vulnerable code may be part of the supply chain of a site's e-mail infrastructure (e.g., with additional configuration, Exim can use libspf2; the Postfix web site links to unofficial patches for use of libspf2 with Postfix; older versions of spfquery relied on libspf2) but most often is not. (CVE-2021-33912)

- libspf2 before 1.2.11 has a heap-based buffer overflow that might allow remote attackers to execute arbitrary code (via an unauthenticated e-mail message from anywhere on the Internet) with a crafted SPF DNS record, because of SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. The vulnerable code may be part of the supply chain of a site's e-mail infrastructure (e.g., with additional configuration, Exim can use libspf2; the Postfix web site links to unofficial patches for use of libspf2 with Postfix; older versions of spfquery relied on libspf2) but most often is not. (CVE-2021-33913)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

All libspf2 users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=mail-filter/libspf2-1.2.11

See Also

https://security.gentoo.org/glsa/202401-22

https://bugs.gentoo.org/show_bug.cgi?id=807739

Plugin Details

Severity: Critical

ID: 188051

File Name: gentoo_GLSA-202401-22.nasl

Version: 1.0

Type: local

Published: 1/15/2024

Updated: 1/15/2024

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 9.3

Temporal Score: 7.3

Vector: CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C

CVSS Score Source: CVE-2021-33913

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:gentoo:linux:libspf2, cpe:/o:gentoo:linux

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 1/15/2024

Vulnerability Publication Date: 8/12/2021

Reference Information

CVE: CVE-2021-20314, CVE-2021-33912, CVE-2021-33913