==================================================================
BUG: KASAN: double-free in rcu_free_sheaf+0x31/0x200 mm/slub.c:6061
Free of addr ffff888033e21600 by task syz.0.438/7746
CPU: 1 UID: 0 PID: 7746 Comm: syz.0.438 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report_invalid_free+0xea/0x110 mm/kasan/report.c:557
check_slab_allocation mm/kasan/common.c:-1 [inline]
__kasan_slab_pre_free+0x104/0x120 mm/kasan/common.c:272
kasan_slab_pre_free include/linux/kasan.h:199 [inline]
slab_free_hook mm/slub.c:2693 [inline]
__rcu_free_sheaf_prepare+0x10a/0x2a0 mm/slub.c:3009
rcu_free_sheaf+0x31/0x200 mm/slub.c:6061
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x92e/0x1230 kernel/rcu/tree.c:2919
handle_softirqs+0x265/0x8d0 kernel/softirq.c:669
do_softirq+0x77/0xd0 kernel/softirq.c:569
__local_bh_enable_ip+0x100/0x140 kernel/softirq.c:473
local_bh_enable include/linux/bottom_half.h:33 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:923 [inline]
__dev_queue_xmit+0x1efb/0x3920 net/core/dev.c:5101
dev_queue_xmit include/linux/netdevice.h:3483 [inline]
neigh_hh_output include/net/neighbour.h:538 [inline]
neigh_output include/net/neighbour.h:552 [inline]
ip_finish_output2+0xbda/0x10b0 net/ipv4/ip_output.c:236
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip_output+0x29f/0x450 net/ipv4/ip_output.c:437
ip_send_skb+0x45/0xc0 net/ipv4/ip_output.c:1528
udp_send_skb+0x7ed/0xf70 net/ipv4/udp.c:1184
udp_sendmsg+0x1971/0x2140 net/ipv4/udp.c:1466
sock_sendmsg_nosec+0x10f/0x190 net/socket.c:801
__sock_sendmsg net/socket.c:818 [inline]
____sys_sendmsg+0x54e/0x850 net/socket.c:2715
___sys_sendmsg+0x2a5/0x360 net/socket.c:2769
__sys_sendmmsg+0x273/0x4e0 net/socket.c:2858
__do_sys_sendmmsg net/socket.c:2885 [inline]
__se_sys_sendmmsg net/socket.c:2882 [inline]
__x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2882
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8abe99f559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8abc791028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f8abec26270 RCX: 00007f8abe99f559
RDX: 000000000800001d RSI: 0000200000007fc0 RDI: 0000000000000003
RBP: 00007f8abea36b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8abec26308 R14: 00007f8abec26270 R15: 00007ffff9133cf8
Allocated by task 1454:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:426
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x31c/0x600 mm/slub.c:5563
_kmalloc_noprof include/linux/slab.h:991 [inline]
_kzalloc_noprof include/linux/slab.h:1312 [inline]
hwsim_update_pib+0x7e/0x400 drivers/net/ieee802154/mac802154_hwsim.c:103
hwsim_set_promiscuous_mode+0x196/0x2e0 drivers/net/ieee802154/mac802154_hwsim.c:326
drv_set_promiscuous_mode+0x154/0x2d0 net/mac802154/driver-ops.h:127
drv_start+0x4db/0x1000 net/mac802154/driver-ops.h:167
mac802154_scan_worker+0x8e6/0xe60 net/mac802154/scan.c:248
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 15:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:264 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2748 [inline]
__rcu_free_sheaf_prepare+0x12d/0x2a0 mm/slub.c:3009
rcu_free_sheaf+0x31/0x200 mm/slub.c:6061
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x92e/0x1230 kernel/rcu/tree.c:2919
handle_softirqs+0x265/0x8d0 kernel/softirq.c:669
run_ksoftirqd+0x36/0x60 kernel/softirq.c:1133
smpboot_thread_fn+0x5f8/0xb30 kernel/smpboot.c:162
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888033e21600
which belongs to the cache kmalloc-64 of size 64
The buggy address is located 0 bytes inside of
64-byte region [ffff888033e21600, ffff888033e21640)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x33e21
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801c0418c0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5306, tgid 5306 (dhcpcd-run-hook), ts 51393676115
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
prep_new_page mm/page_alloc.c:1879 [inline]
get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
alloc_slab_page mm/slub.c:3347 [inline]
allocate_slab+0x7d/0x620 mm/slub.c:3462
new_slab mm/slub.c:3513 [inline]
refill_objects+0x2d5/0x350 mm/slub.c:7418
refill_sheaf mm/slub.c:2885 [inline]
__pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
alloc_from_pcs mm/slub.c:4850 [inline]
slab_alloc_node mm/slub.c:4984 [inline]
__do_kmalloc_node mm/slub.c:5413 [inline]
__kmalloc_noprof+0x476/0x710 mm/slub.c:5439
_kmalloc_noprof include/linux/slab.h:995 [inline]
_kzalloc_noprof include/linux/slab.h:1312 [inline]
tomoyo_encode2 security/tomoyo/realpath.c:45 [inline]
tomoyo_encode+0x2ad/0x570 security/tomoyo/realpath.c:80
tomoyo_realpath_from_path+0x5fa/0x640 security/tomoyo/realpath.c:283
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x283/0x560 security/tomoyo/file.c:827
security_inode_getattr+0x12b/0x310 security/security.c:1917
vfs_getattr fs/stat.c:263 [inline]
vfs_fstat fs/stat.c:285 [inline]
__do_sys_newfstat fs/stat.c:555 [inline]
__se_sys_newfstat+0x133/0x440 fs/stat.c:550
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5293 tgid 5293 ts 51365165036 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0xc93/0xd90 mm/page_alloc.c:2962
__kasan_populate_vmalloc_do mm/kasan/shadow.c:393 [inline]
__kasan_populate_vmalloc+0x1a8/0x1c0 mm/kasan/shadow.c:424
kasan_populate_vmalloc include/linux/kasan.h:580 [inline]
alloc_vmap_area+0xd10/0x1410 mm/vmalloc.c:2145
__get_vm_area_node+0x200/0x2f0 mm/vmalloc.c:3248
__vmalloc_node_range_noprof+0x343/0x1540 mm/vmalloc.c:4064
__vmalloc_node_noprof+0xc2/0x100 mm/vmalloc.c:4165
alloc_thread_stack_node kernel/fork.c:359 [inline]
dup_task_struct+0x2c6/0xa00 kernel/fork.c:930
copy_process+0x7ea/0x44b0 kernel/fork.c:2143
kernel_clone+0x2d7/0x940 kernel/fork.c:2785
__do_sys_clone3 kernel/fork.c:3088 [inline]
__se_sys_clone3+0x33c/0x360 kernel/fork.c:3067
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff888033e21500: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff888033e21580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff888033e21600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
^
ffff888033e21680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff888033e21700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
==================================================================