================================================================== BUG: KASAN: double-free in slab_free mm/slub.c:3787 [inline] BUG: KASAN: double-free in __kmem_cache_free+0xaf/0x2d0 mm/slub.c:3800 Free of addr ffff888016632000 by task ksoftirqd/0/15 CPU: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 6.3.0-rc2-syzkaller-00393-gf038f3917baf #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report_invalid_free+0xe8/0x100 mm/kasan/report.c:501 ____kasan_slab_free+0x185/0x1c0 mm/kasan/common.c:225 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0xaf/0x2d0 mm/slub.c:3800 skb_kfree_head net/core/skbuff.c:858 [inline] skb_free_head+0x108/0x1a0 net/core/skbuff.c:870 skb_release_data+0x57a/0x820 net/core/skbuff.c:899 skb_release_all net/core/skbuff.c:964 [inline] __kfree_skb net/core/skbuff.c:978 [inline] consume_skb net/core/skbuff.c:1191 [inline] consume_skb+0xd0/0x170 net/core/skbuff.c:1185 j1939_xtp_rx_dat_one+0xa6b/0x10b0 net/can/j1939/transport.c:1907 j1939_xtp_rx_dat net/can/j1939/transport.c:1933 [inline] j1939_tp_recv+0x7d5/0xf50 net/can/j1939/transport.c:2127 j1939_can_recv net/can/j1939/main.c:112 [inline] j1939_can_recv+0x78e/0xa80 net/can/j1939/main.c:38 deliver net/can/af_can.c:572 [inline] can_rcv_filter+0x5d4/0x8d0 net/can/af_can.c:606 can_receive+0x31d/0x5c0 net/can/af_can.c:663 can_rcv+0x1e1/0x280 net/can/af_can.c:687 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5479 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5593 process_backlog+0x239/0x800 net/core/dev.c:5921 __napi_poll+0xb7/0x6f0 net/core/dev.c:6482 napi_poll net/core/dev.c:6549 [inline] net_rx_action+0x9c2/0xd80 net/core/dev.c:6659 __do_softirq+0x1d4/0x905 kernel/softirq.c:571 run_ksoftirqd kernel/softirq.c:934 [inline] run_ksoftirqd+0x31/0x60 kernel/softirq.c:926 smpboot_thread_fn+0x659/0x9e0 kernel/smpboot.c:164 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 8005: kasan_save_stack+0x22/0x40 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 mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0x5f/0x1a0 mm/slab_common.c:987 kmalloc_reserve+0xf0/0x270 net/core/skbuff.c:537 __alloc_skb+0x129/0x330 net/core/skbuff.c:606 alloc_skb include/linux/skbuff.h:1277 [inline] alloc_skb_with_frags+0x97/0x6c0 net/core/skbuff.c:6318 sock_alloc_send_pskb+0x7a7/0x930 net/core/sock.c:2734 sock_alloc_send_skb include/net/sock.h:1860 [inline] j1939_sk_alloc_skb net/can/j1939/socket.c:864 [inline] j1939_sk_send_loop net/can/j1939/socket.c:1121 [inline] j1939_sk_sendmsg+0x6ba/0x13a0 net/can/j1939/socket.c:1256 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 ____sys_sendmsg+0x71c/0x900 net/socket.c:2501 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2555 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2584 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 21: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0xaf/0x2d0 mm/slub.c:3800 skb_kfree_head net/core/skbuff.c:858 [inline] skb_free_head+0x108/0x1a0 net/core/skbuff.c:870 skb_release_data+0x57a/0x820 net/core/skbuff.c:899 skb_release_all net/core/skbuff.c:964 [inline] __kfree_skb net/core/skbuff.c:978 [inline] kfree_skb_reason+0x179/0x3a0 net/core/skbuff.c:1011 kfree_skb include/linux/skbuff.h:1225 [inline] j1939_session_skb_drop_old net/can/j1939/transport.c:347 [inline] j1939_xtp_rx_cts_one net/can/j1939/transport.c:1438 [inline] j1939_xtp_rx_cts+0x6a8/0x11b0 net/can/j1939/transport.c:1477 j1939_tp_cmd_recv net/can/j1939/transport.c:2065 [inline] j1939_tp_recv+0x565/0xf50 net/can/j1939/transport.c:2137 j1939_can_recv net/can/j1939/main.c:112 [inline] j1939_can_recv+0x78e/0xa80 net/can/j1939/main.c:38 deliver net/can/af_can.c:572 [inline] can_rcv_filter+0x5d4/0x8d0 net/can/af_can.c:606 can_receive+0x31d/0x5c0 net/can/af_can.c:663 can_rcv+0x1e1/0x280 net/can/af_can.c:687 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5479 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5593 process_backlog+0x239/0x800 net/core/dev.c:5921 __napi_poll+0xb7/0x6f0 net/core/dev.c:6482 napi_poll net/core/dev.c:6549 [inline] net_rx_action+0x9c2/0xd80 net/core/dev.c:6659 __do_softirq+0x1d4/0x905 kernel/softirq.c:571 The buggy address belongs to the object at ffff888016632000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 0 bytes inside of 4096-byte region [ffff888016632000, ffff888016633000) The buggy address belongs to the physical page: page:ffffea0000598c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16630 head:ffffea0000598c00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012442140 ffffea0001e12a00 dead000000000002 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 0, tgid 0 (swapper/0), ts 10000000, free_ts 0 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x1190/0x2e20 mm/page_alloc.c:4325 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:5591 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x136/0x320 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0x4e/0x190 mm/slab_common.c:980 kmalloc include/linux/slab.h:584 [inline] kzalloc include/linux/slab.h:720 [inline] con_init+0x232/0x780 drivers/tty/vt/vt.c:3475 console_init+0xba/0x5c0 kernel/printk/printk.c:3610 start_kernel+0x273/0x4d0 init/main.c:1077 secondary_startup_64_no_verify+0xce/0xdb page_owner free stack trace missing Memory state around the buggy address: ffff888016631f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888016631f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888016632000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888016632080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888016632100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================