Debian DSA-065-1 : samba - remote file append/creation

critical Nessus Plugin ID 14902

Synopsis

The remote Debian host is missing a security-related update.

Description

Michal Zalewski discovered that Samba does not properly validate NetBIOS names from remote machines.

By itself that is not a problem, except if Samba is configured to write log-files to a file that includes the NetBIOS name of the remote side by using the `%m' macro in the `log file' command. In that case an attacker could use a NetBIOS name like '../tmp/evil'. If the log-file was set to '/var/log/samba/%s' Samba would then write to /var/tmp/evil.

Since the NetBIOS name is limited to 15 characters and the `log file' command could have an extension to the filename the results of this are limited. However if the attacker is also able to create symbolic links on the Samba server they could trick Samba into appending any data they want to all files on the filesystem which Samba can write to.

The Debian GNU/Linux packaged version of Samba has a safe configuration and is not vulnerable.

As temporary workaround for systems that are vulnerable change all occurrences of the `%m' macro in smb.conf to `%l' and restart Samba.

Solution

This has been fixed in version 2.0.7-3.4, and we recommend that you upgrade your Samba package immediately.

See Also

http://www.debian.org/security/2001/dsa-065

Plugin Details

Severity: Critical

ID: 14902

File Name: debian_DSA-065.nasl

Version: 1.20

Type: local

Agent: unix

Published: 9/29/2004

Updated: 1/4/2021

Supported Sensors: Frictionless Assessment Agent, Nessus Agent, Agentless 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

Vulnerability Information

CPE: p-cpe:/a:debian:debian_linux:samba, cpe:/o:debian:debian_linux:2.2

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: 6/23/2001

Vulnerability Publication Date: 6/23/2001

Reference Information

CVE: CVE-2001-1162

BID: 2927

DSA: 065