diff options
| author | Linus Torvalds <[email protected]> | 2025-04-03 23:18:06 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2025-04-03 23:18:06 +0000 |
| commit | 06a22366d6a11ca8ed03c738171822ac9b714cfd (patch) | |
| tree | 48ffe1584f7bf06f4e4a41612bb004669ad42fb1 /fs/smb/server/auth.c | |
| parent | Merge tag 'trace-ringbuffer-v6.15-3' of git://git.kernel.org/pub/scm/linux/ke... (diff) | |
| parent | ksmbd: fix null pointer dereference in alloc_preauth_hash() (diff) | |
| download | kernel-06a22366d6a11ca8ed03c738171822ac9b714cfd.tar.gz kernel-06a22366d6a11ca8ed03c738171822ac9b714cfd.zip | |
Merge tag 'v6.15rc-part2-ksmbd-server-fixes' of git://git.samba.org/ksmbd
Pull smb server fixes from Steve French:
"Four ksmbd SMB3 server fixes, all also for stable"
* tag 'v6.15rc-part2-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
ksmbd: fix null pointer dereference in alloc_preauth_hash()
ksmbd: validate zero num_subauth before sub_auth is accessed
ksmbd: fix overflow in dacloffset bounds check
ksmbd: fix session use-after-free in multichannel connection
Diffstat (limited to 'fs/smb/server/auth.c')
| -rw-r--r-- | fs/smb/server/auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/smb/server/auth.c b/fs/smb/server/auth.c index 00b31cf86462..83caa3849749 100644 --- a/fs/smb/server/auth.c +++ b/fs/smb/server/auth.c @@ -1016,9 +1016,9 @@ static int ksmbd_get_encryption_key(struct ksmbd_work *work, __u64 ses_id, ses_enc_key = enc ? sess->smb3encryptionkey : sess->smb3decryptionkey; - if (enc) - ksmbd_user_session_get(sess); memcpy(key, ses_enc_key, SMB3_ENC_DEC_KEY_SIZE); + if (!enc) + ksmbd_user_session_put(sess); return 0; } |
