WSL2-Linux-Kernel/fs/ksmbd
Namjae Jeon 3898d8d685 ksmbd: not allow to open file if delelete on close bit is set
[ Upstream commit f43328357d ]

Cthon test fail with the following error.

check for proper open/unlink operation
nfsjunk files before unlink:
  -rwxr-xr-x 1 root root 0  9월 25 11:03 ./nfs2y8Jm9
./nfs2y8Jm9 open; unlink ret = 0
nfsjunk files after unlink:
  -rwxr-xr-x 1 root root 0  9월 25 11:03 ./nfs2y8Jm9
data compare ok
nfsjunk files after close:
  ls: cannot access './nfs2y8Jm9': No such file or directory
special tests failed

Cthon expect to second unlink failure when file is already unlinked.
ksmbd can not allow to open file if flags of ksmbd inode is set with
S_DEL_ON_CLS flags.

Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-25 11:58:59 +02:00
..
mgmt ksmbd: fix racy issue while destroying session on multichannel 2023-05-17 11:50:28 +02:00
Kconfig
Makefile
asn1.c
asn1.h
auth.c ksmbd: fix deadlock in ksmbd_find_crypto_ctx() 2023-05-17 11:50:29 +02:00
auth.h ksmbd: fix racy issue while destroying session on multichannel 2023-05-17 11:50:28 +02:00
connection.c ksmbd: allocate one more byte for implied bcc[0] 2023-05-24 17:36:54 +01:00
connection.h ksmbd: fix racy issue while destroying session on multichannel 2023-05-17 11:50:28 +02:00
crypto_ctx.c
crypto_ctx.h
glob.h
ksmbd_netlink.h
ksmbd_spnego_negtokeninit.asn1
ksmbd_spnego_negtokentarg.asn1
ksmbd_work.c
ksmbd_work.h
misc.c
misc.h
ndr.c
ndr.h
nterr.h
ntlmssp.h
oplock.c ksmbd: fix wrong DataOffset validation of create context 2023-09-06 21:28:37 +01:00
oplock.h ksmbd: fix global-out-of-bounds in smb2_find_context_vals 2023-05-24 17:36:54 +01:00
server.c ksmbd: validate session id and tree id in the compound request 2023-07-23 13:47:39 +02:00
server.h
smb2misc.c ksmbd: validate command request size 2023-08-16 18:21:57 +02:00
smb2ops.c
smb2pdu.c ksmbd: fix uaf in smb20_oplock_break_ack 2023-10-10 21:59:09 +02:00
smb2pdu.h ksmbd: replace one-element array with flex-array member in struct smb2_ea_info 2023-09-06 21:28:37 +01:00
smb_common.c ksmbd: avoid field overflow warning 2023-07-23 13:47:18 +02:00
smb_common.h ksmbd: fix racy issue while destroying session on multichannel 2023-05-17 11:50:28 +02:00
smbacl.c
smbacl.h
smbfsctl.h
smbstatus.h
transport_ipc.c
transport_ipc.h
transport_rdma.c
transport_rdma.h
transport_tcp.c
transport_tcp.h
unicode.c
unicode.h
uniupr.h
vfs.c ksmbd: remove internal.h include 2023-08-03 10:22:30 +02:00
vfs.h
vfs_cache.c ksmbd: not allow to open file if delelete on close bit is set 2023-10-25 11:58:59 +02:00
vfs_cache.h
xattr.h