diff options
author | Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> | 2022-04-13 04:42:51 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-20 09:12:49 +0200 |
commit | eb5f51756944735ac70cd8bb38637cc202e29c91 (patch) | |
tree | 7619193a4d7a793ad83ce176acf01a3008894b57 /fs/cifs/smb2file.c | |
parent | 1a1748d0dd0f0a98535c6baeef671c8722107639 (diff) | |
download | linux-stable-eb5f51756944735ac70cd8bb38637cc202e29c91.tar.gz linux-stable-eb5f51756944735ac70cd8bb38637cc202e29c91.tar.bz2 linux-stable-eb5f51756944735ac70cd8bb38637cc202e29c91.zip |
cifs: potential buffer overflow in handling symlinks
[ Upstream commit 64c4a37ac04eeb43c42d272f6e6c8c12bfcf4304 ]
Smatch printed a warning:
arch/x86/crypto/poly1305_glue.c:198 poly1305_update_arch() error:
__memcpy() 'dctx->buf' too small (16 vs u32max)
It's caused because Smatch marks 'link_len' as untrusted since it comes
from sscanf(). Add a check to ensure that 'link_len' is not larger than
the size of the 'link_str' buffer.
Fixes: c69c1b6eaea1 ("cifs: implement CIFSParseMFSymlink()")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/cifs/smb2file.c')
0 files changed, 0 insertions, 0 deletions