ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 ================================================================== BUG: KASAN: slab-use-after-free in skb_update_prio net/core/dev.c:3884 [inline] BUG: KASAN: slab-use-after-free in __dev_queue_xmit+0x38a2/0x3d60 net/core/dev.c:4296 Read of size 8 at addr ffff88804fffcbb0 by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Not tainted 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 skb_update_prio net/core/dev.c:3884 [inline] __dev_queue_xmit+0x38a2/0x3d60 net/core/dev.c:4296 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 2992 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffcb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffcb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffcc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffcc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in __dev_queue_xmit+0x2ac5/0x3d60 net/core/dev.c:4323 Read of size 8 at addr ffff88804fffc0c8 by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 __dev_queue_xmit+0x2ac5/0x3d60 net/core/dev.c:4323 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 200 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804fffc000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffc080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in netdev_core_pick_tx+0x33a/0x390 net/core/dev.c:4241 Read of size 4 at addr ffff88804fffc44c by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 netdev_core_pick_tx+0x33a/0x390 net/core/dev.c:4241 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 1100 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffc300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffc400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in netdev_core_pick_tx+0x372/0x390 net/core/dev.c:4242 Read of size 8 at addr ffff88804fffc0d0 by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 netdev_core_pick_tx+0x372/0x390 net/core/dev.c:4242 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 208 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804fffc000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffc080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in get_xps_queue net/core/dev.c:4171 [inline] BUG: KASAN: slab-use-after-free in netdev_pick_tx+0xc40/0xd00 net/core/dev.c:4211 Read of size 8 at addr ffff88804fffc4a8 by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 get_xps_queue net/core/dev.c:4171 [inline] netdev_pick_tx+0xc40/0xd00 net/core/dev.c:4211 netdev_core_pick_tx+0x2b6/0x390 net/core/dev.c:4247 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 1192 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffc380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffc480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in skb_tx_hash net/core/dev.c:3243 [inline] BUG: KASAN: slab-use-after-free in netdev_pick_tx+0xb20/0xd00 net/core/dev.c:4214 Read of size 4 at addr ffff88804fffc44c by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 skb_tx_hash net/core/dev.c:3243 [inline] netdev_pick_tx+0xb20/0xd00 net/core/dev.c:4214 netdev_core_pick_tx+0x2b6/0x390 net/core/dev.c:4247 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 1100 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffc300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffc400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in skb_tx_hash net/core/dev.c:3245 [inline] BUG: KASAN: slab-use-after-free in netdev_pick_tx+0xc90/0xd00 net/core/dev.c:4214 Read of size 2 at addr ffff88804fffcb58 by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 skb_tx_hash net/core/dev.c:3245 [inline] netdev_pick_tx+0xc90/0xd00 net/core/dev.c:4214 netdev_core_pick_tx+0x2b6/0x390 net/core/dev.c:4247 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 2904 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffcb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffcb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffcc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in netdev_uses_dsa include/net/dsa.h:1315 [inline] BUG: KASAN: slab-use-after-free in __skb_flow_dissect+0x78e2/0x7a40 net/core/flow_dissector.c:1050 Read of size 8 at addr ffff88804fffc358 by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 netdev_uses_dsa include/net/dsa.h:1315 [inline] __skb_flow_dissect+0x78e2/0x7a40 net/core/flow_dissector.c:1050 skb_flow_dissect_flow_keys include/linux/skbuff.h:1514 [inline] ___skb_get_hash net/core/flow_dissector.c:1791 [inline] __skb_get_hash+0xc7/0x540 net/core/flow_dissector.c:1856 skb_get_hash include/linux/skbuff.h:1556 [inline] skb_tx_hash net/core/dev.c:3268 [inline] netdev_pick_tx+0xb32/0xd00 net/core/dev.c:4214 netdev_core_pick_tx+0x2b6/0x390 net/core/dev.c:4247 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 856 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffc200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffc300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in read_pnet include/net/net_namespace.h:385 [inline] BUG: KASAN: slab-use-after-free in dev_net include/linux/netdevice.h:2581 [inline] BUG: KASAN: slab-use-after-free in __skb_flow_dissect+0x6a46/0x7a40 net/core/flow_dissector.c:1090 Read of size 8 at addr ffff88804fffc670 by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 read_pnet include/net/net_namespace.h:385 [inline] dev_net include/linux/netdevice.h:2581 [inline] __skb_flow_dissect+0x6a46/0x7a40 net/core/flow_dissector.c:1090 skb_flow_dissect_flow_keys include/linux/skbuff.h:1514 [inline] ___skb_get_hash net/core/flow_dissector.c:1791 [inline] __skb_get_hash+0xc7/0x540 net/core/flow_dissector.c:1856 skb_get_hash include/linux/skbuff.h:1556 [inline] skb_tx_hash net/core/dev.c:3268 [inline] netdev_pick_tx+0xb32/0xd00 net/core/dev.c:4214 netdev_core_pick_tx+0x2b6/0x390 net/core/dev.c:4247 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 1648 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffc600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in netdev_cap_txqueue include/linux/netdevice.h:3597 [inline] BUG: KASAN: slab-use-after-free in netdev_core_pick_tx+0x347/0x390 net/core/dev.c:4249 Read of size 4 at addr ffff88804fffc44c by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 netdev_cap_txqueue include/linux/netdevice.h:3597 [inline] netdev_core_pick_tx+0x347/0x390 net/core/dev.c:4249 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 1100 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffc300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffc400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in netdev_cap_txqueue include/linux/netdevice.h:3598 [inline] BUG: KASAN: slab-use-after-free in netdev_cap_txqueue include/linux/netdevice.h:3595 [inline] BUG: KASAN: slab-use-after-free in netdev_core_pick_tx+0x37f/0x390 net/core/dev.c:4249 Read of size 4 at addr ffff88804fffc44c by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 netdev_cap_txqueue include/linux/netdevice.h:3598 [inline] netdev_cap_txqueue include/linux/netdevice.h:3595 [inline] netdev_core_pick_tx+0x37f/0x390 net/core/dev.c:4249 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 1100 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffc300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804fffc400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in string_nocheck lib/vsprintf.c:645 [inline] BUG: KASAN: slab-use-after-free in string+0x394/0x3d0 lib/vsprintf.c:727 Read of size 1 at addr ffff88804fffc000 by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 string_nocheck lib/vsprintf.c:645 [inline] string+0x394/0x3d0 lib/vsprintf.c:727 vsnprintf+0xc5f/0x1870 lib/vsprintf.c:2818 vprintk_store+0x3a0/0xb80 kernel/printk/printk.c:2191 vprintk_emit+0x14c/0x5f0 kernel/printk/printk.c:2288 vprintk+0x7b/0x90 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2332 netdev_cap_txqueue include/linux/netdevice.h:3598 [inline] netdev_cap_txqueue include/linux/netdevice.h:3595 [inline] netdev_core_pick_tx+0x30f/0x390 net/core/dev.c:4249 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close fs/open.c:1557 [inline] __x64_sys_close+0x87/0xf0 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 ipv4_sysctl_exit_net+0x84/0xb0 net/ipv4/sysctl_net_ipv4.c:1548 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff88804fffc000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 0 bytes inside of freed 4096-byte region [ffff88804fffc000, ffff88804fffd000) The buggy address belongs to the physical page: page:ffffea00013ffe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804fff8000 pfn:0x4fff8 head:ffffea00013ffe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888025355ec1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c4f500 ffffea000084d210 ffffea0000f6a210 raw: ffff88804fff8000 0000000000040003 00000001ffffffff ffff888025355ec1 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 5058, tgid 5058 (syz-executor.2), ts 70056515964, free_ts 13123923150 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1046 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:765 [inline] __addrconf_sysctl_register+0xc2/0x3f0 net/ipv6/addrconf.c:7120 addrconf_sysctl_register net/ipv6/addrconf.c:7186 [inline] addrconf_sysctl_register+0x133/0x1d0 net/ipv6/addrconf.c:7175 ipv6_add_dev+0x9f6/0x13d0 net/ipv6/addrconf.c:451 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1995 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 free_contig_range+0xb6/0x190 mm/page_alloc.c:6342 destroy_args+0x768/0x990 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x1d79/0x3e00 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1547 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88804fffbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804fffbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88804fffc000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fffc080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804fffc100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== selects TX queue 0, but real number of TX queues is 0 ================================================================== BUG: KASAN: slab-use-after-free in string_nocheck lib/vsprintf.c:645 [inline] BUG: KASAN: slab-use-after-free in string+0x394/0x3d0 lib/vsprintf.c:727 Read of size 1 at addr ffff88804fffc000 by task aoe_tx0/1218 CPU: 0 PID: 1218 Comm: aoe_tx0 Tainted: G B 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 string_nocheck lib/vsprintf.c:645 [inline] string+0x394/0x3d0 lib/vsprintf.c:727 vsnprintf+0xc5f/0x1870 lib/vsprintf.c:2818 vscnprintf+0x40/0x80 lib/vsprintf.c:2924 printk_sprint+0x31/0x2f0 kernel/printk/printk.c:2128 vprintk_store+0x4d8/0xb80 kernel/printk/printk.c:2242 vprintk_emit+0x14c/0x5f0 kernel/printk/printk.c:2288 vprintk+0x7b/0x90 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2332 netdev_cap_txqueue include/linux/netdevice.h:3598 [inline] netdev_cap_txqueue include/linux/netdevice.h:3595 [inline] netdev_core_pick_tx+0x30f/0x390 net/core/dev.c:4249 __dev_queue_xmit+0x71a/0x3d60 net/core/dev.c:4329 dev_queue_xmit include/linux/netdevice.h:3082 [inline] tx+0x76/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x1e9/0x3c0 drivers/block/aoe/aoecmd.c:1229 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 5422: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc_node+0x63/0x110 mm/slab_common.c:1033 kmalloc_node include/linux/slab.h:619 [inline] kvmalloc_node+0x99/0x1a0 mm/util.c:607 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9b/0x1290 net/core/dev.c:10710 mkiss_open+0xb4/0x9b0 drivers/net/hamradio/mkiss.c:699 tty_ldisc_open+0x98/0x100 drivers/tty/tty_ldisc.c:432 tty_set_ldisc+0x2e2/0x680 drivers/tty/tty_ldisc.c:557 tiocsetd drivers/tty/tty_io.c:2431 [inline] tty_ioctl+0xbda/0x1580 drivers/tty/tty_io.c:2712 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl fs/ioctl.c:857 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5411: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 kvfree+0x47/0x50 mm/util.c:653 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:716 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1d0/0x440 lib/kobject.c:733 put_device+0x1f/0x30 drivers/base/core.c:3732 free_netdev+0x408/0x5f0 net/core/dev.c:10860 mkiss_close+0x251/0x2f0 drivers/net/hamradio/mkiss.c:805 tty_ldisc_close+0x111/0x190 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:607 tty_ldisc_release+0x116/0x2a0 drivers/tty/tty_ldisc.c:775 tty_release_struct+0x23/0xe0 drivers/tty/tty_io.c:1688 tty_release+0xe2c/0x1420 drivers/tty/tty_io.c:1859 __fput+0x3f7/0xa70 fs/file_table.c:384 __fput_sync+0x47/0x50 fs/file_table.c:465