[PATCH 0/2] cifs: fix integer overflow in match_server()

Roman Smirnov posted 2 patches 8 months, 3 weeks ago
There is a newer version of this series
fs/smb/client/connect.c    | 6 +-----
fs/smb/client/fs_context.c | 5 +++++
2 files changed, 6 insertions(+), 5 deletions(-)
[PATCH 0/2] cifs: fix integer overflow in match_server()
Posted by Roman Smirnov 8 months, 3 weeks ago
If a large number is written to echo_interval during mount,
an integer overflow may occur in match_server():

smb3_fs_context_parse_param()

cifs_smb3_do_mount()
  sget()
    cifs_match_super()
      match_server()

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

Roman Smirnov (2):
  cifs: fix integer overflow in match_server()
  cifs: remove unreachable code in cifs_get_tcp_session()

 fs/smb/client/connect.c    | 6 +-----
 fs/smb/client/fs_context.c | 5 +++++
 2 files changed, 6 insertions(+), 5 deletions(-)

-- 
2.34.1
Re: [PATCH 0/2] cifs: fix integer overflow in match_server()
Posted by Steve French 8 months, 3 weeks ago
Merged into cifs-2.6.git for-next

On Mon, Mar 31, 2025 at 3:23 AM Roman Smirnov <r.smirnov@omp.ru> wrote:
>
> If a large number is written to echo_interval during mount,
> an integer overflow may occur in match_server():
>
> smb3_fs_context_parse_param()
>
> cifs_smb3_do_mount()
>   sget()
>     cifs_match_super()
>       match_server()
>
> Found by Linux Verification Center (linuxtesting.org) with Svace.
>
> Roman Smirnov (2):
>   cifs: fix integer overflow in match_server()
>   cifs: remove unreachable code in cifs_get_tcp_session()
>
>  fs/smb/client/connect.c    | 6 +-----
>  fs/smb/client/fs_context.c | 5 +++++
>  2 files changed, 6 insertions(+), 5 deletions(-)
>
> --
> 2.34.1
>
>


-- 
Thanks,

Steve