================================================================== BUG: KASAN: use-after-free in instrument_atomic_write include/linux/instrumented.h:97 [inline] BUG: KASAN: use-after-free in clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline] BUG: KASAN: use-after-free in mm_drop_cid kernel/sched/sched.h:3812 [inline] BUG: KASAN: use-after-free in mm_cid_schedout kernel/sched/sched.h:3995 [inline] BUG: KASAN: use-after-free in mm_cid_switch_to kernel/sched/sched.h:4002 [inline] BUG: KASAN: use-after-free in context_switch kernel/sched/core.c:5284 [inline] BUG: KASAN: use-after-free in __schedule+0x3ee6/0x6120 kernel/sched/core.c:6908 Write of size 8 at addr ffff8880238d3050 by task syz.3.3495/21494 CPU: 1 UID: 0 PID: 21494 Comm: syz.3.3495 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+0x156/0x4c9 mm/kasan/report.c:482 kasan_report+0xdf/0x1e0 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:186 [inline] kasan_check_range+0x10f/0x1e0 mm/kasan/generic.c:200 instrument_atomic_write include/linux/instrumented.h:97 [inline] clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline] mm_drop_cid kernel/sched/sched.h:3812 [inline] mm_cid_schedout kernel/sched/sched.h:3995 [inline] mm_cid_switch_to kernel/sched/sched.h:4002 [inline] context_switch kernel/sched/core.c:5284 [inline] __schedule+0x3ee6/0x6120 kernel/sched/core.c:6908 preempt_schedule_common+0x42/0xc0 kernel/sched/core.c:7092 preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk.S:12 class_preempt_destructor include/linux/preempt.h:468 [inline] try_to_wake_up+0x644/0x1a80 kernel/sched/core.c:4094 io_acct_activate_free_worker+0x1e5/0x2d0 io_uring/io-wq.c:311 create_worker_cb+0xbf/0x380 io_uring/io-wq.c:364 task_work_run+0x150/0x240 kernel/task_work.c:233 get_signal+0x1bd/0x21e0 kernel/signal.c:2807 arch_do_signal_or_restart+0x91/0x770 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/0x4a0 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] __do_fast_syscall_32+0x578/0x8c0 arch/x86/entry/syscall_32.c:310 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf70aef6c Code: d2 74 05 c1 e8 0c 89 02 8b 5d fc 31 c0 c9 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 58 b8 77 00 00 00 cd 80 0f 0b 8d b6 00 00 00 00 b8 ad RSP: 002b:00000000f545b50c EFLAGS: 00000292 ORIG_RAX: 00000000000001aa RAX: 0000000000000800 RBX: 0000000000000006 RCX: 0000000000003516 RDX: 000000000000addf RSI: 0000000000000002 RDI: 0000000000000000 RBP: 000000000001517f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x238d3 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5931, tgid 5931 (syz-executor), ts 54017923605, free_ts 55661756491 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x153/0x170 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x111d/0x3140 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x27c/0x2ba0 mm/page_alloc.c:5250 alloc_slab_page mm/slub.c:3269 [inline] allocate_slab mm/slub.c:3458 [inline] new_slab+0xa6/0x6d0 mm/slub.c:3516 refill_objects+0x26b/0x400 mm/slub.c:7153 refill_sheaf mm/slub.c:2818 [inline] alloc_full_sheaf mm/slub.c:2839 [inline] __pcs_replace_empty_main+0x19f/0x600 mm/slub.c:4602 alloc_from_pcs mm/slub.c:4695 [inline] slab_alloc_node mm/slub.c:4829 [inline] __do_kmalloc_node mm/slub.c:5237 [inline] __kmalloc_node_track_caller_noprof+0x694/0x850 mm/slub.c:5346 kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:635 __alloc_skb+0x185/0x710 net/core/skbuff.c:713 alloc_skb include/linux/skbuff.h:1383 [inline] nlmsg_new include/net/netlink.h:1055 [inline] rtmsg_ifinfo_build_skb+0x81/0x260 net/core/rtnetlink.c:4407 rtmsg_ifinfo_event net/core/rtnetlink.c:4449 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:4439 [inline] rtnetlink_event+0x137/0x1f0 net/core/rtnetlink.c:7018 notifier_call_chain+0x99/0x420 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2249 __netdev_upper_dev_link+0x43c/0x7e0 net/core/dev.c:8893 netdev_master_upper_dev_link+0x9f/0xd0 net/core/dev.c:8963 br_add_if+0x9fd/0x1b40 net/bridge/br_if.c:619 page last free pid 5942 tgid 5942 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0x7e1/0x10d0 mm/page_alloc.c:2978 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xe0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4515 [inline] slab_alloc_node mm/slub.c:4844 [inline] kmem_cache_alloc_node_noprof+0x25a/0x6f0 mm/slub.c:4896 __alloc_skb+0x140/0x710 net/core/skbuff.c:702 alloc_skb include/linux/skbuff.h:1383 [inline] nlmsg_new include/net/netlink.h:1055 [inline] netlink_ack+0x117/0xb80 net/netlink/af_netlink.c:2487 netlink_rcv_skb+0x333/0x420 net/netlink/af_netlink.c:2556 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] __sys_sendto+0x4aa/0x520 net/socket.c:2206 __do_compat_sys_socketcall net/compat.c:475 [inline] __se_compat_sys_socketcall net/compat.c:423 [inline] __ia32_compat_sys_socketcall+0x59a/0x770 net/compat.c:423 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] do_int80_emulation+0x141/0x6b0 arch/x86/entry/syscall_32.c:172 asm_int80_emulation+0x1a/0x20 arch/x86/include/asm/idtentry.h:621 Memory state around the buggy address: ffff8880238d2f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880238d2f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880238d3000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880238d3080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880238d3100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ---------------- Code disassembly (best guess): 0: d2 74 05 c1 shlb %cl,-0x3f(%rbp,%rax,1) 4: e8 0c 89 02 8b call 0x8b028915 9: 5d pop %rbp a: fc cld b: 31 c0 xor %eax,%eax d: c9 leave e: c3 ret 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: 90 nop 1c: 90 nop 1d: 90 nop 1e: 0f 1f 00 nopl (%rax) 21: 51 push %rcx 22: 52 push %rdx 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 ret 2e: 58 pop %rax 2f: b8 77 00 00 00 mov $0x77,%eax 34: cd 80 int $0x80 36: 0f 0b ud2 38: 8d b6 00 00 00 00 lea 0x0(%rsi),%esi 3e: b8 .byte 0xb8 3f: ad lods %ds:(%rsi),%eax