==================================================================
BUG: KASAN: double-free in rcu_free_sheaf+0x1a/0xe0 mm/slub.c:6182
Free of addr ffff888029fffe80 by task udevd/5806
CPU: 3 UID: 0 PID: 5806 Comm: udevd Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report_invalid_free+0xb8/0x190 mm/kasan/report.c:557
check_slab_allocation+0xc3/0xf0 mm/kasan/common.c:246
kasan_slab_pre_free include/linux/kasan.h:199 [inline]
slab_free_hook mm/slub.c:2725 [inline]
__rcu_free_sheaf_prepare+0x117/0x300 mm/slub.c:3041
rcu_free_sheaf+0x1a/0xe0 mm/slub.c:6182
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x5f0/0x1220 kernel/rcu/tree.c:2919
handle_softirqs+0x216/0xa20 kernel/softirq.c:669
__do_softirq kernel/softirq.c:703 [inline]
invoke_softirq kernel/softirq.c:542 [inline]
__irq_exit_rcu+0x178/0x220 kernel/softirq.c:786
irq_exit_rcu+0x9/0x30 kernel/softirq.c:809
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:__sanitizer_cov_trace_pc+0x6b/0x70 kernel/kcov.c:241
Code: 82 18 17 00 00 83 f8 02 75 20 48 8b 8a 20 17 00 00 8b 92 1c 17 00 00 48 8b 01 48 83 c0 01 48 39 d0 73 07 48 89 01 48 89 34 c1 d0 b8 e2 09 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3
RSP: 0000:ffffc90004d96fa0 EFLAGS: 00000293
RAX: 0000000000000000 RBX: ffff88801f6f7180 RCX: 0000000000000000
RDX: ffff888027be4b00 RSI: ffffffff828f0e31 RDI: ffff88801fa89d80
RBP: ffffc90004d97190 R08: 000000005bdc82f9 R09: 0000000000000007
R10: 0000000000000200 R11: 0000000000000001 R12: 0000000000000000
R13: ffffc90004d972a8 R14: ffff88801fa89d80 R15: 0000000000000000
page_counter_calculate_protection+0x31/0x730 mm/page_counter.c:458
shrink_node_memcgs mm/vmscan.c:6413 [inline]
shrink_node+0x45d/0x4410 mm/vmscan.c:6482
shrink_zones mm/vmscan.c:6701 [inline]
do_try_to_free_pages+0x2da/0x1500 mm/vmscan.c:6763
try_to_free_pages+0x2a0/0x740 mm/vmscan.c:7002
__perform_reclaim mm/page_alloc.c:4448 [inline]
__alloc_pages_direct_reclaim mm/page_alloc.c:4471 [inline]
__alloc_pages_slowpath mm/page_alloc.c:4967 [inline]
__alloc_frozen_pages_noprof+0x1057/0x31e0 mm/page_alloc.c:5510
alloc_pages_mpol+0x201/0x560 mm/mempolicy.c:2513
folio_alloc_mpol_noprof+0x36/0x260 mm/mempolicy.c:2532
__swap_cache_alloc mm/swap_state.c:458 [inline]
__swap_cache_alloc_folio+0x3d7/0xc50 mm/swap_state.c:550
swap_cache_read_folio+0x47/0x150 mm/swap_state.c:714
swap_cache_read_folio_sync mm/swap_state.c:800 [inline]
swap_cluster_readahead+0x477/0x5d0 mm/swap_state.c:922
swapin_readahead+0xf0/0x260 mm/swap_state.c:1061
do_swap_page+0xf98/0x54a0 mm/memory.c:5083
handle_pte_fault mm/memory.c:6668 [inline]
__handle_mm_fault+0x190a/0x2f40 mm/memory.c:6817
handle_mm_fault+0x363/0xa30 mm/memory.c:6984
do_user_addr_fault+0x59c/0x12f0 arch/x86/mm/fault.c:1343
handle_page_fault arch/x86/mm/fault.c:1483 [inline]
exc_page_fault+0x6f/0xd0 arch/x86/mm/fault.c:1536
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595
RIP: 0033:0x7fc033ab98b6
Code: 2d 57 79 13 00 73 6d 0f b7 0c 6a 66 85 c9 74 64 48 8d 7d 10 48 8b 04 fa a8 0f 0f 85 44 02 00 00 48 89 c6 83 e9 01 48 c1 ee 0c <48> 33 30 48 89 34 fa 66 89 0c 6a 48 c7 40 08 00 00 00 00 48 83 c4
RSP: 002b:00007ffe9fa1b3a0 EFLAGS: 00010206
RAX: 000055cd57c42630 RBX: 0000000000000004 RCX: 0000000000000004
RDX: 000055cd57c37010 RSI: 000000055cd57c42 RDI: 0000000000000010
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: fffffffffffffea0
R13: 000055cd57c58550 R14: 0000000000000001 R15: 000055cd57c44e10
Allocated by task 5870:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:426
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x2f8/0x6d0 mm/slub.c:5680
_kmalloc_noprof include/linux/slab.h:991 [inline]
_kzalloc_noprof include/linux/slab.h:1312 [inline]
hwsim_update_pib.isra.0+0x53/0x410 drivers/net/ieee802154/mac802154_hwsim.c:103
hwsim_set_promiscuous_mode+0x14f/0x3a0 drivers/net/ieee802154/mac802154_hwsim.c:326
drv_set_promiscuous_mode+0x12e/0x330 net/mac802154/driver-ops.h:127
drv_start net/mac802154/driver-ops.h:167 [inline]
mac802154_scan_worker+0x689/0x1240 net/mac802154/scan.c:248
process_one_work+0xac7/0x1b10 kernel/workqueue.c:3495
process_scheduled_works kernel/workqueue.c:3578 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3659
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 5806:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:264 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2780 [inline]
__rcu_free_sheaf_prepare+0x5d/0x300 mm/slub.c:3041
rcu_free_sheaf+0x1a/0xe0 mm/slub.c:6182
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x5f0/0x1220 kernel/rcu/tree.c:2919
handle_softirqs+0x216/0xa20 kernel/softirq.c:669
__do_softirq kernel/softirq.c:703 [inline]
invoke_softirq kernel/softirq.c:542 [inline]
__irq_exit_rcu+0x178/0x220 kernel/softirq.c:786
irq_exit_rcu+0x9/0x30 kernel/softirq.c:809
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
The buggy address belongs to the object at ffff888029fffe80
which belongs to the cache kmalloc-64 of size 64
The buggy address is located 0 bytes inside of
64-byte region [ffff888029fffe80, ffff888029fffec0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29fff
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801d4428c0 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 8517869540
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1860
prep_new_page mm/page_alloc.c:1868 [inline]
get_page_from_freelist+0xdae/0x2c80 mm/page_alloc.c:3950
__alloc_frozen_pages_noprof+0x2ad/0x31e0 mm/page_alloc.c:5492
alloc_slab_page mm/slub.c:3384 [inline]
allocate_slab mm/slub.c:3499 [inline]
new_slab+0xb1/0x6d0 mm/slub.c:3550
refill_objects+0xe3/0x410 mm/slub.c:7539
refill_sheaf mm/slub.c:2917 [inline]
__pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811
alloc_from_pcs mm/slub.c:4887 [inline]
slab_alloc_node mm/slub.c:5021 [inline]
__kmalloc_cache_noprof+0x4ef/0x6d0 mm/slub.c:5676
_kmalloc_noprof include/linux/slab.h:991 [inline]
_kzalloc_noprof include/linux/slab.h:1312 [inline]
__component_add+0x51/0x610 drivers/base/component.c:735
usb_hub_create_port_device+0x4b0/0xe60 drivers/usb/core/port.c:806
hub_configure drivers/usb/core/hub.c:1744 [inline]
hub_probe.cold+0x2974/0x2ed9 drivers/usb/core/hub.c:2011
usb_probe_interface+0x386/0x980 drivers/usb/core/driver.c:399
call_driver_probe drivers/base/dd.c:629 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:707
__driver_probe_device+0x210/0x460 drivers/base/dd.c:869
driver_probe_device+0x4a/0x140 drivers/base/dd.c:899
__device_attach_driver+0x1df/0x320 drivers/base/dd.c:1027
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
page_owner free stack trace missing
Memory state around the buggy address:
ffff888029fffd80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc
ffff888029fffe00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
>ffff888029fffe80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
^
ffff888029ffff00: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc
ffff888029ffff80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 18 17 sbb %dl,(%rdi)
2: 00 00 add %al,(%rax)
4: 83 f8 02 cmp $0x2,%eax
7: 75 20 jne 0x29
9: 48 8b 8a 20 17 00 00 mov 0x1720(%rdx),%rcx
10: 8b 92 1c 17 00 00 mov 0x171c(%rdx),%edx
16: 48 8b 01 mov (%rcx),%rax
19: 48 83 c0 01 add $0x1,%rax
1d: 48 39 d0 cmp %rdx,%rax
20: 73 07 jae 0x29
22: 48 89 01 mov %rax,(%rcx)
25: 48 89 34 c1 mov %rsi,(%rcx,%rax,8)
* 29: e9 d0 b8 e2 09 jmp 0x9e2b8fe <-- trapping instruction
2e: 90 nop
2f: 90 nop
30: 90 nop
31: 90 nop
32: 90 nop
33: 90 nop
34: 90 nop
35: 90 nop
36: 90 nop
37: 90 nop
38: 90 nop
39: 90 nop
3a: 90 nop
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: f3 repz