================================================================== BUG: KASAN: slab-out-of-bounds in smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:664 Read of size 8 at addr ffff888073bb71a8 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.17.0-rc4-syzkaller #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+0x8d/0x303 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:664 sk_error_report+0x35/0x310 net/core/sock.c:340 tcp_write_err net/ipv4/tcp_timer.c:71 [inline] tcp_write_timeout net/ipv4/tcp_timer.c:276 [inline] tcp_retransmit_timer+0x20c2/0x3320 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+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:29 [inline] RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline] RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:130 [inline] RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline] RIP: 0010:acpi_idle_do_entry+0x1c6/0x250 drivers/acpi/processor_idle.c:551 Code: 89 de e8 7d 99 27 f8 84 db 75 ac e8 14 96 27 f8 e8 4f d6 2d f8 eb 0c e8 08 96 27 f8 0f 00 2d c1 8c c0 00 e8 fc 95 27 f8 fb f4 <9c> 5b 81 e3 00 02 00 00 fa 31 ff 48 89 de e8 f7 97 27 f8 48 85 db RSP: 0018:ffffffff8b807d60 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffffffff8b8bc6c0 RSI: ffffffff89506d24 RDI: 0000000000000000 RBP: ffff8881427c2864 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff817e4398 R11: 0000000000000000 R12: 0000000000000001 R13: ffff8881427c2800 R14: ffff8881427c2864 R15: ffff888146c48804 acpi_idle_enter+0x361/0x500 drivers/acpi/processor_idle.c:687 cpuidle_enter_state+0x1b1/0xc80 drivers/cpuidle/cpuidle.c:237 cpuidle_enter+0x4a/0xa0 drivers/cpuidle/cpuidle.c:351 call_cpuidle kernel/sched/idle.c:158 [inline] cpuidle_idle_call kernel/sched/idle.c:239 [inline] do_idle+0x3e8/0x590 kernel/sched/idle.c:306 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:403 start_kernel+0x47a/0x49b init/main.c:1138 secondary_startup_64_no_verify+0xc3/0xcb Allocated by task 18822: 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+0xa6/0xd0 mm/kasan/common.c:524 kasan_kmalloc include/linux/kasan.h:270 [inline] kmem_cache_alloc_trace+0x1ea/0x4a0 mm/slab.c:3567 kmalloc include/linux/slab.h:581 [inline] kzalloc include/linux/slab.h:715 [inline] kobject_uevent_env+0x235/0x1600 lib/kobject_uevent.c:524 __kobject_del+0x169/0x200 lib/kobject.c:617 kobject_cleanup lib/kobject.c:696 [inline] kobject_release lib/kobject.c:736 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2b6/0x540 lib/kobject.c:753 net_rx_queue_update_kobjects+0x3f3/0x510 net/core/net-sysfs.c:1115 remove_queue_kobjects net/core/net-sysfs.c:1816 [inline] netdev_unregister_kobject+0x158/0x280 net/core/net-sysfs.c:1970 unregister_netdevice_many+0xd60/0x18d0 net/core/dev.c:10442 __rtnl_newlink+0x1440/0x1760 net/core/rtnetlink.c:3512 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3529 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5594 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x539/0x7e0 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2413 ___sys_sendmsg+0xf3/0x170 net/socket.c:2467 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2496 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 Freed by task 18822: 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+0xff/0x140 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:236 [inline] __cache_free mm/slab.c:3437 [inline] kfree+0xf8/0x2b0 mm/slab.c:3794 kobject_uevent_env+0x2a7/0x1600 lib/kobject_uevent.c:626 __kobject_del+0x169/0x200 lib/kobject.c:617 kobject_cleanup lib/kobject.c:696 [inline] kobject_release lib/kobject.c:736 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2b6/0x540 lib/kobject.c:753 net_rx_queue_update_kobjects+0x3f3/0x510 net/core/net-sysfs.c:1115 remove_queue_kobjects net/core/net-sysfs.c:1816 [inline] netdev_unregister_kobject+0x158/0x280 net/core/net-sysfs.c:1970 unregister_netdevice_many+0xd60/0x18d0 net/core/dev.c:10442 __rtnl_newlink+0x1440/0x1760 net/core/rtnetlink.c:3512 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3529 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5594 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x539/0x7e0 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2413 ___sys_sendmsg+0xf3/0x170 net/socket.c:2467 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2496 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 ffff888073bb6000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 424 bytes to the right of 4096-byte region [ffff888073bb6000, ffff888073bb7000) The buggy address belongs to the page: page:ffffea0001ceed80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x73bb6 head:ffffea0001ceed80 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00019c4108 ffffea0001ddbc08 ffff888010c40900 raw: 0000000000000000 ffff888073bb6000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 18822, ts 772305154007, free_ts 772263641972 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4165 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5389 __alloc_pages_node include/linux/gfp.h:572 [inline] kmem_getpages mm/slab.c:1378 [inline] cache_grow_begin+0x75/0x390 mm/slab.c:2584 cache_alloc_refill+0x27f/0x380 mm/slab.c:2957 ____cache_alloc mm/slab.c:3040 [inline] ____cache_alloc mm/slab.c:3023 [inline] __do_cache_alloc mm/slab.c:3267 [inline] slab_alloc mm/slab.c:3308 [inline] kmem_cache_alloc_trace+0x380/0x4a0 mm/slab.c:3565 kmalloc include/linux/slab.h:581 [inline] kzalloc include/linux/slab.h:715 [inline] kobject_uevent_env+0x235/0x1600 lib/kobject_uevent.c:524 __kobject_del+0x169/0x200 lib/kobject.c:617 kobject_cleanup lib/kobject.c:696 [inline] kobject_release lib/kobject.c:736 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2b6/0x540 lib/kobject.c:753 net_rx_queue_update_kobjects+0x3f3/0x510 net/core/net-sysfs.c:1115 remove_queue_kobjects net/core/net-sysfs.c:1816 [inline] netdev_unregister_kobject+0x158/0x280 net/core/net-sysfs.c:1970 unregister_netdevice_many+0xd60/0x18d0 net/core/dev.c:10442 __rtnl_newlink+0x1440/0x1760 net/core/rtnetlink.c:3512 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3529 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5594 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x539/0x7e0 net/netlink/af_netlink.c:1343 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1352 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1404 free_unref_page_prepare mm/page_alloc.c:3325 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3404 slab_destroy mm/slab.c:1630 [inline] slabs_destroy+0x89/0xc0 mm/slab.c:1650 cache_flusharray mm/slab.c:3410 [inline] ___cache_free+0x303/0x600 mm/slab.c:3472 qlink_free mm/kasan/quarantine.c:157 [inline] qlist_free_all+0x50/0x1a0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:446 kasan_slab_alloc include/linux/kasan.h:260 [inline] slab_post_alloc_hook mm/slab.h:732 [inline] slab_alloc mm/slab.c:3315 [inline] kmem_cache_alloc+0x265/0x560 mm/slab.c:3499 kmem_cache_zalloc include/linux/slab.h:705 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:585 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:647 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:987 sysfs_add_file_mode_ns+0x20f/0x3f0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x322/0xb10 fs/sysfs/group.c:148 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:188 internal_create_groups fs/sysfs/group.c:184 [inline] sysfs_create_groups+0x25/0x50 fs/sysfs/group.c:214 device_add_groups drivers/base/core.c:2471 [inline] device_add_attrs drivers/base/core.c:2619 [inline] device_add+0x78b/0x1e20 drivers/base/core.c:3356 Memory state around the buggy address: ffff888073bb7080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888073bb7100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888073bb7180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888073bb7200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888073bb7280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 89 de mov %ebx,%esi 2: e8 7d 99 27 f8 callq 0xf8279984 7: 84 db test %bl,%bl 9: 75 ac jne 0xffffffb7 b: e8 14 96 27 f8 callq 0xf8279624 10: e8 4f d6 2d f8 callq 0xf82dd664 15: eb 0c jmp 0x23 17: e8 08 96 27 f8 callq 0xf8279624 1c: 0f 00 2d c1 8c c0 00 verw 0xc08cc1(%rip) # 0xc08ce4 23: e8 fc 95 27 f8 callq 0xf8279624 28: fb sti 29: f4 hlt * 2a: 9c pushfq <-- trapping instruction 2b: 5b pop %rbx 2c: 81 e3 00 02 00 00 and $0x200,%ebx 32: fa cli 33: 31 ff xor %edi,%edi 35: 48 89 de mov %rbx,%rsi 38: e8 f7 97 27 f8 callq 0xf8279834 3d: 48 85 db test %rbx,%rbx