[v6.6] KASAN: slab-out-of-bounds Read in reiserfs_xattr_get

1 view
Skip to first unread message

syzbot

unread,
Sep 25, 2025, 6:35:34 AM (yesterday) Sep 25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 147338df3487 Linux 6.6.108
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1602ace2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=12606d4b8832c7e4
dashboard link: https://syzkaller.appspot.com/bug?extid=8a0ce79f5ba7dc0aaa07
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/23d0a7436789/disk-147338df.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5658c8bd0cce/vmlinux-147338df.xz
kernel image: https://storage.googleapis.com/syzbot-assets/be243abccdbe/bzImage-147338df.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8a0ce7...@syzkaller.appspotmail.com

loop6: detected capacity change from 0 to 32768
==================================================================
BUG: KASAN: slab-out-of-bounds in reiserfs_xattr_get+0xfe/0x5a0 fs/reiserfs/xattr.c:676
Read of size 8 at addr ffff88802519b598 by task syz.6.16199/11041

CPU: 1 PID: 11041 Comm: syz.6.16199 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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/0x220 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
reiserfs_xattr_get+0xfe/0x5a0 fs/reiserfs/xattr.c:676
reiserfs_get_acl+0x7e/0x6a0 fs/reiserfs/xattr_acl.c:215
__get_acl+0x26d/0x3f0 fs/posix_acl.c:160
check_acl+0x3a/0x150 fs/namei.c:310
acl_permission_check fs/namei.c:355 [inline]
generic_permission+0x381/0x590 fs/namei.c:408
do_inode_permission fs/namei.c:462 [inline]
inode_permission+0x23d/0x480 fs/namei.c:529
may_open+0x2e9/0x440 fs/namei.c:3260
do_open fs/namei.c:3630 [inline]
path_openat+0x25e4/0x3190 fs/namei.c:3789
do_filp_open+0x1c5/0x3d0 fs/namei.c:3816
do_sys_openat2+0x12c/0x1c0 fs/open.c:1419
do_sys_open fs/open.c:1434 [inline]
__do_sys_openat fs/open.c:1450 [inline]
__se_sys_openat fs/open.c:1445 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1445
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:0x7f5ca558d710
Code: 48 89 44 24 20 75 93 44 89 54 24 0c e8 69 95 02 00 44 8b 54 24 0c 89 da 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 38 44 89 c7 89 44 24 0c e8 bc 95 02 00 8b 44
RSP: 002b:00007f5ca37f5df0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000010000 RCX: 00007f5ca558d710
RDX: 0000000000010000 RSI: 0000200000000040 RDI: 00000000ffffff9c
RBP: 0000200000000040 R08: 0000000000000000 R09: 0000000001010006
R10: 0000000000000000 R11: 0000000000000293 R12: 0000200000000040
R13: 00007f5ca37f5eb0 R14: 000000000000628f R15: 0000200000000300
</TASK>

Allocated by task 11041:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:198 [inline]
__do_kmalloc_node mm/slab_common.c:1007 [inline]
__kmalloc+0xb4/0x240 mm/slab_common.c:1020
kmalloc_array include/linux/slab.h:637 [inline]
kcalloc include/linux/slab.h:668 [inline]
__list_lru_init+0xa6/0x5f0 mm/list_lru.c:571
alloc_super+0x779/0x920 fs/super.c:395
sget+0x1ce/0x4d0 fs/super.c:897
mount_bdev+0xec/0x2d0 fs/super.c:1623
legacy_get_tree+0xea/0x180 fs/fs_context.c:662
vfs_get_tree+0x8c/0x280 fs/super.c:1764
do_new_mount+0x24b/0xa40 fs/namespace.c:3377
do_mount fs/namespace.c:3717 [inline]
__do_sys_mount fs/namespace.c:3926 [inline]
__se_sys_mount+0x2da/0x3c0 fs/namespace.c:3903
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

Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
kvfree_call_rcu+0xee/0x780 kernel/rcu/tree.c:3452
drop_sysctl_table+0x356/0x4b0 fs/proc/proc_sysctl.c:1515
drop_sysctl_table+0x36d/0x4b0 fs/proc/proc_sysctl.c:1518
unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1536
mpls_dev_sysctl_unregister+0x8b/0xc0 net/mpls/af_mpls.c:1431
mpls_dev_notify+0x533/0x7a0 net/mpls/af_mpls.c:1643
notifier_call_chain+0x197/0x390 kernel/notifier.c:93
call_netdevice_notifiers_extack net/core/dev.c:2064 [inline]
call_netdevice_notifiers net/core/dev.c:2078 [inline]
unregister_netdevice_many_notify+0xf36/0x1810 net/core/dev.c:11086
rtnl_delete_link net/core/rtnetlink.c:3259 [inline]
rtnl_dellink+0x43c/0x730 net/core/rtnetlink.c:3311
rtnetlink_rcv_msg+0x7c7/0xf10 net/core/rtnetlink.c:6475
netlink_rcv_skb+0x216/0x480 net/netlink/af_netlink.c:2545
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x8c1/0xbe0 net/netlink/af_netlink.c:1894
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
____sys_sendmsg+0x5bf/0x950 net/socket.c:2595
___sys_sendmsg+0x220/0x290 net/socket.c:2649
__sys_sendmsg net/socket.c:2678 [inline]
__do_sys_sendmsg net/socket.c:2687 [inline]
__se_sys_sendmsg+0x1a5/0x270 net/socket.c:2685
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

