]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ksmbd: fix credit count leakage
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 12 May 2023 14:29:12 +0000 (23:29 +0900)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 4 Sep 2023 09:10:33 +0000 (11:10 +0200)
commit723b19c43d6b1b5fc7974bb758e302897489fc36
tree3c293999aeab41635c82030350c0289cc51a414d
parentf987bca271b9cb688a7832e54d498c6af8272d47
ksmbd: fix credit count leakage

BugLink: https://bugs.launchpad.net/bugs/2029808
commit 84c5aa47925a1f40d698b6a6a2bf67e99617433d upstream.

This patch fix the failure from smb2.credits.single_req_credits_granted
test. When client send 8192 credit request, ksmbd return 8191 credit
granted. ksmbd should give maximum possible credits that must be granted
within the range of not exceeding the max credit to client.

Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/ksmbd/smb2pdu.c