Bug 10106 - honour output buffer length set by the client for SMB2 GetInfo requests
honour output buffer length set by the client for SMB2 GetInfo requests
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: File services
4.0.9
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
: 8379 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-22 12:51 UTC by Ralph Wuerthner
Modified: 2013-09-10 22:02 UTC (History)
2 users (show)

See Also:


Attachments
honour output buffer length set by the client for SMB2 GetInfo requests (5.90 KB, patch)
2013-08-22 12:51 UTC, Ralph Wuerthner
no flags Details
git-am fix for 4.1.0 (29.57 KB, patch)
2013-08-29 21:42 UTC, Jeremy Allison
vl: review-
Details
git-am fix for 4.1.0 (25.67 KB, patch)
2013-08-30 15:33 UTC, Jeremy Allison
metze: review+
Details
git-am fix for 3.6.next (25.43 KB, patch)
2013-08-30 22:55 UTC, Jeremy Allison
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Wuerthner 2013-08-22 12:51:35 UTC
Created attachment 9157 [details]
honour output buffer length set by the client for SMB2 GetInfo requests

We had a customer defect where a client submitted a GetInfo SMB_QUERY_FS_VOLUME_INFO request with a output buffer length of 24 bytes. Samba responded with a full length response of 40 bytes which resulted in a client error.

The attached patchset also enhances GetInfo for file system information classes SMB_QUERY_FS_VOLUME_INFO and SMB_QUERY_FS_ATTRIBUTE_INFO to return partial, but valid data in case output buffer length is too small. This behaviour is documented in MS-FSCC.
Comment 1 Ralph Wuerthner 2013-08-22 12:54:42 UTC
Attached patch is already committed to master as 0602009..270d29a .
Comment 2 Volker Lendecke 2013-08-22 14:28:51 UTC
Please note that the attached patchset breaks reading acls via smb2. See the thread in

https://lists.samba.org/archive/samba-technical/2013-August/094459.html

I'm working on it.
Comment 3 Björn Jacke 2013-08-29 08:08:43 UTC
*** Bug 8379 has been marked as a duplicate of this bug. ***
Comment 4 Jeremy Allison 2013-08-29 21:34:17 UTC
Git cherry-picks from master needed to fix this server-side (not including the new client testsuite) for 4.1.0 is:

$ git cherry-pick -x a93f9c3d33e442c84d0c9da7eb5d25ca4b54fc33
$ git cherry-pick -x a91d2b05bab329a8a9772c2c79a3b1e02933182e
$ git cherry-pick -x 616777f029e462f53c5118d79de8c6405a5fb7c1
$ git cherry-pick -x ec46f6b91941e38dd92f8e0fb0f278592e3157b6
$ git cherry-pick -x 270d29a743a030653037cb176f3764bec3c79b6c
$ git cherry-pick -x 323cccd35d06c7327c19dc5cb891043507624d7d
$ git cherry-pick -x 53123996033594f68a3fc9037474aada3aef0750
$ git cherry-pick -x ac41df91a5a425633fc716ca02187e753879d795
$ git cherry-pick -x 91939614760837b2ac2c6bb8b5daac108a4f4670
$ git cherry-pick -x 40f60024ca19e33cbbe9825b42692f386a8f1dd9
$ git cherry-pick -x b37edda32930fec372d6467d442f67532c3fbd33
$ git cherry-pick -x 5634f240fd4273cb7327111140ccbea0fd41e3fc
$ git cherry-pick -x 1b1935b876a14154ef74e447bf53eb7cd0a5dde9

Jeremy.
Comment 5 Jeremy Allison 2013-08-29 21:42:37 UTC
Created attachment 9175 [details]
git-am fix for 4.1.0

Note ! This patchset contains the cherry-picks listed in the last comment. It does not contain the changes to smbtorture that adds the tests for this code. Let me know if that is also required.

Jeremy.
Comment 6 Volker Lendecke 2013-08-30 12:43:49 UTC
Comment on attachment 9175 [details]
git-am fix for 4.1.0

This patches does contain the torture fixes and does not apply to 4.1. Is it possible that you uploaded your master patchset and not your 4.1 one?
Comment 7 Jeremy Allison 2013-08-30 15:31:04 UTC
Arg. You're right. I uploaded the wrong file.

New file to follow..
Comment 8 Jeremy Allison 2013-08-30 15:31:40 UTC
Arg. You're right. I uploaded the wrong file.

New file to follow..
Comment 9 Jeremy Allison 2013-08-30 15:33:58 UTC
Created attachment 9176 [details]
git-am fix for 4.1.0

Ok, this should be the right one for 4.1.0. Sorry for the problem (two files in my /tmp directory containing the string "10106").

I'll look into back-ports for 4.0.next and 3.6.next now.

Jeremy.
Comment 10 Jeremy Allison 2013-08-30 17:57:05 UTC
Comment on attachment 9176 [details]
git-am fix for 4.1.0

Patch also applies cleanly to 4.0.next.
Comment 11 Jeremy Allison 2013-08-30 22:55:14 UTC
Created attachment 9177 [details]
git-am fix for 3.6.next

Backport for 3.6.next.

Jeremy.
Comment 12 Jeremy Allison 2013-09-04 23:49:25 UTC
Comment on attachment 9177 [details]
git-am fix for 3.6.next

Widening the reviewer pool a bit :-).
Comment 13 Karolin Seeger 2013-09-06 08:46:56 UTC
Pushed to autobuild-v4-1-test, v4-0-test and v3-6-test.
Comment 14 Karolin Seeger 2013-09-09 08:03:07 UTC
Pushed to v4-1-test and v4-0-test.
Closing out bug report.

Thanks!