]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: handle large EA requests more gracefully in smb2+
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 27 Sep 2017 23:39:58 +0000 (09:39 +1000)
committerSteve French <smfrench@gmail.com>
Wed, 18 Oct 2017 16:52:39 +0000 (11:52 -0500)
commit30ebadf089e71d701fa11704adc6fcd7a2aeb476
tree0dd9ce55764c6c44d2a851e63770cbe8ee0fc078
parent0acdd272055d0b5111854d8592273a8fd71c9efe
cifs: handle large EA requests more gracefully in smb2+

Update reading the EA using increasingly larger buffer sizes
until the response will fit in the buffer, or we exceed the
(arbitrary) maximum set to 64kb.

Without this change, a user is able to add more and more EAs using
setfattr until the point where the total space of all EAs exceed 2kb
at which point the user can no longer list the EAs at all
and getfattr will abort with an error.

The same issue still exists for EAs in SMB1.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reported-by: Xiaoli Feng <xifeng@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/smb2maperror.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/smb2pdu.h
fs/cifs/smb2proto.h