summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2015-09-28 17:21:07 -0500
committerSteve French <smfrench@gmail.com>2015-10-01 22:48:37 -0500
commit646200a041203f440fb6fcf9cacd9efeda9de74c (patch)
tree80389379b139d60e1acdd554f85e9706e0b90257 /fs/f2fs/node.h
parentff9f84b7d79ddccab4c293c9d3e289f95ae594f7 (diff)
downloadop-kernel-dev-646200a041203f440fb6fcf9cacd9efeda9de74c.zip
op-kernel-dev-646200a041203f440fb6fcf9cacd9efeda9de74c.tar.gz
[SMB3] Do not fall back to SMBWriteX in set_file_size error cases
The error paths in set_file_size for cifs and smb3 are incorrect. In the unlikely event that a server did not support set file info of the file size, the code incorrectly falls back to trying SMBWriteX (note that only the original core SMB Write, used for example by DOS, can set the file size this way - this actually does not work for the more recent SMBWriteX). The idea was since the old DOS SMB Write could set the file size if you write zero bytes at that offset then use that if server rejects the normal set file info call. Fortunately the SMBWriteX will never be sent on the wire (except when file size is zero) since the length and offset fields were reversed in the two places in this function that call SMBWriteX causing the fall back path to return an error. It is also important to never call an SMB request from an SMB2/sMB3 session (which theoretically would be possible, and can cause a brief session drop, although the client recovers) so this should be fixed. In practice this path does not happen with modern servers but the error fall back to SMBWriteX is clearly wrong. Removing the calls to SMBWriteX in the error paths in cifs_set_file_size Pointed out by PaX/grsecurity team Signed-off-by: Steve French <steve.french@primarydata.com> Reported-by: PaX Team <pageexec@freemail.hu> CC: Emese Revfy <re.emese@gmail.com> CC: Brad Spengler <spender@grsecurity.net> CC: Stable <stable@vger.kernel.org>
Diffstat (limited to 'fs/f2fs/node.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud