Bug 14340 - smbtorture multi-unlock test violates MS-SMB2 spec
Summary: smbtorture multi-unlock test violates MS-SMB2 spec
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: smbtorture (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-06 22:33 UTC by rluo
Modified: 2020-04-07 20:49 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rluo 2020-04-06 22:33:25 UTC
From source4/torture/smb2/lock.c line 2075:
SMB2 doesn't like lock and unlock requests in the
same packet. The lock will succeed, the unlock will fail with
INVALID_PARAMETER, and the lock will be unlocked before return.

So Samba is rolling back locks if encountering an UNLOCK flag in locks array.

From MS-SMB2 3.3.5.14.2 Processing Locks:
For each SMB2_LOCK_ELEMENT entry in the Locks array, if SMB2_LOCKFLAG_UNLOCK is set, the server MUST fail the request with STATUS_INVALID_PARAMETER and stop processing further entries in the Locks array. All successfully processed Lock operations are not rolled back.

Spec is expecting no roll back.
Comment 1 Jeremy Allison 2020-04-07 20:49:07 UTC
It might violate the spec, but does it violate "what Windows does" (tm) :-).

Can you run the test against a recent Windows10 server and see if it passes ?