================================================================== BUG: KASAN: slab-use-after-free in fib6_ifdown+0x7f5/0x8f0 net/ipv6/route.c:4954 Read of size 8 at addr ffff8880132878c0 by task syz.2.2479/15699 CPU: 2 UID: 0 PID: 15699 Comm: syz.2.2479 Not tainted 6.15.0-syzkaller-10820-gcd2e103d57e5 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xcd/0x680 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 fib6_ifdown+0x7f5/0x8f0 net/ipv6/route.c:4954 fib6_clean_node+0x2a7/0x5b0 net/ipv6/ip6_fib.c:2252 fib6_walk_continue+0x452/0x8d0 net/ipv6/ip6_fib.c:2177 fib6_walk+0x182/0x370 net/ipv6/ip6_fib.c:2225 fib6_clean_tree+0xd4/0x110 net/ipv6/ip6_fib.c:2305 __fib6_clean_all+0x107/0x2d0 net/ipv6/ip6_fib.c:2321 rt6_sync_down_dev net/ipv6/route.c:5004 [inline] rt6_disable_ip+0x2ec/0x990 net/ipv6/route.c:5009 addrconf_ifdown.isra.0+0x11d/0x1a90 net/ipv6/addrconf.c:3857 addrconf_notify+0x220/0x19e0 net/ipv6/addrconf.c:3780 notifier_call_chain+0xbc/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2230 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] unregister_netdevice_many_notify+0xf9a/0x26f0 net/core/dev.c:12076 unregister_netdevice_many net/core/dev.c:12139 [inline] unregister_netdevice_queue+0x305/0x3f0 net/core/dev.c:11983 unregister_netdevice include/linux/netdevice.h:3379 [inline] ppp_release+0x209/0x230 drivers/net/ppp/ppp_generic.c:422 __fput+0x3ff/0xb70 fs/file_table.c:465 task_work_run+0x150/0x240 kernel/task_work.c:227 get_signal+0x1d1/0x26d0 kernel/signal.c:2807 arch_do_signal_or_restart+0x8f/0x790 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x84/0x110 kernel/entry/common.c:111 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] __do_fast_syscall_32+0x2ac/0x3a0 arch/x86/entry/syscall_32.c:309 do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7f07579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f500555c EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000040047459 RDX: 0000000080000080 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 59: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] mld_add_delrec net/ipv6/mcast.c:746 [inline] igmp6_leave_group net/ipv6/mcast.c:2676 [inline] igmp6_group_dropped+0x4a7/0xe40 net/ipv6/mcast.c:726 __ipv6_dev_mc_dec+0x283/0x3b0 net/ipv6/mcast.c:1018 addrconf_leave_solict net/ipv6/addrconf.c:2254 [inline] __ipv6_ifa_notify+0x3d8/0xd60 net/ipv6/addrconf.c:6302 addrconf_ifdown.isra.0+0xe8b/0x1a90 net/ipv6/addrconf.c:3981 addrconf_notify+0x220/0x19e0 net/ipv6/addrconf.c:3780 notifier_call_chain+0xbc/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2230 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] dev_close_many+0x319/0x630 net/core/dev.c:1785 unregister_netdevice_many_notify+0x578/0x26f0 net/core/dev.c:12046 unregister_netdevice_many net/core/dev.c:12139 [inline] default_device_exit_batch+0x853/0xaf0 net/core/dev.c:12643 ops_exit_list net/core/net_namespace.c:206 [inline] ops_undo_list+0x360/0xab0 net/core/net_namespace.c:253 cleanup_net+0x408/0x890 net/core/net_namespace.c:686 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 1140: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2380 [inline] slab_free_freelist_hook mm/slub.c:2409 [inline] slab_free_bulk mm/slub.c:4666 [inline] kmem_cache_free_bulk.part.0+0x383/0x7f0 mm/slub.c:5243 kfree_bulk include/linux/slab.h:794 [inline] kvfree_rcu_bulk+0x1b7/0x1e0 mm/slab_common.c:1516 kvfree_rcu_drain_ready mm/slab_common.c:1699 [inline] kfree_rcu_monitor+0x1d0/0x2f0 mm/slab_common.c:1772 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548 kvfree_call_rcu+0x76/0x470 mm/slab_common.c:1962 mld_clear_delrec+0xab/0x640 net/ipv6/mcast.c:828 ipv6_mc_destroy_dev+0x49/0x690 net/ipv6/mcast.c:2842 addrconf_ifdown.isra.0+0x13ef/0x1a90 net/ipv6/addrconf.c:4000 addrconf_notify+0x220/0x19e0 net/ipv6/addrconf.c:3780 notifier_call_chain+0xbc/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2230 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] unregister_netdevice_many_notify+0xf9a/0x26f0 net/core/dev.c:12076 unregister_netdevice_many net/core/dev.c:12139 [inline] default_device_exit_batch+0x853/0xaf0 net/core/dev.c:12643 ops_exit_list net/core/net_namespace.c:206 [inline] ops_undo_list+0x360/0xab0 net/core/net_namespace.c:253 cleanup_net+0x408/0x890 net/core/net_namespace.c:686 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888013287800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 192 bytes inside of freed 512-byte region [ffff888013287800, ffff888013287a00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888013287400 pfn:0x13284 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b442c80 ffffea00008e2210 ffffea0000967c10 raw: ffff888013287400 000000000010000d 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801b442c80 ffffea00008e2210 ffffea0000967c10 head: ffff888013287400 000000000010000d 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea00004ca101 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 5948, tgid 5948 (syz-executor), ts 48921838344, free_ts 23174962798 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_pages_slowpath mm/page_alloc.c:4490 [inline] __alloc_frozen_pages_noprof+0x58b/0x23f0 mm/page_alloc.c:4972 alloc_slab_page mm/slub.c:2452 [inline] allocate_slab mm/slub.c:2618 [inline] new_slab+0x94/0x330 mm/slub.c:2672 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3858 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3948 __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_node_noprof+0x2ed/0x500 mm/slub.c:4333 kmalloc_array_node_noprof include/linux/slab.h:1020 [inline] alloc_slab_obj_exts+0x41/0xa0 mm/slub.c:1992 __memcg_slab_post_alloc_hook+0x255/0x960 mm/memcontrol.c:3123 memcg_slab_post_alloc_hook mm/slub.c:2179 [inline] slab_post_alloc_hook mm/slub.c:4157 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x3f9/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] lsm_blob_alloc+0x68/0x90 security/security.c:684 lsm_cred_alloc security/security.c:701 [inline] security_prepare_creds+0x30/0x270 security/security.c:3241 prepare_creds+0x56f/0x7d0 kernel/cred.c:242 copy_creds+0xa7/0xa50 kernel/cred.c:312 copy_process+0xff6/0x76a0 kernel/fork.c:2033 kernel_clone+0xfc/0x960 kernel/fork.c:2599 page last free pid 5350 tgid 5350 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4203 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:322 getname include/linux/fs.h:2903 [inline] do_sys_openat2+0xb8/0x1d0 fs/open.c:1431 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1463 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x490 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888013287780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888013287800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888013287880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888013287900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888013287980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi