]> www.infradead.org Git - users/dwmw2/linux.git/commit
smb: client: guarantee refcounted children from parent session
authorPaulo Alcantara <pc@manguebit.com>
Tue, 2 Apr 2024 03:37:42 +0000 (22:37 -0500)
committerSteve French <stfrench@microsoft.com>
Tue, 2 Apr 2024 15:09:57 +0000 (10:09 -0500)
commit062a7f0ff46eb57aff526897bd2bebfdb1d3046a
treea65b2e2e9eb0cd89761ac42b93993765a2f2c23b
parente9e62243a3e2322cf639f653a0b0a88a76446ce7
smb: client: guarantee refcounted children from parent session

Avoid potential use-after-free bugs when walking DFS referrals,
mounting and performing DFS failover by ensuring that all children
from parent @tcon->ses are also refcounted.  They're all needed across
the entire DFS mount.  Get rid of @tcon->dfs_ses_list while we're at
it, too.

Cc: stable@vger.kernel.org # 6.4+
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404021527.ZlRkIxgv-lkp@intel.com/
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/cifsproto.h
fs/smb/client/connect.c
fs/smb/client/dfs.c
fs/smb/client/dfs.h
fs/smb/client/dfs_cache.c
fs/smb/client/misc.c