Amazon Linux 2022 : samba (ALAS2022-2022-224)

high Nessus Plugin ID 168583

Synopsis

The remote Amazon Linux 2022 host is missing a security update.

Description

The version of samba installed on the remote host is prior to 4.16.2-0. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2022-2022-224 advisory.

- A flaw was found in the way samba implemented SMB1 authentication. An attacker could use this flaw to retrieve the plaintext password sent over the wire even if Kerberos authentication was required.
(CVE-2016-2124)

- A flaw was found in the way Samba maps domain users to local users. An authenticated attacker could use this flaw to cause possible privilege escalation. (CVE-2020-25717)

- A flaw was found in the way samba, as an Active Directory Domain Controller, is able to support an RODC (read-only domain controller). This would allow an RODC to print administrator tickets. (CVE-2020-25718)

- A flaw was found in the way Samba, as an Active Directory Domain Controller, implemented Kerberos name- based authentication. The Samba AD DC, could become confused about the user a ticket represents if it did not strictly require a Kerberos PAC and always use the SIDs found within. The result could include total domain compromise. (CVE-2020-25719)

- Kerberos acceptors need easy access to stable AD identifiers (eg objectSid). Samba as an AD DC now provides a way for Linux applications to obtain a reliable SID (and samAccountName) in issued tickets.
(CVE-2020-25721)

- Multiple flaws were found in the way samba AD DC implemented access and conformance checking of stored data. An attacker could use this flaw to cause total domain compromise. (CVE-2020-25722)

- A flaw was found in the way Samba handled file/directory metadata. This flaw allows an authenticated attacker with permissions to read or modify share metadata, to perform this operation outside of the share. (CVE-2021-20316)

- A flaw was found in the way samba implemented DCE/RPC. If a client to a Samba server sent a very large DCE/RPC request, and chose to fragment it, an attacker could replace later fragments with their own data, bypassing the signature requirements. (CVE-2021-23192)

- In DCE/RPC it is possible to share the handles (cookies for resource state) between multiple connections via a mechanism called 'association groups'. These handles can reference connections to our sam.ldb database. However while the database was correctly shared, the user credentials state was only pointed at, and when one connection within that association group ended, the database would be left pointing at an invalid 'struct session_info'. The most likely outcome here is a crash, but it is possible that the use- after-free could instead allow different user state to be pointed at and this might allow more privileged access. (CVE-2021-3738)

- All versions of Samba prior to 4.15.5 are vulnerable to a malicious client using a server symlink to determine if a file or directory exists in an area of the server file system not exported under the share definition. SMB1 with unix extensions has to be enabled in order for this attack to succeed.
(CVE-2021-44141)

- The Samba vfs_fruit module uses extended file attributes (EA, xattr) to provide ...enhanced compatibility with Apple SMB clients and interoperability with a Netatalk 3 AFP fileserver. Samba versions prior to 4.13.17, 4.14.12 and 4.15.5 with vfs_fruit configured allow out-of-bounds heap read and write via specially crafted extended file attributes. A remote attacker with write access to extended file attributes can execute arbitrary code with the privileges of smbd, typically root. (CVE-2021-44142)

- The Samba AD DC includes checks when adding service principals names (SPNs) to an account to ensure that SPNs do not alias with those already in the database. Some of these checks are able to be bypassed if an account modification re-adds an SPN that was previously present on that account, such as one added when a computer is joined to a domain. An attacker who has the ability to write to an account can exploit this to perform a denial-of-service attack by adding an SPN that matches an existing service. Additionally, an attacker who can intercept traffic can impersonate existing services, resulting in a loss of confidentiality and integrity. (CVE-2022-0336)

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

Solution

Run 'yum update samba' to update your system.

See Also

https://alas.aws.amazon.com/AL2022/ALAS-2022-224.html

https://alas.aws.amazon.com/cve/html/CVE-2016-2124.html

https://alas.aws.amazon.com/cve/html/CVE-2020-25717.html

https://alas.aws.amazon.com/cve/html/CVE-2020-25718.html

https://alas.aws.amazon.com/cve/html/CVE-2020-25719.html

https://alas.aws.amazon.com/cve/html/CVE-2020-25721.html

https://alas.aws.amazon.com/cve/html/CVE-2020-25722.html

https://alas.aws.amazon.com/cve/html/CVE-2021-20316.html

https://alas.aws.amazon.com/cve/html/CVE-2021-23192.html

https://alas.aws.amazon.com/cve/html/CVE-2021-3738.html

https://alas.aws.amazon.com/cve/html/CVE-2021-44141.html

https://alas.aws.amazon.com/cve/html/CVE-2021-44142.html

