openSUSE 15 Security Update : samba (openSUSE-SU-2021:3662-1)

high Nessus Plugin ID 155357

Language:

Synopsis

The remote SUSE host is missing a security update.

Description

The remote SUSE Linux SUSE15 host has packages installed that are affected by a vulnerability as referenced in the openSUSE-SU-2021:3662-1 advisory.

- Windows Active Directory (AD) domains have by default a feature to allow users to create computer accounts, controlled by ms-DS-MachineAccountQuota. In addition some (presumably trusted) users have the right to create new users or computers in both Samba and Windows Active Directory Domains. These features can be quite dangerous in the wrong hands, as the user who creates such accounts has broad privileges to not just create them and set their passwords, but to rename them at a later time with the only contraint being they may not match an existing samAccountName in AD. When Samba as an AD Domain member accepts a Kerberos ticket, it must map the information found therein to a local UNIX user-id (uid). This is currently done via the account name in the Active Directory generated Kerberos Privileged Attribute Certificate (PAC), or the account name in the ticket (if there is no PAC). For example, Samba will attempt to find a user DOMAIN\user before falling back to trying to find the user user. If the DOMAIN\user lookup can be made to fail, then a privilege escalation is possible. The easiest example to illustrate this is if an attacker creates an account named root (by renaming a MachineAccountQuota based machine account), and asks for a login without a Kerberos PAC. Between obtaining the ticket and presenting it to a server, the attacker renames the user account to a different name. Samba attempts to look up DOMAIN\root, which fails (as this no longer exists) and then falls back to looking up user root, which will map to the privileged UNIX uid of 0. This patch changes Samba to require a PAC (in all scenarios related to active directory domains) and use the SID and account name values of the PAC, which means the combination represents the same point in time. The processing is now similar to as with NTLM based logins.
The SID is unique and non-repeating and so can't be confused with another user. Additionally, a new parameter has been added min domain uid (default 1000), and no matter how we obtain the UNIX uid to use in the process token (we may eventually read /etc/passwd or similar), by default no UNIX uid below this value will be accepted. The patch also removes the fallback from 'DOMAIN\user' to just 'user', as it dangerous and not needed when nss_winbind is used (even when 'winbind use default domain = yes' is set).
However there are setups which are joined to an active directory domain just for authentication, but the authorization is handled without nss_winbind by mapping the domain account to a local user provided by nss_file, nss_ldap or something similar. NOTE: These setups won't work anymore without explicitly mapping the users! For these setups administrators need to use the 'username map' or 'username map script' option in order to map domain users explicitly to local users, e.g. user = DOMAIN\user Please consult 'man 5 smb.conf' for further details on 'username map' or 'username map script'. Also note that in the above example '\' refers to the default value of the 'winbind separator' option. [Added 2021-11-11] There's sadly a regression that allow trusted domains = no prevents winbindd from starting, fixes are available at https://bugzilla.samba.org/show_bug.cgi?id=14899 Please also notice the additional fix and advanced example for the 'username map [script]' based fallback from 'DOMAIN\user' to 'user'. See https://bugzilla.samba.org/show_bug.cgi?id=14901 and https://gitlab.com/samba- team/samba/-/merge_requests/2251 (CVE-2020-25717)

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

Solution

Update the affected packages.

See Also

https://bugzilla.suse.com/1192601

http://www.nessus.org/u?1439f635

https://www.suse.com/security/cve/CVE-2020-25717

Plugin Details

Severity: High

ID: 155357

File Name: openSUSE-2021-3662.nasl

Version: 1.3

Type: local

Agent: unix

Published: 11/16/2021

Updated: 2/28/2022

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.0

CVSS v2

Risk Factor: High

Base Score: 8.5

Temporal Score: 6.3

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

CVSS Score Source: CVE-2020-25717

CVSS v3

Risk Factor: High

Base Score: 8.1

Temporal Score: 7.1

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

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

Vulnerability Information

CPE: p-cpe:/a:novell:opensuse:libsmbconf0-32bit, p-cpe:/a:novell:opensuse:libsamba-passdb0-32bit, p-cpe:/a:novell:opensuse:libdcerpc-binding0, p-cpe:/a:novell:opensuse:libnetapi-devel-64bit, p-cpe:/a:novell:opensuse:libsamba-hostconfig0-64bit, p-cpe:/a:novell:opensuse:libnetapi0, p-cpe:/a:novell:opensuse:libsmbconf-devel, p-cpe:/a:novell:opensuse:libsamba-passdb-devel, p-cpe:/a:novell:opensuse:samba-core-devel, p-cpe:/a:novell:opensuse:libtevent-util0-64bit, p-cpe:/a:novell:opensuse:libsamba-policy0-python3-32bit, p-cpe:/a:novell:opensuse:samba-libs-python3, p-cpe:/a:novell:opensuse:libsamba-policy0-python3-64bit, p-cpe:/a:novell:opensuse:samba-gpupdate, p-cpe:/a:novell:opensuse:libsmbclient0-64bit, p-cpe:/a:novell:opensuse:libsamba-errors0-64bit, p-cpe:/a:novell:opensuse:ctdb-pcp-pmda, p-cpe:/a:novell:opensuse:libndr1-32bit, p-cpe:/a:novell:opensuse:libsamba-policy-devel, p-cpe:/a:novell:opensuse:samba-libs, p-cpe:/a:novell:opensuse:libsamba-util-devel, p-cpe:/a:novell:opensuse:libwbclient0-64bit, p-cpe:/a:novell:opensuse:libndr-nbt0-32bit, p-cpe:/a:novell:opensuse:libndr-nbt0, p-cpe:/a:novell:opensuse:libsmbldap-devel, p-cpe:/a:novell:opensuse:libdcerpc-binding0-64bit, p-cpe:/a:novell:opensuse:libndr-krb5pac0-32bit, p-cpe:/a:novell:opensuse:libsamdb0, p-cpe:/a:novell:opensuse:libtevent-util-devel, p-cpe:/a:novell:opensuse:libwbclient0, p-cpe:/a:novell:opensuse:samba-python3, p-cpe:/a:novell:opensuse:libndr-standard0-32bit, p-cpe:/a:novell:opensuse:ctdb-tests, p-cpe:/a:novell:opensuse:libsmbldap2-64bit, p-cpe:/a:novell:opensuse:samba-client-64bit, p-cpe:/a:novell:opensuse:libndr-krb5pac0, p-cpe:/a:novell:opensuse:samba-ldb-ldap, p-cpe:/a:novell:opensuse:samba-ad-dc-32bit, p-cpe:/a:novell:opensuse:libnetapi0-32bit, p-cpe:/a:novell:opensuse:libnetapi-devel-32bit, p-cpe:/a:novell:opensuse:samba-libs-32bit, p-cpe:/a:novell:opensuse:samba-client, p-cpe:/a:novell:opensuse:libsamdb-devel, p-cpe:/a:novell:opensuse:libsamba-credentials-devel, p-cpe:/a:novell:opensuse:libsamba-passdb0, cpe:/o:novell:opensuse:15.3, p-cpe:/a:novell:opensuse:libsamba-hostconfig0-32bit, p-cpe:/a:novell:opensuse:samba-client-32bit, p-cpe:/a:novell:opensuse:samba-ceph, p-cpe:/a:novell:opensuse:libsamba-credentials0, p-cpe:/a:novell:opensuse:libsmbclient0, p-cpe:/a:novell:opensuse:libndr-standard-devel, p-cpe:/a:novell:opensuse:libsmbconf0, p-cpe:/a:novell:opensuse:libsmbconf0-64bit, p-cpe:/a:novell:opensuse:libsamba-util0-64bit, p-cpe:/a:novell:opensuse:samba-winbind-64bit, p-cpe:/a:novell:opensuse:libsamba-errors0-32bit, p-cpe:/a:novell:opensuse:samba-test, p-cpe:/a:novell:opensuse:libdcerpc-samr0-32bit, p-cpe:/a:novell:opensuse:libsamba-passdb0-64bit, p-cpe:/a:novell:opensuse:libsamba-errors-devel, p-cpe:/a:novell:opensuse:libdcerpc-samr-devel, p-cpe:/a:novell:opensuse:libwbclient-devel, p-cpe:/a:novell:opensuse:libndr-nbt0-64bit, p-cpe:/a:novell:opensuse:ctdb, p-cpe:/a:novell:opensuse:samba-winbind, p-cpe:/a:novell:opensuse:libsamba-util0-32bit, p-cpe:/a:novell:opensuse:libndr1, p-cpe:/a:novell:opensuse:libdcerpc-samr0-64bit, p-cpe:/a:novell:opensuse:libsmbldap2, p-cpe:/a:novell:opensuse:libndr-krb5pac0-64bit, p-cpe:/a:novell:opensuse:libdcerpc-binding0-32bit, p-cpe:/a:novell:opensuse:libsamdb0-32bit, p-cpe:/a:novell:opensuse:libnetapi0-64bit, p-cpe:/a:novell:opensuse:samba, p-cpe:/a:novell:opensuse:libsamba-credentials0-32bit, p-cpe:/a:novell:opensuse:libsmbclient0-32bit, p-cpe:/a:novell:opensuse:libndr-standard0, p-cpe:/a:novell:opensuse:samba-ad-dc, p-cpe:/a:novell:opensuse:libdcerpc-samr0, p-cpe:/a:novell:opensuse:libnetapi-devel, p-cpe:/a:novell:opensuse:libsamba-credentials0-64bit, p-cpe:/a:novell:opensuse:libsamba-policy-python3-devel, p-cpe:/a:novell:opensuse:libsamba-hostconfig0, p-cpe:/a:novell:opensuse:libsamba-policy0-python3, p-cpe:/a:novell:opensuse:libsmbldap2-32bit, p-cpe:/a:novell:opensuse:samba-libs-python3-64bit, p-cpe:/a:novell:opensuse:libdcerpc0, p-cpe:/a:novell:opensuse:libndr-devel, p-cpe:/a:novell:opensuse:libdcerpc0-64bit, p-cpe:/a:novell:opensuse:samba-ad-dc-64bit, p-cpe:/a:novell:opensuse:libwbclient0-32bit, p-cpe:/a:novell:opensuse:libndr-nbt-devel, p-cpe:/a:novell:opensuse:samba-winbind-32bit, p-cpe:/a:novell:opensuse:libdcerpc0-32bit, p-cpe:/a:novell:opensuse:libtevent-util0, p-cpe:/a:novell:opensuse:libdcerpc-devel, p-cpe:/a:novell:opensuse:samba-dsdb-modules, p-cpe:/a:novell:opensuse:samba-libs-64bit, p-cpe:/a:novell:opensuse:libsamdb0-64bit, p-cpe:/a:novell:opensuse:libndr-standard0-64bit, p-cpe:/a:novell:opensuse:libtevent-util0-32bit, p-cpe:/a:novell:opensuse:samba-libs-python3-32bit, p-cpe:/a:novell:opensuse:libndr1-64bit, p-cpe:/a:novell:opensuse:libsmbclient-devel, p-cpe:/a:novell:opensuse:libndr-krb5pac-devel, p-cpe:/a:novell:opensuse:libsamba-hostconfig-devel, p-cpe:/a:novell:opensuse:libsamba-util0, p-cpe:/a:novell:opensuse:libsamba-errors0

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

Exploit Ease: No known exploits are available

Patch Publication Date: 11/15/2021

Vulnerability Publication Date: 11/9/2021

Reference Information

CVE: CVE-2020-25717