Skip to content
Commit 6a54b2e0 authored by Christoph Probst's avatar Christoph Probst Committed by Steve French
Browse files

cifs: fix strcat buffer overflow and reduce raciness in smb21_set_oplock_level()



Change strcat to strncpy in the "None" case to fix a buffer overflow
when cinode->oplock is reset to 0 by another thread accessing the same
cinode. It is never valid to append "None" to any other message.

Consolidate multiple writes to cinode->oplock to reduce raciness.

Signed-off-by: default avatarChristoph Probst <kernel@probst.it>
Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
parent 26ea888f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment