================================================================== BUG: KASAN: slab-out-of-bounds in __list_del_entry_valid+0xcc/0xf0 lib/list_debug.c:42 Read of size 8 at addr ffff8880745ac1b8 by task kworker/u4:6/4101 CPU: 0 PID: 4101 Comm: kworker/u4:6 Not tainted 5.18.0-rc6-syzkaller-01525-gd887ae3247e0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 __list_del_entry_valid+0xcc/0xf0 lib/list_debug.c:42 __list_del_entry include/linux/list.h:134 [inline] list_del include/linux/list.h:148 [inline] cttimeout_net_exit+0x211/0x540 net/netfilter/nfnetlink_cttimeout.c:617 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:162 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:594 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 21918: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc mm/kasan/common.c:515 [inline] ____kasan_kmalloc mm/kasan/common.c:474 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:524 kmalloc include/linux/slab.h:586 [inline] kzalloc include/linux/slab.h:714 [inline] cttimeout_new_timeout+0x51f/0xa50 net/netfilter/nfnetlink_cttimeout.c:156 nfnetlink_rcv_msg+0xbcd/0x13f0 net/netfilter/nfnetlink.c:297 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2501 nfnetlink_rcv+0x1ac/0x420 net/netfilter/nfnetlink.c:655 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x917/0xe10 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:734 ____sys_sendmsg+0x6eb/0x810 net/socket.c:2460 ___sys_sendmsg+0xf3/0x170 net/socket.c:2514 __sys_sendmsg net/socket.c:2543 [inline] __do_sys_sendmsg net/socket.c:2552 [inline] __se_sys_sendmsg net/socket.c:2550 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2550 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff8880745ac100 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 56 bytes to the right of 128-byte region [ffff8880745ac100, ffff8880745ac180) The buggy address belongs to the physical page: page:ffffea0001d16b00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x745ac flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001ea9b00 dead000000000003 ffff888010c418c0 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 3840, tgid 3840 (cmp), ts 61224091787, free_ts 61218994329 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0xba2/0x3e00 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408 __alloc_pages_node include/linux/gfp.h:587 [inline] alloc_slab_page mm/slub.c:1801 [inline] allocate_slab+0x80/0x3c0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x8df/0xf20 mm/slub.c:3005 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3092 slab_alloc_node mm/slub.c:3183 [inline] __kmalloc_node+0x2cb/0x390 mm/slub.c:4458 kmalloc_array_node include/linux/slab.h:676 [inline] kcalloc_node include/linux/slab.h:681 [inline] memcg_alloc_slab_cgroups+0x8b/0x140 mm/memcontrol.c:2810 account_slab mm/slab.h:652 [inline] allocate_slab+0x2c9/0x3c0 mm/slub.c:1960 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x8df/0xf20 mm/slub.c:3005 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3092 slab_alloc_node mm/slub.c:3183 [inline] slab_alloc mm/slub.c:3225 [inline] __kmem_cache_alloc_lru mm/slub.c:3232 [inline] kmem_cache_alloc+0x360/0x3b0 mm/slub.c:3242 vm_area_alloc+0x1c/0x110 kernel/fork.c:459 mmap_region+0x96e/0x14a0 mm/mmap.c:1771 do_mmap+0x863/0xfa0 mm/mmap.c:1582 vm_mmap_pgoff+0x1b7/0x290 mm/util.c:519 ksys_mmap_pgoff+0x40d/0x5a0 mm/mmap.c:1628 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1356 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1406 free_unref_page_prepare mm/page_alloc.c:3328 [inline] free_unref_page_list+0x16f/0xf80 mm/page_alloc.c:3460 release_pages+0xff1/0x2290 mm/swap.c:980 tlb_batch_pages_flush mm/mmu_gather.c:50 [inline] tlb_flush_mmu_free mm/mmu_gather.c:243 [inline] tlb_flush_mmu mm/mmu_gather.c:250 [inline] tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:341 exit_mmap+0x1de/0x4a0 mm/mmap.c:3142 __mmput+0x122/0x4b0 kernel/fork.c:1184 mmput+0x56/0x60 kernel/fork.c:1205 exec_mmap fs/exec.c:1034 [inline] begin_new_exec+0x101b/0x2f70 fs/exec.c:1293 load_elf_binary+0x15a3/0x4ec0 fs/binfmt_elf.c:1002 search_binary_handler fs/exec.c:1726 [inline] exec_binprm fs/exec.c:1767 [inline] bprm_execve fs/exec.c:1836 [inline] bprm_execve+0x7ef/0x1970 fs/exec.c:1798 do_execveat_common+0x727/0x890 fs/exec.c:1941 do_execve fs/exec.c:2011 [inline] __do_sys_execve fs/exec.c:2087 [inline] __se_sys_execve fs/exec.c:2082 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:2082 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff8880745ac080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880745ac100: 00 00 00 00 00 00 00 00 00 00 00 00 00 04 fc fc >ffff8880745ac180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880745ac200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880745ac280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================