linux-stable/fs/cifs
Roman Smirnov 1be4500cfa cifs: fix integer overflow in match_server()
[ Upstream commit 2510859475 ]

The echo_interval is not limited in any way during mounting,
which makes it possible to write a large number to it. This can
cause an overflow when multiplying ctx->echo_interval by HZ in
match_server().

Add constraints for echo_interval to smb3_fs_context_parse_param().

Found by Linux Verification Center (linuxtesting.org) with Svace.

Fixes: adfeb3e00e ("cifs: Make echo interval tunable")
Cc: stable@vger.kernel.org
Signed-off-by: Roman Smirnov <r.smirnov@omp.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>
[ Adapted to older CIFS filesystem structure and mount option parsing ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-09 18:44:02 +02:00
..
asn1.c
cache.c
cifs_debug.c
cifs_debug.h
cifs_dfs_ref.c
cifs_fs_sb.h
cifs_ioctl.h
cifs_spnego.c
cifs_spnego.h
cifs_unicode.c
cifs_unicode.h
cifs_uniupr.h
cifsacl.c
cifsacl.h
cifsencrypt.c
cifsfs.c
cifsfs.h
cifsglob.h cifs: Fix UAF in cifs_demultiplex_thread() 2025-08-28 16:21:36 +02:00
cifspdu.h
cifsproto.h
cifsroot.c
cifssmb.c cifs: Fix calling CIFSFindFirst() for root path without msearch 2025-08-28 16:21:27 +02:00
connect.c cifs: fix integer overflow in match_server() 2025-09-09 18:44:02 +02:00
dfs_cache.c
dfs_cache.h
dir.c
dns_resolve.c
dns_resolve.h
export.c
file.c
fscache.c
fscache.h
inode.c
ioctl.c
Kconfig
link.c
Makefile
misc.c cifs: Fix cifs_query_path_info() for Windows NT servers 2025-07-17 18:24:49 +02:00
netmisc.c
nterr.c
nterr.h
ntlmssp.h
readdir.c
rfc1002pdu.h
sess.c
smb1ops.c
smb2file.c
smb2glob.h
smb2inode.c
smb2maperror.c
smb2misc.c
smb2ops.c
smb2pdu.c
smb2pdu.h
smb2proto.h
smb2status.h
smb2transport.c
smbdirect.c smb: client: let recv_done() cleanup before notifying the callers. 2025-08-28 16:21:22 +02:00
smbdirect.h
smbencrypt.c
smberr.h
smbfsctl.h
trace.c
trace.h
transport.c cifs: Fix UAF in cifs_demultiplex_thread() 2025-08-28 16:21:36 +02:00
winucase.c
xattr.c