smbclient error when ls against win10 share

Thomas Dvorachek tdvorachek at
Tue Apr 5 21:41:51 UTC 2016

Jeremy, good afternoon & thank you.Patch looks good: either PVAL in my OP or CVAL work fine  :-)  either so long as 8 bit instead of 16.
BTW: there is a 2nd clilist.c in the source4/ dir struct; apologies as did not research if also needs tweak.Agree good possibility Reserved byte not being zero-ed in Win10 as prior releases(?)  Happy to test beta dll/exe on my PC if MS would like to provide.Thx again ...

      From: Jeremy Allison <jra at>
 To: Thomas Dvorachek <tdvorachek at> 
Cc: "samba-technical at" <samba-technical at>; jra at
 Sent: Tuesday, April 5, 2016 12:01 PM
 Subject: Re: smbclient error when ls against win10 share
On Tue, Apr 05, 2016 at 10:12:27AM +0000, Thomas Dvorachek wrote:
> Yep - zip of two pcapng files attached.  
> Trace shows what i saw when i added a bunch of debug outputs to source: in "find_first2 data" smb response, whenever the "Reserved" value immediately after "Short file name len" is not zero, smbclient pops the cli_list error 260 (we're hitting the "Bad short name length" test of slen greater than 24 in source.)
> In traces: both doing `ls` from "Windows" directory; one error trace due to "addins" directory entry having "1f" in Reserved field, one error trace due to "Boot" directory entry having "12" in Reserved field.
> Could be my win10 device is responding with bad packet structure, or something might be misaligned in smbclient processing the response packet fields.
> BTW: no errors when i use a windows device to `net use x: \\IP-addr\c$`, `x:`, `cd Windows`, `dir` ... cmd.exe outputs listing ok.
> Thx.

Oh, looks like source3/libsmb/clilist.c
is reading a 16-bit value where it should
be reading an 8-bit one.

Also, looks like Win10 is returning an
uninitialized byte here..

Can you try this patch and see if it
fixes it ?

If so I'll log a bug and get this
fixed in master and released branches.




More information about the samba-technical mailing list