]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: fix potential UAF in cifs_dump_full_key()
authorPaulo Alcantara <pc@manguebit.com>
Tue, 2 Apr 2024 19:33:54 +0000 (16:33 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:20 +0000 (07:44 +0200)
commitd798fd98e3563027c5162259ead517057d6fa794
tree09c0c1713b53438fd23940491ecd45a4d387f9f0
parentd54fdcf171f0b7d7a9dbeaadd85273b89e6c513d
smb: client: fix potential UAF in cifs_dump_full_key()

commit 58acd1f497162e7d282077f816faa519487be045 upstream.

Skip sessions that are being teared down (status == SES_EXITING) to
avoid UAF.

Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
[ This patch removes lock/unlock operation in routine cifs_dump_full_key()
  for ses_lock is not present in v5.15 and not ported yet. ses->status
  is protected by a global lock, cifs_tcp_ses_lock, in v5.15.  ]
Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/ioctl.c