================================================================== BUG: KASAN: use-after-free in smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:772 Read of size 8 at addr ffff88801e0f1068 by task syz-fuzzer/3592 CPU: 1 PID: 3592 Comm: syz-fuzzer Not tainted 5.18.0-rc1-syzkaller-00454-gcaf968b48335 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+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 smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:772 sk_error_report+0x35/0x310 net/core/sock.c:342 tcp_write_err net/ipv4/tcp_timer.c:71 [inline] tcp_write_timeout net/ipv4/tcp_timer.c:276 [inline] tcp_retransmit_timer+0x16c5/0x3360 net/ipv4/tcp_timer.c:512 tcp_write_timer_handler+0x5e6/0xbc0 net/ipv4/tcp_timer.c:622 tcp_write_timer+0xa2/0x2b0 net/ipv4/tcp_timer.c:642 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x67c/0xa30 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x45/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:645 RIP: 0033:0x41e123 Code: 49 8d 94 24 00 00 02 00 e9 6e 01 00 00 48 01 53 10 48 8b ac 24 88 00 00 00 48 81 c4 90 00 00 00 c3 48 89 54 24 50 31 c0 eb 04 <48> 83 c0 08 48 39 c2 0f 86 04 01 00 00 45 0f b6 11 44 89 c1 45 89 RSP: 002b:000000c00003de88 EFLAGS: 00000246 RAX: 0000000000000038 RBX: 000000c000021e98 RCX: 0000000000000003 RDX: 0000000000000040 RSI: 0000000000203001 RDI: 00007fd3e1e8d060 RBP: 000000c00003df10 R08: 0000000000000000 R09: 00007fd3e2057a6a R10: 0000000000000137 R11: 00007fd3e2109fff R12: 000000c0069b4d00 R13: 000000c0047d1370 R14: 000000c000001a00 R15: 00007fd3e16211de Allocated by task 0: (stack is not available) Freed by task 26535: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free+0x166/0x1a0 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1754 slab_free mm/slub.c:3510 [inline] kfree+0xd6/0x4d0 mm/slub.c:4552 skb_free_head+0xac/0x110 net/core/skbuff.c:655 skb_release_data+0x67a/0x810 net/core/skbuff.c:677 skb_release_all net/core/skbuff.c:742 [inline] __kfree_skb net/core/skbuff.c:756 [inline] consume_skb net/core/skbuff.c:915 [inline] consume_skb+0xc2/0x160 net/core/skbuff.c:909 nlmon_xmit+0xa4/0xe0 drivers/net/nlmon.c:15 __netdev_start_xmit include/linux/netdevice.h:4731 [inline] netdev_start_xmit include/linux/netdevice.h:4745 [inline] xmit_one net/core/dev.c:3537 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3553 __dev_queue_xmit+0x2b81/0x39c0 net/core/dev.c:4181 __netlink_deliver_tap_skb net/netlink/af_netlink.c:307 [inline] __netlink_deliver_tap net/netlink/af_netlink.c:325 [inline] netlink_deliver_tap+0x9e3/0xc40 net/netlink/af_netlink.c:338 netlink_deliver_tap_kernel net/netlink/af_netlink.c:347 [inline] netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5f5/0x7f0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 sock_no_sendpage+0xf6/0x140 net/core/sock.c:3126 kernel_sendpage.part.0+0x1ff/0x7b0 net/socket.c:3492 kernel_sendpage net/socket.c:3489 [inline] sock_sendpage+0xdf/0x140 net/socket.c:1007 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x43e/0x8a0 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xd4/0x140 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0x110/0x180 fs/splice.c:936 splice_direct_to_actor+0x34b/0x8c0 fs/splice.c:891 do_splice_direct+0x1a7/0x270 fs/splice.c:979 do_sendfile+0xae0/0x1240 fs/read_write.c:1246 __do_sys_sendfile64 fs/read_write.c:1311 [inline] __se_sys_sendfile64 fs/read_write.c:1297 [inline] __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1297 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 ffff88801e0f0000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4200 bytes inside of 8192-byte region [ffff88801e0f0000, ffff88801e0f2000) The buggy address belongs to the physical page: page:ffffea0000783c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1e0f0 head:ffffea0000783c00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888010c42280 raw: 0000000000000000 0000000000020002 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 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 26535, tgid 26533 (syz-executor.2), ts 586164012753, free_ts 586141648274 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0xba2/0x3df0 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2262 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x26c/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_track_caller+0x2cb/0x360 mm/slub.c:4947 kmalloc_reserve net/core/skbuff.c:354 [inline] __alloc_skb+0xde/0x340 net/core/skbuff.c:426 alloc_skb include/linux/skbuff.h:1324 [inline] netlink_to_full_skb net/netlink/af_netlink.c:173 [inline] __netlink_deliver_tap_skb net/netlink/af_netlink.c:298 [inline] __netlink_deliver_tap net/netlink/af_netlink.c:325 [inline] netlink_deliver_tap+0x66d/0xc40 net/netlink/af_netlink.c:338 netlink_deliver_tap_kernel net/netlink/af_netlink.c:347 [inline] netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5f5/0x7f0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 sock_no_sendpage+0xf6/0x140 net/core/sock.c:3126 kernel_sendpage.part.0+0x1ff/0x7b0 net/socket.c:3492 kernel_sendpage net/socket.c:3489 [inline] sock_sendpage+0xdf/0x140 net/socket.c:1007 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 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+0x19/0x690 mm/page_alloc.c:3423 qlink_free mm/kasan/quarantine.c:157 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:446 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:749 [inline] slab_alloc_node mm/slub.c:3217 [inline] slab_alloc mm/slub.c:3225 [inline] __kmem_cache_alloc_lru mm/slub.c:3232 [inline] kmem_cache_alloc+0x204/0x3b0 mm/slub.c:3242 ptlock_alloc+0x1d/0x70 mm/memory.c:5519 ptlock_init include/linux/mm.h:2300 [inline] pgtable_pte_page_ctor include/linux/mm.h:2327 [inline] __pte_alloc_one include/asm-generic/pgalloc.h:66 [inline] pte_alloc_one+0x68/0x230 arch/x86/mm/pgtable.c:33 __pte_alloc+0x69/0x250 mm/memory.c:465 do_anonymous_page mm/memory.c:3794 [inline] handle_pte_fault mm/memory.c:4625 [inline] __handle_mm_fault+0x3c0a/0x4150 mm/memory.c:4763 handle_mm_fault+0x1c8/0x790 mm/memory.c:4861 do_user_addr_fault+0x489/0x11c0 arch/x86/mm/fault.c:1397 handle_page_fault arch/x86/mm/fault.c:1484 [inline] exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1540 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:570 Memory state around the buggy address: ffff88801e0f0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801e0f0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801e0f1000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801e0f1080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801e0f1100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================