================================================================== BUG: KASAN: use-after-free in __list_splice include/linux/list.h:443 [inline] BUG: KASAN: use-after-free in list_splice_init include/linux/list.h:482 [inline] BUG: KASAN: use-after-free in net_rx_action+0x9ea/0xb40 net/core/dev.c:7158 Write of size 8 at addr ffff8880865c4618 by task ksoftirqd/0/13 CPU: 0 PID: 13 Comm: ksoftirqd/0 Not tainted 5.15.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 __list_splice include/linux/list.h:443 [inline] list_splice_init include/linux/list.h:482 [inline] net_rx_action+0x9ea/0xb40 net/core/dev.c:7158 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 run_ksoftirqd kernel/softirq.c:920 [inline] run_ksoftirqd+0x2d/0x60 kernel/softirq.c:912 smpboot_thread_fn+0x645/0x9c0 kernel/smpboot.c:164 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 27093: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa4/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:596 [inline] sk_prot_alloc+0x110/0x290 net/core/sock.c:1920 sk_alloc+0x30/0xa60 net/core/sock.c:1973 tun_chr_open+0x7b/0x540 drivers/net/tun.c:3361 misc_open+0x372/0x4a0 drivers/char/misc.c:141 chrdev_open+0x266/0x770 fs/char_dev.c:414 do_dentry_open+0x4c8/0x11d0 fs/open.c:822 do_open fs/namei.c:3426 [inline] path_openat+0x1c9a/0x2740 fs/namei.c:3559 do_filp_open+0x1aa/0x400 fs/namei.c:3586 do_sys_openat2+0x16d/0x4d0 fs/open.c:1200 do_sys_open fs/open.c:1216 [inline] __do_sys_openat fs/open.c:1232 [inline] __se_sys_openat fs/open.c:1227 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1227 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 27086: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xff/0x130 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:1700 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1726 slab_free mm/slub.c:3492 [inline] kfree+0xf3/0x550 mm/slub.c:4552 sk_prot_free net/core/sock.c:1956 [inline] __sk_destruct+0x6a8/0x900 net/core/sock.c:2042 sk_destruct+0xbd/0xe0 net/core/sock.c:2057 __sk_free+0xef/0x3d0 net/core/sock.c:2068 sk_free+0x78/0xa0 net/core/sock.c:2079 sock_put include/net/sock.h:1878 [inline] __tun_detach+0xdb2/0x13d0 drivers/net/tun.c:675 tun_detach drivers/net/tun.c:687 [inline] tun_chr_close+0xc4/0x180 drivers/net/tun.c:3397 __fput+0x286/0x9f0 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff8880865c4000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1560 bytes inside of 4096-byte region [ffff8880865c4000, ffff8880865c5000) The buggy address belongs to the page: page:ffffea0002197000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x865c0 head:ffffea0002197000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010c42140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 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 25272, ts 2136277237472, free_ts 1411388906407 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4155 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5381 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2191 alloc_slab_page mm/slub.c:1770 [inline] allocate_slab mm/slub.c:1907 [inline] new_slab+0x319/0x490 mm/slub.c:1970 ___slab_alloc+0x921/0xfe0 mm/slub.c:3001 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3088 slab_alloc_node mm/slub.c:3179 [inline] slab_alloc mm/slub.c:3221 [inline] kmem_cache_alloc_trace+0x291/0x2b0 mm/slub.c:3238 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] snmp6_alloc_dev net/ipv6/addrconf.c:360 [inline] ipv6_add_dev+0x555/0x1170 net/ipv6/addrconf.c:410 addrconf_notify+0x60e/0x1bb0 net/ipv6/addrconf.c:3510 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2002 call_netdevice_notifiers_extack net/core/dev.c:2014 [inline] call_netdevice_notifiers net/core/dev.c:2028 [inline] register_netdevice+0x1073/0x1500 net/core/dev.c:10361 bond_newlink drivers/net/bonding/bond_netlink.c:469 [inline] bond_newlink+0x47/0xa0 drivers/net/bonding/bond_netlink.c:459 __rtnl_newlink+0x106d/0x1750 net/core/rtnetlink.c:3458 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3506 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5571 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare+0x326/0x810 mm/page_alloc.c:1391 free_unref_page_prepare mm/page_alloc.c:3317 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3396 __vunmap+0x781/0xb70 mm/vmalloc.c:2621 __vfree+0x3c/0xd0 mm/vmalloc.c:2669 vfree+0x5a/0x90 mm/vmalloc.c:2700 kvfree+0x2e/0x50 mm/util.c:618 stack_map_free+0x33/0x60 kernel/bpf/stackmap.c:703 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff8880865c4500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880865c4580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880865c4600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880865c4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880865c4700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================