[PATCH] Fix smbd crash when printing lease record.

Jeremy Allison jra at samba.org
Wed May 17 17:16:07 UTC 2017

This is the fix for the crash reproduced by doing:

make -j test TESTS="samba3.smbtorture_s3.crypt_client" SMBD_OPTIONS=-d11 WINBINDD_OPTIONS=-d11

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12793

Inside struct share_mode_entry there is a pointer to
a struct share_mode_lease. This pointer is fixed
up by hand to point to an entry in the leases[]
array in the containing struct share_mode_data,
with an offset of share_mode_entry->lease_idx.

If the share_mode_entry isn't pointing to a
valid lease, then share_mode_entry->lease_idx is
set to 0xFFFFFFFF and share_mode_entry->lease
is an invalid pointer, but the ndr printing
code still tries to print it out in a debug
when the debug level is set high enough.

Patch passes full make test. Please review
and push if happy.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-smbd-Fix-open_files.idl-to-correctly-ignore-share.patch
Type: text/x-diff
Size: 1928 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170517/0ace8c24/0001-s3-smbd-Fix-open_files.idl-to-correctly-ignore-share.diff>

More information about the samba-technical mailing list