Fix bug #7669.
authorJeremy Allison <jra@samba.org>
Thu, 9 Sep 2010 13:54:23 +0000 (15:54 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 15 Sep 2010 18:53:08 +0000 (20:53 +0200)
commit462e5f7b139e294016ecefefed20dda107816622
treefc5f76074b08ef511f23e8fd92da3cc64e25c150
parente30f1648aab84b88e2ec1fceff45b985635b3e28
Fix bug #7669.

Fix bug #7669 (buffer overflow in sid_parse() in Samba3 and dom_sid_parse in
Samba4).

CVE-2010-3069:

===========
Description
===========

All current released versions of Samba are vulnerable to
a buffer overrun vulnerability. The sid_parse() function
(and related dom_sid_parse() function in the source4 code)
do not correctly check their input lengths when reading a
binary representation of a Windows SID (Security ID). This
allows a malicious client to send a sid that can overflow
the stack variable that is being used to store the SID in the
Samba smbd server.

A connection to a file share is needed to exploit this
vulnerability, either authenticated or unauthenticated
(guest connection).
(cherry picked from commit a34c3e999bb1ea61da31c5b3e845b19663039358)
libcli/security/dom_sid.c
libcli/security/dom_sid.h
source3/lib/util_sid.c
source3/libads/ldap.c
source3/libsmb/cliquota.c
source3/smbd/nttrans.c