linux/fs/smb/server
Hobin Woo e2e33caa5d ksmbd: discard write access to the directory open
may_open() does not allow a directory to be opened with the write access.
However, some writing flags set by client result in adding write access
on server, making ksmbd incompatible with FUSE file system. Simply, let's
discard the write access when opening a directory.

list_add corruption. next is NULL.
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:26!
pc : __list_add_valid+0x88/0xbc
lr : __list_add_valid+0x88/0xbc
Call trace:
__list_add_valid+0x88/0xbc
fuse_finish_open+0x11c/0x170
fuse_open_common+0x284/0x5e8
fuse_dir_open+0x14/0x24
do_dentry_open+0x2a4/0x4e0
dentry_open+0x50/0x80
smb2_open+0xbe4/0x15a4
handle_ksmbd_work+0x478/0x5ec
process_one_work+0x1b4/0x448
worker_thread+0x25c/0x430
kthread+0x104/0x1d4
ret_from_fork+0x10/0x20

Cc: stable@vger.kernel.org
Signed-off-by: Yoonho Shin <yoonho.shin@samsung.com>
Signed-off-by: Hobin Woo <hobin.woo@samsung.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-07-05 09:56:13 -05:00
..
mgmt ksmbd: ignore trailing slashes in share paths 2024-05-22 18:26:29 -05:00
asn1.c ksmbd: validate mech token in session setup 2024-01-14 11:39:49 -06:00
asn1.h
auth.c ksmbd: auth: fix most kernel-doc warnings 2024-01-09 12:52:33 -06:00
auth.h
connection.c ksmbd: fix UAF issue in ksmbd_tcp_new_connection() 2024-01-14 11:39:49 -06:00
connection.h ksmbd: fix UAF issue in ksmbd_tcp_new_connection() 2024-01-14 11:39:49 -06:00
crypto_ctx.c
crypto_ctx.h
glob.h ksmbd: remove module version 2024-03-18 21:21:38 -05:00
Kconfig ksmbd: remove experimental warning 2023-09-03 21:06:36 -05:00
ksmbd_netlink.h ksmbd: add continuous availability share parameter 2024-04-19 20:48:47 -05:00
ksmbd_spnego_negtokeninit.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
ksmbd_spnego_negtokentarg.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
ksmbd_work.c ksmbd: release interim response after sending status pending response 2023-11-23 20:50:45 -06:00
ksmbd_work.h ksmbd: fix wrong interim response on compound 2023-08-29 12:30:19 -05:00
Makefile
misc.c ksmbd: Add kernel-doc for ksmbd_extract_sharename() function 2024-02-07 20:23:37 -06:00
misc.h
ndr.c
ndr.h
nterr.h
ntlmssp.h
oplock.c ksmbd: avoid to send duplicate oplock break notifications 2024-05-12 16:53:16 -05:00
oplock.h ksmbd: add support for durable handles v1/v2 2024-03-12 00:36:39 -05:00
server.c ksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf 2024-04-19 20:48:47 -05:00
server.h
smb2misc.c ksmbd: fix potencial out-of-bounds when buffer offset is invalid 2024-03-18 21:21:33 -05:00
smb2ops.c ksmbd: do not set SMB2_GLOBAL_CAP_ENCRYPTION for SMB 3.1.1 2024-04-02 09:21:25 -05:00
smb2pdu.c ksmbd: discard write access to the directory open 2024-07-05 09:56:13 -05:00
smb2pdu.h smb: smb2pdu.h: Avoid -Wflex-array-member-not-at-end warnings 2024-05-13 16:46:56 -05:00
smb_common.c ksmbd: use rwsem instead of rwlock for lease break 2024-05-04 23:53:36 -05:00
smb_common.h ksmbd: fix out of bounds in init_smb2_rsp_hdr() 2023-07-23 10:25:11 -05:00
smbacl.c ksmbd: free ppace array on error in parse_dacl 2024-01-09 19:27:36 -06:00
smbacl.h ksmbd: fix possible deadlock in smb2_open 2023-11-23 20:50:45 -06:00
smbfsctl.h
smbstatus.h
transport_ipc.c ksmbd: validate payload size in ipc response 2024-04-02 09:21:01 -05:00
transport_ipc.h
transport_rdma.c ksmbd: fix UAF issue in ksmbd_tcp_new_connection() 2024-01-14 11:39:49 -06:00
transport_rdma.h
transport_tcp.c ksmbd: off ipv6only for both ipv4/ipv6 binding 2024-05-04 23:53:35 -05:00
transport_tcp.h
unicode.c ksmbd: add support for surrogate pair conversion 2023-10-22 19:06:27 -05:00
unicode.h fs/smb: Swing unicode common code from smb->NLS 2023-08-30 08:55:51 -05:00
vfs_cache.c ksmbd: fix missing use of get_write in in smb2_set_ea() 2024-06-11 23:43:09 -05:00
vfs_cache.h ksmbd: use rwsem instead of rwlock for lease break 2024-05-04 23:53:36 -05:00
vfs.c ksmbd: fix missing use of get_write in in smb2_set_ea() 2024-06-11 23:43:09 -05:00
vfs.h ksmbd: fix missing use of get_write in in smb2_set_ea() 2024-06-11 23:43:09 -05:00
xattr.h