]> git.ipfire.org Git - thirdparty/linux.git/commit
cifs: If a corrupted DACL is returned by the server, bail out.
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 24 Feb 2021 15:04:02 +0000 (15:04 +0000)
committerSteve French <stfrench@microsoft.com>
Wed, 24 Feb 2021 17:41:43 +0000 (11:41 -0600)
commitf1ebe48dd3490adeff63b2d86ac7567aa018bd5d
tree9e8d525a14e86978e22059ea5e2f3c5bf55458c5
parentf1a08655cc4f6f2233448e11e2499321728f0849
cifs: If a corrupted DACL is returned by the server, bail out.

Static code analysis reported a possible null pointer dereference
in my last commit:
cifs: Retain old ACEs when converting between mode bits and ACL.

This could happen if the DACL returned by the server is corrupted.
We were trying to continue by assuming that the file has empty DACL.
We should bail out with an error instead.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reported-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Rohith Surabattula <rohiths@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsacl.c