The buggy address belongs to the object at ffff88802519b400
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 152 bytes to the right of
allocated 256-byte region [ffff88802519b400, ffff88802519b500)

The buggy address belongs to the physical page:
page:ffffea0000946680 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2519a
head:ffffea0000946680 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888017841b40 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5954, tgid 5954 (syz-executor), ts 84941724259, free_ts 84901276700
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
prep_new_page mm/page_alloc.c:1561 [inline]
get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
__alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
alloc_slab_page+0x5d/0x170 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2e0 mm/slub.c:2081
___slab_alloc+0xc6d/0x1300 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
__kmem_cache_alloc_node+0x1a2/0x260 mm/slub.c:3534
__do_kmalloc_node mm/slab_common.c:1006 [inline]
__kmalloc+0xa4/0x240 mm/slab_common.c:1020
kmalloc include/linux/slab.h:604 [inline]
kzalloc include/linux/slab.h:721 [inline]
new_dir fs/proc/proc_sysctl.c:969 [inline]
get_subdir fs/proc/proc_sysctl.c:1013 [inline]
sysctl_mkdir_p fs/proc/proc_sysctl.c:1308 [inline]
__register_sysctl_table+0xac9/0x1240 fs/proc/proc_sysctl.c:1389
neigh_sysctl_register+0x9cc/0xab0 net/core/neighbour.c:3870
devinet_sysctl_register+0xa8/0x1f0 net/ipv4/devinet.c:2670
inetdev_init+0x2b4/0x4f0 net/ipv4/devinet.c:287
inetdev_event+0x308/0x15c0 net/ipv4/devinet.c:1568
notifier_call_chain+0x197/0x390 kernel/notifier.c:93
call_netdevice_notifiers_extack net/core/dev.c:2064 [inline]
call_netdevice_notifiers net/core/dev.c:2078 [inline]
register_netdevice+0x160c/0x1ae0 net/core/dev.c:10313
wg_newlink+0x48a/0x720 drivers/net/wireguard/device.c:373
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1154 [inline]
free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429
__slab_free+0x35e/0x410 mm/slub.c:3736
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767
slab_alloc_node mm/slub.c:3495 [inline]
__kmem_cache_alloc_node+0x13e/0x260 mm/slub.c:3534
kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098
kmalloc include/linux/slab.h:600 [inline]
kzalloc include/linux/slab.h:721 [inline]
kobject_uevent_env+0x274/0x8c0 lib/kobject_uevent.c:539
__kobject_del+0xd2/0x300 lib/kobject.c:601
kobject_cleanup lib/kobject.c:680 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x239/0x470 lib/kobject.c:737
netdev_queue_update_kobjects+0x3ed/0x480 net/core/net-sysfs.c:1760
netif_set_real_num_tx_queues+0x183/0x8e0 net/core/dev.c:2969
veth_init_queues+0x83/0x180 drivers/net/veth.c:1797
veth_newlink+0x9a9/0xc30 drivers/net/veth.c:1920

Memory state around the buggy address:
ffff88802519b480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88802519b500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88802519b580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88802519b600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88802519b680: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
==================================================================


---
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
Reply all
Reply to author
Forward
0 new messages