Debian DSA-5525-1 : samba - security update

critical Nessus Plugin ID 182941

Synopsis

The remote Debian host is missing one or more security-related updates.

Description

The remote Debian 12 host has packages installed that are affected by multiple vulnerabilities as referenced in the dsa-5525 advisory.

- A path traversal vulnerability was identified in Samba when processing client pipe names connecting to Unix domain sockets within a private directory. Samba typically uses this mechanism to connect SMB clients to remote procedure call (RPC) services like SAMR LSA or SPOOLSS, which Samba initiates on demand.
However, due to inadequate sanitization of incoming client pipe names, allowing a client to send a pipe name containing Unix directory traversal characters (../). This could result in SMB clients connecting as root to Unix domain sockets outside the private directory. If an attacker or client managed to send a pipe name resolving to an external service using an existing Unix domain socket, it could potentially lead to unauthorized access to the service and consequential adverse events, including compromise or service crashes. (CVE-2023-3961)

- A vulnerability was discovered in Samba, where the flaw allows SMB clients to truncate files, even with read-only permissions when the Samba VFS module acl_xattr is configured with acl_xattr:ignore system acls = yes. The SMB protocol allows opening files when the client requests read-only access but then implicitly truncates the opened file to 0 bytes if the client specifies a separate OVERWRITE create disposition request. The issue arises in configurations that bypass kernel file system permissions checks, relying solely on Samba's permissions. (CVE-2023-4091)

- A design flaw was found in Samba's DirSync control implementation, which exposes passwords and secrets in Active Directory to privileged users and Read-Only Domain Controllers (RODCs). This flaw allows RODCs and users possessing the GET_CHANGES right to access all attributes, including sensitive secrets and passwords. Even in a default setup, RODC DC accounts, which should only replicate some passwords, can gain access to all domain secrets, including the vital krbtgt, effectively eliminating the RODC / DC distinction. Furthermore, the vulnerability fails to account for error conditions (fail open), like out- of-memory situations, potentially granting access to secret attributes, even under low-privileged attacker influence. (CVE-2023-4154)

- A vulnerability was found in Samba's rpcecho development server, a non-Windows RPC server used to test Samba's DCE/RPC stack elements. This vulnerability stems from an RPC function that can be blocked indefinitely. The issue arises because the rpcecho service operates with only one worker in the main RPC task, allowing calls to the rpcecho server to be blocked for a specified time, causing service disruptions. This disruption is triggered by a sleep() call in the dcesrv_echo_TestSleep() function under specific conditions. Authenticated users or attackers can exploit this vulnerability to make calls to the rpcecho server, requesting it to block for a specified duration, effectively disrupting most services and leading to a complete denial of service on the AD DC. The DoS affects all other services as rpcecho runs in the main RPC task. (CVE-2023-42669)

- A flaw was found in Samba. It is susceptible to a vulnerability where multiple incompatible RPC listeners can be initiated, causing disruptions in the AD DC service. When Samba's RPC server experiences a high load or unresponsiveness, servers intended for non-AD DC purposes (for example, NT4-emulation classic DCs) can erroneously start and compete for the same unix domain sockets. This issue leads to partial query responses from the AD DC, causing issues such as The procedure number is out of range when using tools like Active Directory Users. This flaw allows an attacker to disrupt AD DC services.
(CVE-2023-42670)

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

Solution

Upgrade the samba packages.

For the stable distribution (bookworm), these problems have been fixed in version 2

See Also

https://security-tracker.debian.org/tracker/source-package/samba

https://www.debian.org/security/2023/dsa-5525

https://security-tracker.debian.org/tracker/CVE-2023-3961

https://security-tracker.debian.org/tracker/CVE-2023-4091

https://security-tracker.debian.org/tracker/CVE-2023-4154

https://security-tracker.debian.org/tracker/CVE-2023-42669

https://security-tracker.debian.org/tracker/CVE-2023-42670

https://packages.debian.org/source/bookworm/samba

Plugin Details

Severity: Critical

ID: 182941

File Name: debian_DSA-5525.nasl

Version: 1.7

Type: local

Agent: unix

Published: 10/11/2023

Updated: 3/14/2024

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Critical

Base Score: 10

Temporal Score: 7.8

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

CVSS Score Source: CVE-2023-3961

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:debian:debian_linux:samba-libs, p-cpe:/a:debian:debian_linux:samba, p-cpe:/a:debian:debian_linux:libpam-winbind, p-cpe:/a:debian:debian_linux:libldb2, p-cpe:/a:debian:debian_linux:samba-dsdb-modules, p-cpe:/a:debian:debian_linux:samba-ad-provision, p-cpe:/a:debian:debian_linux:python3-samba, p-cpe:/a:debian:debian_linux:ldb-tools, cpe:/o:debian:debian_linux:12.0, p-cpe:/a:debian:debian_linux:ctdb, p-cpe:/a:debian:debian_linux:smbclient, p-cpe:/a:debian:debian_linux:winbind, p-cpe:/a:debian:debian_linux:registry-tools, p-cpe:/a:debian:debian_linux:samba-common-bin, p-cpe:/a:debian:debian_linux:libwbclient-dev, p-cpe:/a:debian:debian_linux:samba-ad-dc, p-cpe:/a:debian:debian_linux:samba-vfs-modules, p-cpe:/a:debian:debian_linux:samba-testsuite, p-cpe:/a:debian:debian_linux:libwbclient0, p-cpe:/a:debian:debian_linux:python3-ldb-dev, p-cpe:/a:debian:debian_linux:python3-ldb, p-cpe:/a:debian:debian_linux:libsmbclient-dev, p-cpe:/a:debian:debian_linux:libnss-winbind, p-cpe:/a:debian:debian_linux:libldb-dev, p-cpe:/a:debian:debian_linux:samba-common, p-cpe:/a:debian:debian_linux:libsmbclient, p-cpe:/a:debian:debian_linux:samba-dev

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

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 10/11/2023

Vulnerability Publication Date: 10/10/2023

Reference Information

CVE: CVE-2023-3961, CVE-2023-4091, CVE-2023-4154, CVE-2023-42669, CVE-2023-42670

IAVA: 2023-A-0535