==================================================================
BUG: KASAN: global-out-of-bounds in kernfs_root fs/kernfs/kernfs-internal.h:72 [inline]
BUG: KASAN: global-out-of-bounds in kernfs_remove_by_name_ns+0x6b/0x150 fs/kernfs/dir.c:1689
Read of size 8 at addr ffffffff8e2ba5b8 by task syz.0.2623/15764
CPU: 0 PID: 15764 Comm: syz.0.2623 Not tainted 6.6.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
<TASK>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xac/0x200 mm/kasan/report.c:466
kasan_report+0x117/0x150 mm/kasan/report.c:579
kernfs_root fs/kernfs/kernfs-internal.h:72 [inline]
kernfs_remove_by_name_ns+0x6b/0x150 fs/kernfs/dir.c:1689
remove_bind_files drivers/base/bus.c:602 [inline]
bus_remove_driver+0x193/0x2f0 drivers/base/bus.c:740
comedi_device_detach+0x131/0x6f0 drivers/comedi/drivers.c:206
do_devconfig_ioctl drivers/comedi/comedi_fops.c:833 [inline]
comedi_unlocked_ioctl+0xbd0/0xf90 drivers/comedi/comedi_fops.c:2156
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f577558e9a9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f577636e038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f57757b5fa0 RCX: 00007f577558e9a9
RDX: 0000000000000000 RSI: 0000000040946400 RDI: 0000000000000003
RBP: 00007f5775610d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f57757b5fa0 R15: 00007ffda4b03c68
</TASK>
The buggy address belongs to the variable:
net_sysctl_root+0x78/0xa0
The buggy address belongs to the physical page:
page:ffffea000038ae80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe2ba
flags: 0xfff00000004000(reserved|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000004000 ffffea000038ae88 ffffea000038ae88 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)
Memory state around the buggy address:
ffffffff8e2ba480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffffff8e2ba500: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
>ffffffff8e2ba580: 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 00 00 00 00
^
ffffffff8e2ba600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffffff8e2ba680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================