fs/smb/client: Reset password pointer to NULL
commit e6e43b8aa7cd3c3af686caf0c2e11819a886d705 upstream.
Forget to reset ctx->password to NULL will lead to bug like double free
BUG=b/303612842
TEST=presubmit
RELEASE_NOTE=Fix CVE-2023-5345 in COS kernel.
cos-patch: security-high
Cc: stable@vger.kernel.org
Cc: Willy Tarreau <w@1wt.eu>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Change-Id: I38bc17e1db61a3e0094882a180b170196eee22d4
Signed-off-by: Quang Le <quanglex97@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Nandhini Rengaraj <nrengaraj@google.com>
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/58914
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Oleksandr Tymoshenko <ovt@google.com>
1 file changed