==================================================================
BUG: KASAN: double-free in rcu_free_sheaf+0x1a/0xe0 mm/slub.c:6182
Free of addr ffff888057a06d80 by task swapper/1/0
CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G L Y syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP, [Y]=FORCED_BIND
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:pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:64
Code: 77 a3 02 e9 43 61 03 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d c3 0d 20 00 fb f4 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
RSP: 0018:ffffc90000177e00 EFLAGS: 00000206
RAX: 0000000000221621 RBX: ffff888020692580 RCX: ffffffff8bebb325
RDX: 0000000000000001 RSI: ffffffff8e6212d7 RDI: ffffffff8c833580
RBP: ffffed10040d24b0 R08: 0000000000000001 R09: ffffed100d426825
R10: ffff88806a13412b R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000000 R14: 1ffff9200002efc4 R15: dffffc0000000000
arch_safe_halt arch/x86/include/asm/paravirt.h:62 [inline]
default_idle+0x9/0x10 arch/x86/kernel/process.c:768
default_idle_call+0x6c/0xb0 kernel/sched/idle.c:122
cpuidle_idle_call kernel/sched/idle.c:199 [inline]
do_idle+0x3ae/0x5b0 kernel/sched/idle.c:355
cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:454
start_secondary+0x21d/0x2d0 arch/x86/kernel/smpboot.c:312
common_startup_64+0x13e/0x158
Allocated by task 13:
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 0:
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 ffff888057a06d80
which belongs to the cache kmalloc-64 of size 64
The buggy address is located 0 bytes inside of
64-byte region [ffff888057a06d80, ffff888057a06dc0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57a06
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 5928, tgid 5928 (kworker/u33:4), ts 49835606516
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1856
prep_new_page mm/page_alloc.c:1864 [inline]
get_page_from_freelist+0x1113/0x35e0 mm/page_alloc.c:3935
__alloc_frozen_pages_noprof+0x2bd/0x3280 mm/page_alloc.c:5444
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]
load_elf_binary+0x11c4/0x51d0 fs/binfmt_elf.c:916
search_binary_handler fs/exec.c:1777 [inline]
exec_binprm fs/exec.c:1809 [inline]
bprm_execve fs/exec.c:1865 [inline]
bprm_execve+0x8cd/0x1940 fs/exec.c:1841
kernel_execve+0x31e/0x3a0 fs/exec.c:2009
call_usermodehelper_exec_async+0x239/0x4b0 kernel/umh.c:107
ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
page last free pid 5789 tgid 5789 ts 49809253585 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1403 [inline]
__free_frozen_pages+0x7b4/0x1110 mm/page_alloc.c:2954
__pagetable_free include/linux/mm.h:3959 [inline]
pagetable_free include/linux/mm.h:3983 [inline]
pagetable_dtor_free include/linux/mm.h:4082 [inline]
__tlb_remove_table include/asm-generic/tlb.h:205 [inline]
__tlb_remove_table_free mm/mmu_gather.c:226 [inline]
tlb_remove_table_rcu+0x2cf/0x380 mm/mmu_gather.c:287
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:569 [inline]
do_softirq+0xaf/0xf0 kernel/softirq.c:556
__local_bh_enable_ip+0xff/0x120 kernel/softirq.c:473
spin_unlock_bh include/linux/spinlock.h:407 [inline]
igmpv3_del_delrec+0x3e3/0xb20 net/ipv4/igmp.c:1295
____ip_mc_inc_group+0x7db/0x10d0 net/ipv4/igmp.c:1627
__ip_mc_inc_group net/ipv4/igmp.c:1639 [inline]
ip_mc_inc_group net/ipv4/igmp.c:1645 [inline]
ip_mc_up+0x154/0x390 net/ipv4/igmp.c:1950
inetdev_event+0x721/0x1860 net/ipv4/devinet.c:1620
notifier_call_chain+0x99/0x3f0 kernel/notifier.c:86
call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2313
call_netdevice_notifiers_extack net/core/dev.c:2351 [inline]
call_netdevice_notifiers net/core/dev.c:2365 [inline]
__dev_notify_flags+0x22c/0x4b0 net/core/dev.c:10004
netif_change_flags+0x108/0x160 net/core/dev.c:10033
do_setlink.isra.0+0x1b9f/0x3f50 net/core/rtnetlink.c:3294
rtnl_changelink net/core/rtnetlink.c:3942 [inline]
__rtnl_newlink net/core/rtnetlink.c:4113 [inline]
rtnl_newlink+0x13c1/0x2620 net/core/rtnetlink.c:4252
Memory state around the buggy address:
ffff888057a06c80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff888057a06d00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
>ffff888057a06d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
^
ffff888057a06e00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff888057a06e80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 77 a3 ja 0xffffffa5
2: 02 e9 add %cl,%ch
4: 43 61 rex.XB (bad)
6: 03 00 add (%rax),%eax
8: 0f 1f 00 nopl (%rax)
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: f3 0f 1e fa endbr64
1f: eb 07 jmp 0x28
21: 0f 00 2d c3 0d 20 00 verw 0x200dc3(%rip) # 0x200deb
28: fb sti
29: f4 hlt
* 2a: c3 ret <-- trapping instruction
2b: cc int3
2c: cc int3
2d: cc int3
2e: cc int3
2f: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
36: 00 00 00
39: 66 90 xchg %ax,%ax
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 90 nop
3f: 90 nop