Ubuntu 20.04 LTS / 22.04 LTS : Samba vulnerabilities (USN-5993-1)

medium Nessus Plugin ID 173794

Synopsis

The remote Ubuntu host is missing one or more security updates.

Description

The remote Ubuntu 20.04 LTS host has packages installed that are affected by multiple vulnerabilities as referenced in the USN-5993-1 advisory.

- In Active Directory, there are essentially four different classes of attributes. - Secret attributes (such as a user, computer or domain trust password) that are never disclosed and are not available to search against over LDAP. This is a hard-coded list, and since Samba 4.8 these are additionally encrypted in the DB with a per-DB key. - Confidential attributes (marked as such in the schema) that have a default access restriction allowing access only to the owner of the object. While a Samba AD Domain makes these attributes available, thankfully by default it will not have any of these confidential attributes set, as they are only added by clients after configuration (typically via a GPO). Examples of confidential data stored in Active Directory include BitLocker recovery keys, TPM owner passwords, and certificate secret keys stored with Credential Roaming. - Access controlled attributes (for reads or writes), Samba will honour the access control specified in the ntSecurityDescriptor. - Public attributes for read. Most attributes in Active Directory are available to read by all authenticated users. Because the access control rules for a given attribute are not consistent between objects, Samba implemented access control restrictions only after matching objects against the filter. Taking each of the above classes in turn: - Secret attributes are prevented from disclosure firstly by redaction of the LDAP filter, and secondly by the fact that they are still encrypted during filter processing (by default). - Confidential and access controlled attributes were subject to an attack using LDAP filters. With this security patch, for attributes mentioned in the search filter, Samba will perform a per-object access control evaluation before LDAP filter matching on the attribute, preventing unauthorised disclosure of the value of (for example) BitLocker recovery keys. It is not expected that all similar attacks have been prevented, and it is likely still possible to determine if an object or attribute on an object is present, but not to obtain the contents. (CVE-2023-0614)

- Active Directory allows passwords to be set and changed over LDAP. Microsoft's implementation imposes a restriction that this may only happen over an encrypted connection, however Samba does not have this restriction currently. Samba's samba-tool client tool likewise has no restriction regarding the security of the connection it will set a password over. An attacker able to observe the network traffic between samba-tool and the Samba AD DC could obtain newly set passwords if samba-tool connected using a Kerberos secured LDAP connection against a Samba AD DC. This would happen when samba-tool was used to reset a user's password, or to add a new user. This only impacts connections made using Kerberos as NTLM-protected connections are upgraded to encryption regardless. This patch changes all Samba AD LDAP client connections to use encryption, as well as integrity protection, by default, by changing the default value of client ldap sasl wrapping to seal in Samba's smb.conf. Administrators should confirm this value has not been overridden in their local smb.conf to obtain the benefit of this change. NOTE WELL: Samba, for consistency, uses a common smb.conf option for LDAP client behaviour. Therefore this will also encrypt the AD LDAP connections between Samba's winbindd and any AD DC, so this patch will also change behaviour for Samba Domain Member configurations. If this is a concern, the smb.conf value client ldap sasl wrapping can be reset to sign. (CVE-2023-0922)

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

Solution

Update the affected packages.

See Also

https://ubuntu.com/security/notices/USN-5993-1

Plugin Details

Severity: Medium

ID: 173794

File Name: ubuntu_USN-5993-1.nasl

Version: 1.7

Type: local

Agent: unix

Published: 4/3/2023

Updated: 10/23/2023

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

Risk Information

VPR

Risk Factor: Low

Score: 3.6

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5

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

CVSS Score Source: CVE-2023-0614

CVSS v3

Risk Factor: Medium

Base Score: 6.5

Temporal Score: 5.7

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

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

Vulnerability Information

CPE: cpe:/o:canonical:ubuntu_linux:20.04:-:lts, cpe:/o:canonical:ubuntu_linux:22.04:-:lts, p-cpe:/a:canonical:ubuntu_linux:ctdb, p-cpe:/a:canonical:ubuntu_linux:libnss-winbind, p-cpe:/a:canonical:ubuntu_linux:libpam-winbind, p-cpe:/a:canonical:ubuntu_linux:libsmbclient, p-cpe:/a:canonical:ubuntu_linux:libsmbclient-dev, p-cpe:/a:canonical:ubuntu_linux:libwbclient-dev, p-cpe:/a:canonical:ubuntu_linux:libwbclient0, p-cpe:/a:canonical:ubuntu_linux:python3-samba, p-cpe:/a:canonical:ubuntu_linux:registry-tools, p-cpe:/a:canonical:ubuntu_linux:samba, p-cpe:/a:canonical:ubuntu_linux:samba-common, p-cpe:/a:canonical:ubuntu_linux:samba-common-bin, p-cpe:/a:canonical:ubuntu_linux:samba-dev, p-cpe:/a:canonical:ubuntu_linux:samba-dsdb-modules, p-cpe:/a:canonical:ubuntu_linux:samba-libs, p-cpe:/a:canonical:ubuntu_linux:samba-testsuite, p-cpe:/a:canonical:ubuntu_linux:samba-vfs-modules, p-cpe:/a:canonical:ubuntu_linux:smbclient, p-cpe:/a:canonical:ubuntu_linux:winbind

Required KB Items: Host/cpu, Host/Debian/dpkg-l, Host/Ubuntu, Host/Ubuntu/release

Exploit Ease: No known exploits are available

Patch Publication Date: 4/3/2023

Vulnerability Publication Date: 3/29/2023

Reference Information

CVE: CVE-2023-0614, CVE-2023-0922

IAVA: 2023-A-0167-S

USN: 5993-1