diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2024-11-04 13:43:06 +0900 |
---|---|---|
committer | Namjae Jeon <linkinjeon@kernel.org> | 2024-11-05 09:26:38 +0900 |
commit | 0a77d947f599b1f39065015bec99390d0c0022ee (patch) | |
tree | e39c5f6dca528bba8c67d2cec3c2ba9e99a7c4cb /fs/smb/server/smb_common.h | |
parent | b8fc56fbca7482c1e5c0e3351c6ae78982e25ada (diff) |
ksmbd: check outstanding simultaneous SMB operations
If Client send simultaneous SMB operations to ksmbd, It exhausts too much
memory through the "ksmbd_work_cacheā. It will cause OOM issue.
ksmbd has a credit mechanism but it can't handle this problem. This patch
add the check if it exceeds max credits to prevent this problem by assuming
that one smb request consumes at least one credit.
Cc: stable@vger.kernel.org # v5.15+
Reported-by: Norbert Szetei <norbert@doyensec.com>
Tested-by: Norbert Szetei <norbert@doyensec.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/server/smb_common.h')
-rw-r--r-- | fs/smb/server/smb_common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/server/smb_common.h b/fs/smb/server/smb_common.h index cc1d6dfe29d5..a3d8a905b07e 100644 --- a/fs/smb/server/smb_common.h +++ b/fs/smb/server/smb_common.h @@ -427,7 +427,7 @@ bool ksmbd_smb_request(struct ksmbd_conn *conn); int ksmbd_lookup_dialect_by_id(__le16 *cli_dialects, __le16 dialects_count); -int ksmbd_init_smb_server(struct ksmbd_work *work); +int ksmbd_init_smb_server(struct ksmbd_conn *conn); struct ksmbd_kstat; int ksmbd_populate_dot_dotdot_entries(struct ksmbd_work *work, |