mirror-linux/fs/smb/server
Namjae Jeon 55b51187d2 ksmbd: not allow to open file if delelete on close bit is set
commit f43328357d upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:56 +02:00
..
mgmt ksmbd: fix race condition between session lookup and expire 2023-10-10 22:00:45 +02:00
Kconfig
Makefile
asn1.c
asn1.h
auth.c ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob() 2023-09-06 21:26:59 +01:00
auth.h
connection.c ksmbd: fix race condition between session lookup and expire 2023-10-10 22:00:45 +02:00
connection.h ksmbd: fix race condition between session lookup and expire 2023-10-10 22:00:45 +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:26:59 +01:00
oplock.h
server.c ksmbd: fix out of bounds in init_smb2_rsp_hdr() 2023-09-13 09:42:21 +02:00
server.h
smb2misc.c ksmbd: validate command request size 2023-08-16 18:27:20 +02:00
smb2ops.c
smb2pdu.c ksmbd: fix uaf in smb20_oplock_break_ack 2023-10-10 22:00:45 +02:00
smb2pdu.h ksmbd: replace one-element array with flex-array member in struct smb2_ea_info 2023-09-06 21:26:59 +01:00
smb_common.c ksmbd: fix out of bounds in init_smb2_rsp_hdr() 2023-09-13 09:42:21 +02:00
smb_common.h ksmbd: fix out of bounds in init_smb2_rsp_hdr() 2023-09-13 09:42:21 +02:00
smbacl.c
smbacl.h
smbfsctl.h
smbstatus.h
transport_ipc.c
transport_ipc.h
transport_rdma.c ksmbd: reduce descriptor size if remaining bytes is less than request size 2023-09-06 21:26:59 +01:00
transport_rdma.h
transport_tcp.c
transport_tcp.h
unicode.c
unicode.h
uniupr.h
vfs.c
vfs.h
vfs_cache.c ksmbd: not allow to open file if delelete on close bit is set 2023-10-19 23:08:56 +02:00
vfs_cache.h
xattr.h