https://alas.aws.amazon.com/cve/html/CVE-2022-0336.html

Plugin Details

Severity: High

ID: 168583

File Name: al2022_ALAS2022-2022-224.nasl

Version: 1.4

Type: local

Agent: unix

Published: 12/10/2022

Updated: 2/3/2023

Supported Sensors: Frictionless Assessment AWS, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

Risk Information

VPR

Risk Factor: High

Score: 8.9

CVSS v2

Risk Factor: High

Base Score: 9

Temporal Score: 7.8

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

CVSS Score Source: CVE-2021-44142

CVSS v3

Risk Factor: High

Base Score: 8.8

Temporal Score: 8.4

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

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

CVSS Score Source: CVE-2022-0336

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:samba-debugsource, p-cpe:/a:amazon:linux:samba-devel, p-cpe:/a:amazon:linux:ctdb, p-cpe:/a:amazon:linux:ctdb-debuginfo, p-cpe:/a:amazon:linux:libsmbclient, p-cpe:/a:amazon:linux:libsmbclient-debuginfo, p-cpe:/a:amazon:linux:libsmbclient-devel, p-cpe:/a:amazon:linux:libwbclient, p-cpe:/a:amazon:linux:libwbclient-debuginfo, p-cpe:/a:amazon:linux:libwbclient-devel, p-cpe:/a:amazon:linux:python3-samba, p-cpe:/a:amazon:linux:python3-samba-dc, p-cpe:/a:amazon:linux:python3-samba-dc-debuginfo, p-cpe:/a:amazon:linux:python3-samba-debuginfo, p-cpe:/a:amazon:linux:python3-samba-devel, p-cpe:/a:amazon:linux:python3-samba-test, p-cpe:/a:amazon:linux:samba, p-cpe:/a:amazon:linux:samba-client, p-cpe:/a:amazon:linux:samba-client-debuginfo, p-cpe:/a:amazon:linux:samba-client-libs, p-cpe:/a:amazon:linux:samba-client-libs-debuginfo, p-cpe:/a:amazon:linux:samba-common, p-cpe:/a:amazon:linux:samba-common-libs, p-cpe:/a:amazon:linux:samba-common-libs-debuginfo, p-cpe:/a:amazon:linux:samba-common-tools, p-cpe:/a:amazon:linux:samba-common-tools-debuginfo, p-cpe:/a:amazon:linux:samba-dc, p-cpe:/a:amazon:linux:samba-dc-bind-dlz, p-cpe:/a:amazon:linux:samba-dc-bind-dlz-debuginfo, p-cpe:/a:amazon:linux:samba-dc-debuginfo, p-cpe:/a:amazon:linux:samba-dc-libs, p-cpe:/a:amazon:linux:samba-dc-libs-debuginfo, p-cpe:/a:amazon:linux:samba-dc-provision, p-cpe:/a:amazon:linux:samba-debuginfo, p-cpe:/a:amazon:linux:samba-krb5-printing, p-cpe:/a:amazon:linux:samba-krb5-printing-debuginfo, p-cpe:/a:amazon:linux:samba-libs, p-cpe:/a:amazon:linux:samba-libs-debuginfo, p-cpe:/a:amazon:linux:samba-pidl, p-cpe:/a:amazon:linux:samba-test, p-cpe:/a:amazon:linux:samba-test-debuginfo, p-cpe:/a:amazon:linux:samba-test-libs, p-cpe:/a:amazon:linux:samba-test-libs-debuginfo, p-cpe:/a:amazon:linux:samba-vfs-iouring, p-cpe:/a:amazon:linux:samba-vfs-iouring-debuginfo, p-cpe:/a:amazon:linux:samba-winbind, p-cpe:/a:amazon:linux:samba-winbind-clients, p-cpe:/a:amazon:linux:samba-winbind-clients-debuginfo, p-cpe:/a:amazon:linux:samba-winbind-debuginfo, p-cpe:/a:amazon:linux:samba-winbind-krb5-locator, p-cpe:/a:amazon:linux:samba-winbind-krb5-locator-debuginfo, p-cpe:/a:amazon:linux:samba-winbind-modules, p-cpe:/a:amazon:linux:samba-winbind-modules-debuginfo, cpe:/o:amazon:linux:2022

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 12/6/2022

Vulnerability Publication Date: 11/9/2021

Reference Information

CVE: CVE-2016-2124, CVE-2020-25717, CVE-2020-25718, CVE-2020-25719, CVE-2020-25721, CVE-2020-25722, CVE-2021-20316, CVE-2021-23192, CVE-2021-3738, CVE-2021-44141, CVE-2021-44142, CVE-2022-0336

IAVA: 2021-A-0554-S, 2022-A-0054-S