Hello,
syzbot found the following issue on:
HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=12db8eb0580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=3ca28fba9b2e5c5
dashboard link:
https://syzkaller.appspot.com/bug?extid=5144a1ae0494ff0b7e91
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/3f2947e5e4dc/disk-c16c81c8.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/7034800fdaa8/vmlinux-c16c81c8.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/42337be7c213/Image-c16c81c8.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+5144a1...@syzkaller.appspotmail.com
loop2: detected capacity change from 0 to 32768
==================================================================
BUG: KASAN: slab-out-of-bounds in reiserfs_xattr_get+0xd0/0x598 fs/reiserfs/xattr.c:681
Read of size 8 at addr ffff0000c85a6b98 by task syz.2.6178/17400
CPU: 0 PID: 17400 Comm: syz.2.6178 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_address_description+0x7c/0x3f0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0x174/0x1e4 mm/kasan/report.c:451
__asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309
reiserfs_xattr_get+0xd0/0x598 fs/reiserfs/xattr.c:681
reiserfs_get_acl+0x94/0x638 fs/reiserfs/xattr_acl.c:214
get_acl+0x160/0x378 fs/posix_acl.c:153
check_acl+0x40/0x198 fs/namei.c:307
acl_permission_check fs/namei.c:352 [inline]
generic_permission+0x340/0x478 fs/namei.c:405
reiserfs_permission+0x74/0xa8 fs/reiserfs/xattr.c:961
do_inode_permission fs/namei.c:459 [inline]
inode_permission+0x1d0/0x3b4 fs/namei.c:526
may_open+0x290/0x3bc fs/namei.c:3232
do_open fs/namei.c:3606 [inline]
path_openat+0x1d7c/0x26cc fs/namei.c:3742
do_filp_open+0x1a8/0x3b4 fs/namei.c:3769
do_sys_openat2+0x128/0x3e0 fs/open.c:1253
do_sys_open fs/open.c:1269 [inline]
__do_sys_openat fs/open.c:1285 [inline]
__se_sys_openat fs/open.c:1280 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1280
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Allocated by task 4506:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc+0xbc/0xfc mm/kasan/common.c:513
__kasan_kmalloc+0x10/0x1c mm/kasan/common.c:522
kasan_kmalloc include/linux/kasan.h:264 [inline]
kmem_cache_alloc_trace+0x27c/0x47c mm/slub.c:3247
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
kset_create lib/kobject.c:982 [inline]
kset_create_and_add+0x60/0x15c lib/kobject.c:1025
register_queue_kobjects net/core/net-sysfs.c:1759 [inline]
netdev_register_kobject+0x18c/0x2d8 net/core/net-sysfs.c:2018
register_netdevice+0xdf8/0x12d4 net/core/dev.c:10365
veth_newlink+0x518/0xbd4 drivers/net/veth.c:1683
__rtnl_newlink net/core/rtnetlink.c:3521 [inline]
rtnl_newlink+0x10d0/0x1acc net/core/rtnetlink.c:3569
rtnetlink_rcv_msg+0xa74/0xdac net/core/rtnetlink.c:5647
netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2489
rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5665
netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1337
netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1905
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
__sys_sendto+0x388/0x4d0 net/socket.c:2063
__do_sys_sendto net/socket.c:2075 [inline]
__se_sys_sendto net/socket.c:2071 [inline]
__arm64_sys_sendto+0xd8/0xf8 net/socket.c:2071
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Last potentially related work creation:
kasan_save_stack+0x38/0x68 mm/kasan/common.c:38
kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348
insert_work+0x64/0x394 kernel/workqueue.c:1366
__queue_work+0xb84/0x114c kernel/workqueue.c:1532
queue_work_on+0xc4/0x17c kernel/workqueue.c:1559
queue_work include/linux/workqueue.h:512 [inline]
call_usermodehelper_exec+0x238/0x484 kernel/umh.c:435
kobject_uevent_env+0x678/0x898 lib/kobject_uevent.c:633
kobject_uevent+0x2c/0x3c lib/kobject_uevent.c:657
driver_register+0x29c/0x374 drivers/base/driver.c:248
i2c_register_driver+0xb4/0x178 drivers/i2c/i2c-core-base.c:2018
vidtv_demod_i2c_driver_init+0x20/0x2c drivers/media/test-drivers/vidtv/vidtv_demod.c:460
do_one_initcall+0x234/0x990 init/main.c:1302
do_initcall_level+0x154/0x214 init/main.c:1375
do_initcalls+0x58/0xac init/main.c:1391
do_basic_setup+0x8c/0xa0 init/main.c:1410
kernel_init_freeable+0x460/0x640 init/main.c:1615
kernel_init+0x24/0x294 init/main.c:1506
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
The buggy address belongs to the object at ffff0000c85a6a00
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 152 bytes to the right of
256-byte region [ffff0000c85a6a00, ffff0000c85a6b00)
The buggy address belongs to the page:
page:00000000639df413 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1085a6
head:00000000639df413 order:1 compound_mapcount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 0000000000000000 0000000100000001 ffff0000c0002480
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000c85a6a80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000c85a6b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff0000c85a6b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff0000c85a6c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff0000c85a6c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup