]> 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)
commit00177cf014d96438f53265595546be727f9e6c2b
tree0dd9ce55764c6c44d2a851e63770cbe8ee0fc078
parentbebb775bc323394fc45631e467f7cc45201fe365
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