[PATCH 0/3] fix incorrect zero length server-side copy request handling

Jeremy Allison jra at samba.org
Thu Feb 6 17:19:42 MST 2014


On Thu, Feb 06, 2014 at 08:12:19PM +0100, David Disseldorp wrote:
> Samba currently incorrect handles zero length server-side copy requests
> by passing them through to the VFS layer for I/O.
> 
> On vfs_default, the IO itself is skipped, but a successful ioctl
> response is returned to the client, rather than
> NT_STATUS_INVALID_PARAMETER as returned by Windows Server 2012 and
> documented in MS-SMB2.
> 
> With vfs_btrfs, copy-chunk requests are mapped to BTRFS_IOC_CLONE_RANGE
> ioctls. A zero-length request in this case is catastrophic: I recently
> discovered Btrfs handles such a case by cloning all data from
> source-offset to end-of-file into the destination!
> 
> This patch set fixes these issues and adds a test case. Feedback
> appreciated.

LGTM - I can easily follow what you're up to here :-).

Pushed to autobuild.

Cheers,

	Jeremy.


More information about the samba-technical mailing list