Bug 12009 - smbclient write block size buffer for SMB1 is more than SMB2/SMB3 in samba-4.x
Summary: smbclient write block size buffer for SMB1 is more than SMB2/SMB3 in samba-4.x
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 4.4.4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Stefan Metzmacher
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-04 14:08 UTC by shivappa
Modified: 2016-07-04 14:28 UTC (History)
2 users (show)

See Also:


Attachments
smbcwrite with SMB1 and SMB2 (579.22 KB, application/x-7z-compressed)
2016-07-04 14:08 UTC, shivappa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description shivappa 2016-07-04 14:08:44 UTC
Created attachment 12258 [details]
smbcwrite with SMB1 and SMB2

Hi samba Team,

In samba-4.4.4 write block size for SMB1 is more than that of SMB2/SMB3 during file write from sambaclient-4.4.4 to the destination.

When SMBC_Write() is called the buffer size is 128K Bytes(130048) at offset 0 in SMB1 and 64K Bytes(65536) in SMB2/SMB3.
Ex: 104	4.935495	10.188.103.44	10.188.103.206	SMB	1310	Write AndX Request, FID: 0x4000, 130048 bytes at offset 0

(same file is used for both SMB1 and SMB2)

But in 3.6.x its 64K Bytes (as we know only SMB1 protocol for smbclient was supported before versions of samba-4.x).

I have attached the wireshark packet data for your reference.

I want to know why this varies between protocol versions in samba-4.x.
This behavior exists in all version from samba-4.x

If there is server which does not support more than 64K bytes write block size of buffer in each chunk from the client, it will fail to write to the destination.
Is this is a degrade for SMB1 of smbclient ?

Please let me know I will provide you more info if required.


Thanks & Regards,
Shivappa
Comment 1 Stefan Metzmacher 2016-07-04 14:27:36 UTC
Your server is windows vista, which only supports
SMB 2.0(0)2 or SMB1.

The max block size for SMB 2.02 is 64k.
For SMB1 it's 128K.

Newer Windows and Samba versions support SMB 2.1 and higher which
support larger buffers. 8MByte is the default on current versions.