================================================================== BUG: KASAN: double-free in rcu_free_sheaf+0x1a/0xe0 mm/slub.c:6061 Free of addr ffff88803d195900 by task kworker/u32:3/5812 CPU: 2 UID: 0 PID: 5812 Comm: kworker/u32:3 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 Workqueue: netns cleanup_net 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:2693 [inline] __rcu_free_sheaf_prepare+0x117/0x300 mm/slub.c:3009 rcu_free_sheaf+0x1a/0xe0 mm/slub.c:6061 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919 handle_softirqs+0x1e6/0x9d0 kernel/softirq.c:645 do_softirq kernel/softirq.c:546 [inline] do_softirq+0xaf/0xf0 kernel/softirq.c:533 __local_bh_enable_ip+0xff/0x120 kernel/softirq.c:473 unregister_netdevice_many_notify+0x1091/0x2150 net/core/dev.c:12555 unregister_netdevice_many net/core/dev.c:12635 [inline] default_device_exit_batch+0x6c6/0x890 net/core/dev.c:13347 ops_exit_list net/core/net_namespace.c:206 [inline] ops_undo_list+0x363/0xab0 net/core/net_namespace.c:253 cleanup_net+0x499/0x920 net/core/net_namespace.c:706 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 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 Allocated by task 5812: 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:5563 _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+0x133/0x330 net/mac802154/driver-ops.h:127 drv_start net/mac802154/driver-ops.h:167 [inline] mac802154_scan_worker+0x68e/0x1240 net/mac802154/scan.c:248 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 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 28: 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:2748 [inline] __rcu_free_sheaf_prepare+0x5d/0x300 mm/slub.c:3009 rcu_free_sheaf+0x1a/0xe0 mm/slub.c:6061 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919 handle_softirqs+0x1e6/0x9d0 kernel/softirq.c:645 run_ksoftirqd kernel/softirq.c:1099 [inline] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1091 smpboot_thread_fn+0x3d3/0xab0 kernel/smpboot.c:160 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 The buggy address belongs to the object at ffff88803d195900 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff88803d195900, ffff88803d195940) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88803d195c80 pfn:0x3d195 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff88801d0428c0 ffffea00017daf10 ffff88801d040588 raw: ffff88803d195c80 0000000000200019 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 5148, tgid 5148 (udevd), ts 20311757778 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35d0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7418 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 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_node_track_caller_noprof+0x6a8/0x870 mm/slub.c:5545 __kmemdup_nul mm/util.c:64 [inline] kmemdup_nul+0x49/0xd0 mm/util.c:194 security_context_to_sid_core+0xcc/0x8a0 security/selinux/ss/services.c:1569 selinux_inode_setxattr+0x44a/0xa00 security/selinux/hooks.c:3417 security_inode_setxattr+0x262/0x560 security/security.c:1940 __vfs_setxattr_locked+0xad/0x2b0 fs/xattr.c:309 vfs_setxattr+0x14a/0x390 fs/xattr.c:344 do_setxattr+0x145/0x180 fs/xattr.c:662 filename_setxattr+0x167/0x1d0 fs/xattr.c:690 path_setxattrat+0x1ff/0x3b0 fs/xattr.c:734 page last free pid 5145 tgid 5145 ts 20270603693 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:361 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] __kmalloc_cache_noprof+0x278/0x6d0 mm/slub.c:5559 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] kernfs_get_open_node fs/kernfs/file.c:537 [inline] kernfs_fop_open+0xcc7/0x10f0 fs/kernfs/file.c:725 do_dentry_open+0x674/0x1470 fs/open.c:1000 vfs_open_consume+0xcc/0x460 fs/open.c:1131 do_open fs/namei.c:4845 [inline] path_openat+0x1551/0x2430 fs/namei.c:5010 do_file_open+0x20e/0x430 fs/namei.c:5039 do_sys_openat2+0x163/0x1d0 fs/open.c:1442 do_sys_open fs/open.c:1448 [inline] __do_sys_openat fs/open.c:1464 [inline] __se_sys_openat fs/open.c:1459 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1459 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88803d195800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88803d195880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88803d195900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88803d195980: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88803d195a00: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ==================================================================