aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorShuhao Fu <[email protected]>2025-11-04 15:13:15 +0000
committerSteve French <[email protected]>2025-11-04 22:03:56 +0000
commitb540de9e3b4fab3b9e10f30714a6f5c1b2a50ec3 (patch)
tree59a6bd2a1c6b1b5d1d47bef5c55f0dfb993a2334 /lib/mpi/mpi-mod.c
parentsmb: client: fix potential UAF in smb2_close_cached_fid() (diff)
downloadkernel-b540de9e3b4fab3b9e10f30714a6f5c1b2a50ec3.tar.gz
kernel-b540de9e3b4fab3b9e10f30714a6f5c1b2a50ec3.zip
smb: client: fix refcount leak in smb2_set_path_attr
Fix refcount leak in `smb2_set_path_attr` when path conversion fails. Function `cifs_get_writable_path` returns `cfile` with its reference counter `cfile->count` increased on success. Function `smb2_compound_op` would decrease the reference counter for `cfile`, as stated in its comment. By calling `smb2_rename_path`, the reference counter of `cfile` would leak if `cifs_convert_path_to_utf16` fails in `smb2_set_path_attr`. Fixes: 8de9e86c67ba ("cifs: create a helper to find a writeable handle by path name") Acked-by: Henrique Carvalho <[email protected]> Signed-off-by: Shuhao Fu <[email protected]> Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions