Skip to content
Commit 9df23801 authored by Steve French's avatar Steve French
Browse files

smb311: failure to open files of length 1040 when mounting with SMB3.1.1 POSIX extensions



If a file size has bits 0x410 = ATTR_DIRECTORY | ATTR_REPARSE set
then during queryinfo (stat) the file is regarded as a directory
and subsequent opens can fail. A simple test example is trying
to open any file 1040 bytes long when mounting with "posix"
(SMB3.1.1 POSIX/Linux Extensions).

The cause of this bug is that Attributes field in smb2_file_all_info
struct occupies the same place that EndOfFile field in
smb311_posix_qinfo, and sometimes the latter struct is incorrectly
processed as if it was the first one.

Reported-by: default avatarOleh Nykyforchyn <oleh.nyk@gmail.com>
Tested-by: default avatarOleh Nykyforchyn <oleh.nyk@gmail.com>
Acked-by: default avatarPaulo Alcantara (Red Hat) <pc@manguebit.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 7330195e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment