================================================================== BUG: KASAN: invalid-free in skb_kfree_head net/core/skbuff.c:857 [inline] BUG: KASAN: invalid-free in skb_free_head+0xa0/0x190 net/core/skbuff.c:872 Free of addr ffff000129a27000 by task syz-executor.0/556 CPU: 1 PID: 556 Comm: syz-executor.0 Not tainted 6.3.0-rc1-syzkaller-gfe15c26ee26e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x174/0x514 mm/kasan/report.c:430 kasan_report_invalid_free+0xc4/0x114 mm/kasan/report.c:501 ____kasan_slab_free+0x1a8/0x1c0 mm/kasan/common.c:216 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3787 [inline] kmem_cache_free+0x328/0x5f8 mm/slub.c:3809 skb_kfree_head net/core/skbuff.c:857 [inline] skb_free_head+0xa0/0x190 net/core/skbuff.c:872 skb_release_data+0x428/0x5ac net/core/skbuff.c:901 skb_release_all net/core/skbuff.c:966 [inline] __kfree_skb+0x58/0x78 net/core/skbuff.c:980 tcp_wmem_free_skb include/net/tcp.h:302 [inline] tcp_rtx_queue_unlink_and_free+0x2e8/0x4a8 include/net/tcp.h:1938 tcp_clean_rtx_queue net/ipv4/tcp_input.c:3334 [inline] tcp_ack+0x1be4/0x5688 net/ipv4/tcp_input.c:3884 tcp_rcv_established+0xb34/0x2350 net/ipv4/tcp_input.c:6006 tcp_v4_do_rcv+0x390/0xb08 net/ipv4/tcp_ipv4.c:1721 sk_backlog_rcv include/net/sock.h:1113 [inline] __release_sock+0x1a8/0x408 net/core/sock.c:2921 release_sock+0x68/0x1cc net/core/sock.c:3488 tcp_sendmsg+0x4c/0x64 net/ipv4/tcp.c:1485 inet_sendmsg+0x15c/0x290 net/ipv4/af_inet.c:825 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg net/socket.c:745 [inline] sock_write_iter+0x2d8/0x448 net/socket.c:1136 call_write_iter include/linux/fs.h:1851 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x610/0x914 fs/read_write.c:584 ksys_write+0x15c/0x26c fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Allocated by task 556: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:510 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 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+0xd0/0x1c0 mm/slab_common.c:987 kmalloc_reserve+0x148/0x23c net/core/skbuff.c:539 pskb_expand_head+0x194/0x1060 net/core/skbuff.c:1995 __skb_unclone_keeptruesize+0x80/0x1e0 net/core/skbuff.c:2094 skb_unclone_keeptruesize include/linux/skbuff.h:1910 [inline] tcp_trim_head+0xec/0x588 net/ipv4/tcp_output.c:1667 tcp_tso_acked net/ipv4/tcp_input.c:3204 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3270 [inline] tcp_ack+0x16c8/0x5688 net/ipv4/tcp_input.c:3884 tcp_rcv_established+0xb34/0x2350 net/ipv4/tcp_input.c:6006 tcp_v4_do_rcv+0x390/0xb08 net/ipv4/tcp_ipv4.c:1721 sk_backlog_rcv include/net/sock.h:1113 [inline] __release_sock+0x1a8/0x408 net/core/sock.c:2921 release_sock+0x68/0x1cc net/core/sock.c:3488 tcp_sendmsg+0x4c/0x64 net/ipv4/tcp.c:1485 inet_sendmsg+0x15c/0x290 net/ipv4/af_inet.c:825 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg net/socket.c:745 [inline] sock_write_iter+0x2d8/0x448 net/socket.c:1136 call_write_iter include/linux/fs.h:1851 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x610/0x914 fs/read_write.c:584 ksys_write+0x15c/0x26c fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:491 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:501 insert_work+0x64/0x384 kernel/workqueue.c:1361 __queue_work+0xe9c/0x1604 kernel/workqueue.c:1524 queue_work_on+0x9c/0x128 kernel/workqueue.c:1552 queue_work include/linux/workqueue.h:504 [inline] xlog_bio_end_io+0x84/0x98 fs/xfs/xfs_log.c:1878 bio_endio+0x940/0x984 block/bio.c:1607 req_bio_endio block/blk-mq.c:795 [inline] blk_update_request+0x444/0xdc0 block/blk-mq.c:927 blk_mq_end_request+0x54/0x88 block/blk-mq.c:1054 blk_flush_complete_seq+0x4d0/0xa58 block/blk-flush.c:210 flush_end_io+0x79c/0xa64 block/blk-flush.c:268 __blk_mq_end_request+0x2b4/0x358 block/blk-mq.c:1044 blk_mq_end_request+0x68/0x88 block/blk-mq.c:1056 lo_complete_rq+0x140/0x258 drivers/block/loop.c:370 blk_complete_reqs block/blk-mq.c:1132 [inline] blk_done_softirq+0x11c/0x168 block/blk-mq.c:1137 __do_softirq+0x378/0xfbc kernel/softirq.c:571 Second to last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:491 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:501 __call_rcu_common kernel/rcu/tree.c:2622 [inline] call_rcu+0x104/0xb38 kernel/rcu/tree.c:2736 pwq_unbound_release_workfn+0x214/0x258 process_one_work+0x868/0x16f4 kernel/workqueue.c:2390 worker_thread+0x8e0/0xfe8 kernel/workqueue.c:2537 kthread+0x24c/0x2d4 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 The buggy address belongs to the object at ffff000129a27000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff000129a27000, ffff000129a27400) The buggy address belongs to the physical page: page:00000000c56bec1f refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x169a20 head:00000000c56bec1f order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 ffff0000c0002780 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000129a26f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff000129a26f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff000129a27000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff000129a27080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff000129a27100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================