]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: check xattr value length earlier
authorSteve French <stfrench@microsoft.com>
Tue, 12 Jul 2022 16:43:44 +0000 (11:43 -0500)
committerSteve French <stfrench@microsoft.com>
Mon, 1 Aug 2022 06:34:44 +0000 (01:34 -0500)
commit35f573474bea11847a019243782366037d86ee2d
treebd80b7d35630355cea0739b43c1df43cbd217151
parent57206011754b6df4dd9ab5856572fe9aed3610a1
smb3: check xattr value length earlier

Coverity complains about assigning a pointer based on
value length before checking that value length goes
beyond the end of the SMB.  Although this is even more
unlikely as value length is a single byte, and the
pointer is not dereferenced until laterm, it is clearer
to check the lengths first.

Addresses-Coverity: 1467704 ("Speculative execution data leak")
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c