WSL2-Linux-Kernel/fs/cifs
Thiago Rafael Becker a31080899d cifs: sanitize multiple delimiters in prepath
mount.cifs can pass a device with multiple delimiters in it. This will
cause rename(2) to fail with ENOENT.

V2:
  - Make sanitize_path more readable.
  - Fix multiple delimiters between UNC and prepath.
  - Avoid a memory leak if a bad user starts putting a lot of delimiters
    in the path on purpose.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2031200
Fixes: 24e0a1eff9 ("cifs: switch to new mount api")
Cc: stable@vger.kernel.org # 5.11+
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Thiago Rafael Becker <trbecker@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2021-12-17 19:16:49 -06:00
..
Kconfig
Makefile
asn1.c
cache.c
cifs_debug.c cifs: connect individual channel servers to primary channel server 2021-11-12 20:27:06 -06:00
cifs_debug.h
cifs_dfs_ref.c cifs: support nested dfs links over reconnect 2021-11-10 16:30:13 -06:00
cifs_fs_sb.h cifs: support nested dfs links over reconnect 2021-11-10 16:30:13 -06:00
cifs_ioctl.h
cifs_spnego.c
cifs_spnego.h
cifs_spnego_negtokeninit.asn1
cifs_swn.c cifs: introduce cifs_ses_mark_for_reconnect() helper 2021-11-16 10:57:08 -06:00
cifs_swn.h
cifs_unicode.c
cifs_unicode.h
cifs_uniupr.h
cifsacl.c
cifsacl.h
cifsencrypt.c
cifsfs.c cifs: Create a new shared file holding smb2 pdu definitions 2021-11-05 09:50:57 -05:00
cifsfs.h cifs: update internal version number 2021-11-23 10:07:15 -06:00
cifsglob.h cifs: connect individual channel servers to primary channel server 2021-11-12 20:27:06 -06:00
cifspdu.h
cifsproto.h cifs: introduce cifs_ses_mark_for_reconnect() helper 2021-11-16 10:57:08 -06:00
cifsroot.c
cifssmb.c
connect.c cifs: ignore resource_id while getting fscache super cookie 2021-12-17 19:09:06 -06:00
dfs_cache.c cifs: introduce cifs_ses_mark_for_reconnect() helper 2021-11-16 10:57:08 -06:00
dfs_cache.h
dir.c
dns_resolve.c
dns_resolve.h
export.c
file.c smb3: do not error on fsync when readonly 2021-11-10 16:28:27 -06:00
fs_context.c cifs: sanitize multiple delimiters in prepath 2021-12-17 19:16:49 -06:00
fs_context.h cifs: send workstation name during ntlmssp session setup 2021-11-08 13:07:56 -06:00
fscache.c cifs: avoid use of dstaddr as key for fscache client cookie 2021-12-03 12:38:25 -06:00
fscache.h
inode.c cifs: ignore resource_id while getting fscache super cookie 2021-12-17 19:09:06 -06:00
ioctl.c
link.c
misc.c cifs: protect session channel fields with chan_lock 2021-11-12 16:22:20 -06:00
netlink.c
netlink.h
netmisc.c
nterr.c
nterr.h
ntlmssp.h cifs: send workstation name during ntlmssp session setup 2021-11-08 13:07:56 -06:00
readdir.c
rfc1002pdu.h
sess.c cifs: fix ntlmssp auth when there is no key exchange 2021-12-08 16:48:43 -06:00
smb1ops.c
smb2file.c
smb2glob.h
smb2inode.c cifs: for compound requests, use open handle if possible 2021-11-10 11:05:20 -06:00
smb2maperror.c cifs: Create a new shared file holding smb2 pdu definitions 2021-11-05 09:50:57 -05:00
smb2misc.c cifs: Move SMB2_Create definitions to the shared area 2021-11-05 09:55:36 -05:00
smb2ops.c cifs: support nested dfs links over reconnect 2021-11-10 16:30:13 -06:00
smb2pdu.c smb2: clarify rc initialization in smb2_reconnect 2021-11-23 10:07:00 -06:00
smb2pdu.h cifs: Move SMB2_Create definitions to the shared area 2021-11-05 09:55:36 -05:00
smb2proto.h cifs: Create a new shared file holding smb2 pdu definitions 2021-11-05 09:50:57 -05:00
smb2status.h
smb2transport.c cifs: Create a new shared file holding smb2 pdu definitions 2021-11-05 09:50:57 -05:00
smbdirect.c
smbdirect.h
smbencrypt.c
smberr.h
trace.c
trace.h smb3: add dynamic trace points for socket connection 2021-11-05 16:20:24 -05:00
transport.c cifs: protect session channel fields with chan_lock 2021-11-12 16:22:20 -06:00
unc.c
winucase.c
xattr.c