smbclient error when ls against win10 share

Jeremy Allison jra at samba.org
Tue Apr 5 21:50:54 UTC 2016


On Tue, Apr 05, 2016 at 09:41:51PM +0000, Thomas Dvorachek wrote:
> 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.

I checked and I think it's ok.

> 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 ... awesome.tj
> 
>       From: Jeremy Allison <jra at samba.org>
>  To: Thomas Dvorachek <tdvorachek at yahoo.com> 
> Cc: "samba-technical at lists.samba.org" <samba-technical at lists.samba.org>; jra at samba.org
>  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.
> 
> Cheers,
> 
>     Jeremy.
> 
> 
> 



More information about the samba-technical mailing list