]> git.ipfire.org Git - thirdparty/linux.git/commit
smb: client: fix oops due to uninitialised var in smb2_unlink()
authorPaulo Alcantara <pc@manguebit.org>
Fri, 6 Mar 2026 00:57:06 +0000 (21:57 -0300)
committerSteve French <stfrench@microsoft.com>
Fri, 6 Mar 2026 02:41:16 +0000 (20:41 -0600)
commit048efe129a297256d3c2088cf8d79515ff5ec864
treed9cc63ae7ceafcf562d77886f24174303b5876f8
parent340cea84f691c5206561bb2e0147158fe02070be
smb: client: fix oops due to uninitialised var in smb2_unlink()

If SMB2_open_init() or SMB2_close_init() fails (e.g. reconnect), the
iovs set @rqst will be left uninitialised, hence calling
SMB2_open_free(), SMB2_close_free() or smb2_set_related() on them will
oops.

Fix this by initialising @close_iov and @open_iov before setting them
in @rqst.

Reported-by: Thiago Becker <tbecker@redhat.com>
Fixes: 1cf9f2a6a544 ("smb: client: handle unlink(2) of files open by different clients")
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Cc: David Howells <dhowells@redhat.com>
Cc: linux-cifs@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2inode.c