================================================================== BUG: KASAN: slab-use-after-free in llc_conn_ac_send_sabme_cmd_p_set_x+0x442/0x470 net/llc/llc_c_ac.c:782 Read of size 1 at addr ffff8880004d7010 by task syz.9.4989/21750 CPU: 3 UID: 0 PID: 21750 Comm: syz.9.4989 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+0xdf/0x1c0 mm/kasan/report.c:595 llc_conn_ac_send_sabme_cmd_p_set_x+0x442/0x470 net/llc/llc_c_ac.c:782 llc_exec_conn_trans_actions net/llc/llc_conn.c:437 [inline] llc_conn_service net/llc/llc_conn.c:362 [inline] llc_conn_state_process+0x3ec/0x1480 net/llc/llc_conn.c:66 llc_process_tmr_ev net/llc/llc_c_ac.c:1442 [inline] llc_conn_tmr_common_cb+0x2d4/0x880 net/llc/llc_c_ac.c:1325 call_timer_fn+0x19a/0x610 kernel/time/timer.c:1748 expire_timers kernel/time/timer.c:1799 [inline] __run_timers+0x757/0xb00 kernel/time/timer.c:2374 __run_timer_base kernel/time/timer.c:2386 [inline] __run_timer_base kernel/time/timer.c:2378 [inline] run_timer_base+0x114/0x190 kernel/time/timer.c:2395 run_timer_softirq+0x1a/0x50 kernel/time/timer.c:2405 handle_softirqs+0x1ea/0x9b0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0x56/0xc0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0023:0xf706b2b1 Code: d8 73 27 2e 8d b4 26 00 00 00 00 2e 8d b4 26 00 00 00 00 8d b6 00 00 00 00 8b 72 f8 8b 5a fc 83 ea 08 89 e8 39 f1 19 d8 72 ef <39> 54 24 08 73 39 8b 44 24 08 8b 4c 24 10 89 58 04 8b 5c 24 14 83 RSP: 002b:00000000ffc7cd60 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 00000000898556d9 RDX: 00000000f6b09780 RSI: 00000000898514cf RDI: 00000000ffffffff RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 21756: 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:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x2e5/0x6c0 mm/slub.c:5515 _kmalloc_noprof include/linux/slab.h:969 [inline] _kzalloc_noprof include/linux/slab.h:1290 [inline] llc_sap_alloc net/llc/llc_core.c:29 [inline] llc_sap_open+0x120/0x3b0 net/llc/llc_core.c:96 llc_ui_autobind.isra.0+0x2ae/0x580 net/llc/af_llc.c:301 llc_ui_connect+0x582/0xdb0 net/llc/af_llc.c:498 __sys_connect_file+0x141/0x1a0 net/socket.c:2135 __sys_connect+0x141/0x170 net/socket.c:2154 __do_sys_connect net/socket.c:2160 [inline] __se_sys_connect net/socket.c:2157 [inline] __ia32_sys_connect+0x71/0xb0 net/socket.c:2157 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe7/0x970 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 23: 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:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2705 [inline] __rcu_free_sheaf_prepare+0x5d/0x2f0 mm/slub.c:2956 rcu_free_sheaf+0x1a/0xe0 mm/slub.c:6004 rcu_do_batch kernel/rcu/tree.c:2645 [inline] rcu_core+0x5a2/0x10d0 kernel/rcu/tree.c:2897 handle_softirqs+0x1ea/0x9b0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 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 ffff8880004d7000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 16 bytes inside of freed 2048-byte region [ffff8880004d7000, ffff8880004d7800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4d0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x7ff00000000040(head|node=0|zone=0|lastcpupid=0x7ff) page_type: f5(slab) raw: 007ff00000000040 ffff88801bc42f00 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800080008 00000000f5000000 0000000000000000 head: 007ff00000000040 ffff88801bc42f00 dead000000000100 dead000000000122 head: 0000000000000000 0000000800080008 00000000f5000000 0000000000000000 head: 007ff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5840, tgid 5840 (kworker/u32:4), ts 805096575928, free_ts 805080681634 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3294 [inline] allocate_slab mm/slub.c:3408 [inline] new_slab+0xa2/0x650 mm/slub.c:3454 refill_objects+0xe3/0x410 mm/slub.c:7338 refill_sheaf mm/slub.c:2832 [inline] __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4703 alloc_from_pcs mm/slub.c:4801 [inline] slab_alloc_node mm/slub.c:4933 [inline] __do_kmalloc_node mm/slub.c:5361 [inline] __kmalloc_node_track_caller_noprof+0x679/0x830 mm/slub.c:5497 kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:637 __alloc_skb+0x185/0x710 net/core/skbuff.c:715 alloc_skb include/linux/skbuff.h:1384 [inline] mld_newpack.isra.0+0x18e/0xa20 net/ipv6/mcast.c:1789 add_grhead+0x299/0x340 net/ipv6/mcast.c:1900 add_grec+0x1389/0x1930 net/ipv6/mcast.c:2039 mld_send_initial_cr+0x156/0x320 net/ipv6/mcast.c:2284 ipv6_mc_dad_complete+0xa7/0x1d0 net/ipv6/mcast.c:2295 addrconf_dad_completed+0xd91/0xff0 net/ipv6/addrconf.c:4375 addrconf_dad_work+0x83c/0x1360 net/ipv6/addrconf.c:4303 page last free pid 18304 tgid 18304 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950 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:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4612 [inline] slab_alloc_node mm/slub.c:4945 [inline] kmem_cache_alloc_noprof+0x26b/0x6a0 mm/slub.c:4959 alloc_filename fs/namei.c:147 [inline] do_getname+0x35/0x390 fs/namei.c:187 getname_flags fs/namei.c:230 [inline] class_filename_flags_constructor include/linux/fs.h:2566 [inline] user_path_at+0x26/0x60 fs/namei.c:3640 ksys_umount fs/namespace.c:2067 [inline] __do_sys_umount fs/namespace.c:2075 [inline] __se_sys_umount fs/namespace.c:2073 [inline] __ia32_sys_umount+0x109/0x190 fs/namespace.c:2073 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe7/0x970 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Memory state around the buggy address: ffff8880004d6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880004d6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880004d7000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880004d7080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880004d7100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: d8 73 27 fdivs 0x27(%rbx) 3: 2e 8d b4 26 00 00 00 cs lea 0x0(%rsi,%riz,1),%esi a: 00 b: 2e 8d b4 26 00 00 00 cs lea 0x0(%rsi,%riz,1),%esi 12: 00 13: 8d b6 00 00 00 00 lea 0x0(%rsi),%esi 19: 8b 72 f8 mov -0x8(%rdx),%esi 1c: 8b 5a fc mov -0x4(%rdx),%ebx 1f: 83 ea 08 sub $0x8,%edx 22: 89 e8 mov %ebp,%eax 24: 39 f1 cmp %esi,%ecx 26: 19 d8 sbb %ebx,%eax 28: 72 ef jb 0x19 * 2a: 39 54 24 08 cmp %edx,0x8(%rsp) <-- trapping instruction 2e: 73 39 jae 0x69 30: 8b 44 24 08 mov 0x8(%rsp),%eax 34: 8b 4c 24 10 mov 0x10(%rsp),%ecx 38: 89 58 04 mov %ebx,0x4(%rax) 3b: 8b 5c 24 14 mov 0x14(%rsp),%ebx 3f: 83 .byte 0x83