Possible NULL-pointer dereference in lib/util/charset/pull_push.c

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Aug 27 09:25:12 MDT 2013


On Tue, Aug 27, 2013 at 05:15:20PM +0200, Torsten Kurbad wrote:
> Hi all,
> 
> while trying to build a product on top of the samba Python modules, a
> segmentation fault occured, whenever I tried to open a SamDB connection
> to our PDC via ldb's ldap backend.
> 
> Using valgrind, I tracked that down to a NULL-pointer dereference
> occuring in lib/util/charset/pull_push.c, line 41 (Samba 4.0.8 code
> base).
> 
> I somewhat circumvented the segfault by applying the attached patch.
> However, I'm confident that there's a better way to deal with that,
> i.e. preventing the occurence of NULL as the value of src right from
> the start.
> 
> Can someone assist me with this, since I'm quite lost, when it comes to
> C. ;-)

Can you get us a full backtrace of the crash? Get a corefile
of your product, attach to it with gdb and do a "bt full".

Volker

--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

*****************************************************************
visit us on it-sa:IT security exhibitions in Nürnberg, Germany
October 8th - 10th 2013, hall 12, booth 333
free tickets available via code 270691 on: www.it-sa.de/gutschein
******************************************************************


More information about the samba-technical mailing list