linux/fs
wangzijie ff7ec8dc1b proc: use the same treatment to check proc_lseek as ones for proc_read_iter et.al
Check pde->proc_ops->proc_lseek directly may cause UAF in rmmod scenario. 
It's a gap in proc_reg_open() after commit 654b33ada4ab("proc: fix UAF in
proc_get_inode()").  Followed by AI Viro's suggestion, fix it in same
manner.

Link: https://lkml.kernel.org/r/20250607021353.1127963-1-wangzijie1@honor.com
Fixes: 3f61631d47 ("take care to handle NULL ->proc_lseek()")
Signed-off-by: wangzijie <wangzijie1@honor.com>
Reviewed-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Cc: Kirill A. Shuemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-07-09 22:42:01 -07:00
..
9p vfs-6.16-rc1.netfs 2025-06-02 15:04:06 -07:00
adfs
affs
afs vfs-6.16-rc1.netfs 2025-06-02 15:04:06 -07:00
autofs
bcachefs bcachefs: opts.casefold_disabled 2025-07-01 19:33:46 -04:00
befs
bfs
btrfs for-6.16-rc4-tag 2025-07-03 13:29:56 -07:00
cachefiles vfs-6.16-rc1.netfs 2025-06-02 15:04:06 -07:00
ceph A one-liner that leads to a startling (but also very much rational) 2025-06-06 17:56:19 -07:00
coda
configfs - The 3 patch series "hung_task: extend blocking task stacktrace dump to 2025-05-31 19:12:53 -07:00
cramfs
crypto
debugfs
devpts
dlm treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ecryptfs
efivarfs vfs-6.16-rc1.super 2025-05-26 09:33:44 -07:00
efs
erofs erofs: remove a superfluous check for encoded extents 2025-06-20 23:41:12 +08:00
exfat exfat: do not clear volume dirty flag during sync 2025-05-26 20:25:23 +09:00
exportfs readdir: supply dir_context.count as readdir buffer size hint 2025-05-29 12:31:23 +02:00
ext2
ext4 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
f2fs f2fs: fix to zero post-eof page 2025-06-18 21:35:29 +00:00
fat
freevxfs
fuse mm: remove the for_reclaim field from struct writeback_control 2025-07-09 22:41:58 -07:00
gfs2 gfs2: Don't clear sb->s_fs_info in gfs2_sys_fs_add 2025-05-30 19:20:20 +02:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs
iomap iomap: don't lose folio dropbehind state for overwrites 2025-05-28 09:26:07 +02:00
isofs
jbd2 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
jffs2 jffs2: check jffs2_prealloc_raw_node_refs() result in few other places 2025-05-22 20:54:38 +02:00
jfs - The 11 patch series "Add folio_mk_pte()" from Matthew Wilcox 2025-05-31 15:44:16 -07:00
kernfs Driver core changes for 6.16-rc1 2025-05-29 09:11:39 -07:00
lockd
minix
netfs netfs: Update tracepoints in a number of ways 2025-07-01 22:37:14 +02:00
nfs mm: remove the for_reclaim field from struct writeback_control 2025-07-09 22:41:58 -07:00
nfs_common nfs_localio: change nfsd_file_put_local() to take a pointer to __rcu pointer 2025-05-28 17:17:14 -04:00
nfsd nfsd-6.16 fixes: 2025-06-21 09:20:15 -07:00
nilfs2 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
nls
notify \n 2025-05-29 10:34:26 -07:00
ntfs3 - The 2 patch series "zram: support algorithm-specific parameters" from 2025-06-02 16:00:26 -07:00
ocfs2 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
omfs
openpromfs
orangefs orangefs: Convert to use the new mount API 2025-05-28 12:05:30 -07:00
overlayfs vfs-6.16-rc3.fixes 2025-06-16 08:18:43 -07:00
proc proc: use the same treatment to check proc_lseek as ones for proc_read_iter et.al 2025-07-09 22:42:01 -07:00
pstore
qnx4
qnx6
quota
ramfs
resctrl x86,fs/resctrl: Remove inappropriate references to cacheinfo in the resctrl subsystem 2025-06-16 21:06:12 +02:00
romfs
smb five smb3 client fixes 2025-07-05 13:05:28 -07:00
squashfs squashfs: add optional full compressed block caching 2025-05-27 19:40:33 -07:00
sysfs
tests
tracefs
ubifs This pull request contains the following fixes for JFFS2 and UBIFS: 2025-06-07 07:24:07 -07:00
udf
ufs
unicode
vboxsf
verity
xfs xfs: add FALLOC_FL_ALLOCATE_RANGE to supported flags mask 2025-06-30 14:16:13 +02:00
zonefs
Kconfig fs/resctrl: Add boiler plate for external resctrl code 2025-05-16 11:05:40 +02:00
Kconfig.binfmt
Makefile fs/resctrl: Add boiler plate for external resctrl code 2025-05-16 11:05:40 +02:00
aio.c
anon_inodes.c fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass 2025-06-23 12:41:17 +02:00
attr.c
backing-file.c
bad_inode.c
binfmt_elf.c vfs-6.16-rc1.misc 2025-05-26 09:02:39 -07:00
binfmt_elf_fdpic.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
bpf_fs_kfuncs.c
buffer.c vfs-6.16-rc1.writepage 2025-05-26 08:23:09 -07:00
char_dev.c
compat_binfmt_elf.c
coredump.c coredump: validate socket name as it is written 2025-05-21 13:59:12 +02:00
d_path.c
dax.c vfs-6.16-rc2.fixes 2025-06-02 12:49:16 -07:00
dcache.c vfs-6.16-rc1.misc 2025-05-26 09:02:39 -07:00
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c eventpoll: Fix priority inversion problem 2025-07-01 22:31:51 +02:00
exec.c anon_inode: rework assertions 2025-07-02 14:41:39 +02:00
fcntl.c
fhandle.c
file.c fs: drop assert in file_seek_cur_needs_f_lock 2025-06-16 09:59:24 +02:00
file_table.c
filesystems.c
fs-writeback.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c
inode.c
internal.h vfs-6.16-rc1.super 2025-05-26 09:33:44 -07:00
ioctl.c vfs-6.16-rc1.super 2025-05-26 09:33:44 -07:00
kernel_read_file.c
libfs.c anon_inode: rework assertions 2025-07-02 14:41:39 +02:00
locks.c
mbcache.c
mnt_idmapping.c
mount.h Don't propagate mounts into detached trees 2025-05-26 17:35:32 -04:00
mpage.c
namei.c vfs-6.16-rc5.fixes 2025-07-04 09:06:49 -07:00
namespace.c userns and mnt_idmap leak in open_tree_attr(2) 2025-06-24 10:25:04 -04:00
nsfs.c
open.c
pidfs.c pidfs: never refuse ppid == 0 in PIDFD_GET_INFO 2025-06-04 22:48:32 +02:00
pipe.c
pnode.c Don't propagate mounts into detached trees 2025-05-26 17:35:32 -04:00
pnode.h replace collect_mounts()/drop_collected_mounts() with a safer variant 2025-06-23 14:01:49 -04:00
posix_acl.c
proc_namespace.c ->mnt_devname is never NULL 2025-05-23 14:20:44 +02:00
read_write.c
readdir.c readdir: supply dir_context.count as readdir buffer size hint 2025-05-29 12:31:23 +02:00
remap_range.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c xfs: New code for 6.16 2025-05-26 12:56:01 -07:00
statfs.c
super.c fs: unlock the superblock during iterate_supers_type 2025-06-12 14:27:39 +02:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c userfaultfd: remove UFFD_CLOEXEC, UFFD_NONBLOCK, and UFFD_FLAGS_SET 2025-07-09 22:42:01 -07:00
utimes.c
xattr.c fs/xattr.c: fix simple_xattr_list() 2025-06-06 10:00:17 +02:00