linux-yocto/fs/cifs
Pali Rohár 80251a15ed cifs: Fix cifs_query_path_info() for Windows NT servers
[ Upstream commit a3e771afbb ]

For TRANS2 QUERY_PATH_INFO request when the path does not exist, the
Windows NT SMB server returns error response STATUS_OBJECT_NAME_NOT_FOUND
or ERRDOS/ERRbadfile without the SMBFLG_RESPONSE flag set. Similarly it
returns STATUS_DELETE_PENDING when the file is being deleted. And looks
like that any error response from TRANS2 QUERY_PATH_INFO does not have
SMBFLG_RESPONSE flag set.

So relax check in check_smb_hdr() for detecting if the packet is response
for this special case.

This change fixes stat() operation against Windows NT SMB servers and also
all operations which depends on -ENOENT result from stat like creat() or
mkdir().

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-10 15:57:31 +02:00
..
asn1.c
cache.c
cifs_debug.c smb: client: fix potential UAF in cifs_stats_proc_show() 2025-05-02 07:44:21 +02:00
cifs_debug.h
cifs_dfs_ref.c cifs: use fs_context for automounts 2023-08-03 10:22:29 +02:00
cifs_fs_sb.h cifs: support nested dfs links over reconnect 2022-12-02 17:40:59 +01:00
cifs_ioctl.h
cifs_spnego_negtokeninit.asn1
cifs_spnego.c cifs: spnego: add ';' in HOST_KEY_LEN 2023-11-28 16:56:25 +00:00
cifs_spnego.h
cifs_swn.c
cifs_swn.h
cifs_unicode.c
cifs_unicode.h
cifs_uniupr.h
cifsacl.c
cifsacl.h
cifsencrypt.c
cifsfs.c cifs: fix typo in module parameter enable_gcm_256 2024-07-05 09:14:40 +02:00
cifsfs.h cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL 2023-04-05 11:24:59 +02:00
cifsglob.h cifs: Fix UAF in cifs_demultiplex_thread() 2025-05-02 07:44:20 +02:00
cifspdu.h
cifsproto.h smb: client: fix potential deadlock when releasing mids 2025-05-02 07:44:21 +02:00
cifsroot.c
cifssmb.c cifs: prevent infinite recursion in CIFSGetDFSRefer() 2023-04-05 11:24:58 +02:00
connect.c cifs: print TIDs as hex 2025-05-02 07:44:27 +02:00
dfs_cache.c cifs: fix return of uninitialized rc in dfs_cache_update_tgthint() 2023-02-06 07:59:00 +01:00
dfs_cache.h
dir.c cifs: Fix xid leak in cifs_create() 2022-10-29 10:12:56 +02:00
dns_resolve.c
dns_resolve.h
export.c
file.c cifs: Release folio lock on fscache read hit. 2023-08-26 14:23:36 +02:00
fs_context.c cifs: fix integer overflow in match_server() 2025-05-02 07:44:27 +02:00
fs_context.h cifs: reinstate original behavior again for forceuid/forcegid 2024-05-02 16:24:43 +02:00
fscache.c
fscache.h
inode.c smb3: correct places where ENOTSUPP is used instead of preferred EOPNOTSUPP 2023-10-06 13:18:17 +02:00
ioctl.c smb: client: fix potential UAF in cifs_dump_full_key() 2025-05-02 07:44:20 +02:00
Kconfig
link.c cifs: Fix uninitialized memory read for smb311 posix symlink create 2023-01-18 11:48:49 +01:00
Makefile
misc.c cifs: Fix cifs_query_path_info() for Windows NT servers 2025-07-10 15:57:31 +02:00
netlink.c
netlink.h
netmisc.c
nterr.c
nterr.h
ntlmssp.h
readdir.c smb: client: Reset all search buffer pointers when releasing buffer 2025-06-04 14:38:07 +02:00
rfc1002pdu.h
sess.c cifs: Fix xid leak in cifs_ses_add_channel() 2022-10-29 10:12:56 +02:00
smb1ops.c SMB3: drop reference to cfile before sending oplock break 2023-05-24 17:36:54 +01:00
smb2file.c cifs: remove useless parameter 'is_fsctl' from SMB2_ioctl() 2024-03-01 13:21:53 +01:00
smb2glob.h
smb2inode.c cifs: Fix smb2_set_path_size() 2023-03-22 13:31:33 +01:00
smb2maperror.c
smb2misc.c cifs: avoid NULL pointer dereference in dbg call 2025-05-02 07:44:27 +02:00
smb2ops.c smb: client: fix UAF in async decryption 2025-05-02 07:44:21 +02:00
smb2pdu.c smb: client: fix NULL ptr deref in crypto_aead_setkey() 2025-05-02 07:44:21 +02:00
smb2pdu.h smb3: Replace smb2pdu 1-element arrays with flex-arrays 2024-02-23 08:55:15 +01:00
smb2proto.h cifs: remove useless parameter 'is_fsctl' from SMB2_ioctl() 2024-03-01 13:21:53 +01:00
smb2status.h
smb2transport.c smb: client: fix deadlock in smb2_find_smb_tcon() 2024-07-05 09:14:38 +02:00
smbdirect.c cifs: Fix warning and UAF when destroy the MR list 2023-03-10 09:39:32 +01:00
smbdirect.h
smbencrypt.c
smberr.h
trace.c
trace.h
transport.c smb: client: fix potential deadlock when releasing mids 2025-05-02 07:44:21 +02:00
unc.c
winucase.c
xattr.c smb3: fix caching of ctime on setxattr 2023-12-08 08:48:04 +01:00