================================================================== BUG: KASAN: use-after-free in kill_pending_fw_fallback_reqs+0x66/0x290 drivers/base/firmware_loader/fallback.c:116 Read of size 8 at addr ffff88804d3be6c0 by task syz-executor.1/19340 CPU: 1 PID: 19340 Comm: syz-executor.1 Not tainted 5.14.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+0x1ae/0x29f lib/dump_stack.c:105 print_address_description+0x66/0x3b0 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report+0x163/0x210 mm/kasan/report.c:436 kill_pending_fw_fallback_reqs+0x66/0x290 drivers/base/firmware_loader/fallback.c:116 fw_pm_notify+0x5d/0xe0 drivers/base/firmware_loader/main.c:1450 notifier_call_chain kernel/notifier.c:83 [inline] notifier_call_chain_robust kernel/notifier.c:118 [inline] blocking_notifier_call_chain_robust+0x13b/0x380 kernel/notifier.c:302 pm_notifier_call_chain_robust+0x27/0x50 kernel/power/main.c:87 snapshot_open+0x122/0x260 kernel/power/user.c:85 misc_open+0x346/0x3c0 drivers/char/misc.c:141 chrdev_open+0x53b/0x5f0 fs/char_dev.c:414 do_dentry_open+0x7cb/0x1020 fs/open.c:826 do_open fs/namei.c:3374 [inline] path_openat+0x27e7/0x36b0 fs/namei.c:3507 do_filp_open+0x253/0x4d0 fs/namei.c:3534 do_sys_openat2+0x124/0x460 fs/open.c:1204 do_sys_open fs/open.c:1220 [inline] __do_sys_openat fs/open.c:1236 [inline] __se_sys_openat fs/open.c:1231 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1231 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665e9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8c1c4e5188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000062081 RSI: 0000000020000000 RDI: ffffffffffffff9c RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffceff6bf7f R14: 00007f8c1c4e5300 R15: 0000000000022000 Allocated by task 8410: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x96/0xd0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:2956 [inline] kmem_cache_alloc_node+0x200/0x370 mm/slub.c:2992 __alloc_skb+0xd8/0x580 net/core/skbuff.c:414 alloc_skb_fclone include/linux/skbuff.h:1162 [inline] sk_stream_alloc_skb+0x1f4/0xb40 net/ipv4/tcp.c:887 tcp_sendmsg_locked+0xcbc/0x4230 net/ipv4/tcp.c:1309 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1461 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg net/socket.c:723 [inline] sock_write_iter+0x398/0x520 net/socket.c:1056 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xa39/0xc90 fs/read_write.c:605 ksys_write+0x171/0x2a0 fs/read_write.c:658 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 8440: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0x109/0x150 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1625 [inline] slab_free_freelist_hook+0x1d8/0x290 mm/slub.c:1650 slab_free mm/slub.c:3210 [inline] kmem_cache_free+0x85/0x170 mm/slub.c:3226 tcp_rtx_queue_unlink_and_free include/net/tcp.h:1872 [inline] tcp_clean_rtx_queue+0xb24/0x31d0 net/ipv4/tcp_input.c:3275 tcp_ack+0x1999/0x42d0 net/ipv4/tcp_input.c:3820 tcp_rcv_established+0xd68/0x22b0 net/ipv4/tcp_input.c:5811 tcp_v4_do_rcv+0x3a1/0x880 net/ipv4/tcp_ipv4.c:1694 tcp_v4_rcv+0x3aa1/0x4880 net/ipv4/tcp_ipv4.c:2087 ip_protocol_deliver_rcu+0x1ed/0x3b0 net/ipv4/ip_input.c:204 ip_local_deliver_finish net/ipv4/ip_input.c:231 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ip_local_deliver+0x316/0x490 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:458 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:551 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:601 [inline] ip_sublist_rcv+0xa8b/0xb70 net/ipv4/ip_input.c:609 ip_list_rcv+0x443/0x490 net/ipv4/ip_input.c:644 __netif_receive_skb_list_ptype net/core/dev.c:5541 [inline] __netif_receive_skb_list_core+0x71e/0x930 net/core/dev.c:5589 __netif_receive_skb_list+0x4a0/0x580 net/core/dev.c:5641 netif_receive_skb_list_internal+0x2dc/0x880 net/core/dev.c:5751 gro_normal_list net/core/dev.c:5905 [inline] napi_complete_done+0x34d/0x7f0 net/core/dev.c:6627 virtqueue_napi_complete drivers/net/virtio_net.c:337 [inline] virtnet_poll+0xb19/0x11a0 drivers/net/virtio_net.c:1546 __napi_poll+0xba/0x4f0 net/core/dev.c:7047 napi_poll net/core/dev.c:7114 [inline] net_rx_action+0x62c/0xf30 net/core/dev.c:7201 __do_softirq+0x372/0x783 kernel/softirq.c:558 The buggy address belongs to the object at ffff88804d3be500 which belongs to the cache skbuff_fclone_cache of size 472 The buggy address is located 448 bytes inside of 472-byte region [ffff88804d3be500, ffff88804d3be6d8) The buggy address belongs to the page: page:ffffea000134ef80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4d3be head:ffffea000134ef80 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff8880122e9c80 raw: 0000000000000000 00000000000c000c 00000001ffffffff 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8406, ts 1053522336604, free_ts 1052232497425 prep_new_page mm/page_alloc.c:2436 [inline] get_page_from_freelist+0x779/0xa30 mm/page_alloc.c:4169 __alloc_pages+0x26c/0x5f0 mm/page_alloc.c:5391 alloc_slab_page mm/slub.c:1688 [inline] allocate_slab+0xf1/0x540 mm/slub.c:1828 new_slab mm/slub.c:1891 [inline] new_slab_objects mm/slub.c:2637 [inline] ___slab_alloc+0x1cf/0x350 mm/slub.c:2800 __slab_alloc mm/slub.c:2840 [inline] slab_alloc_node mm/slub.c:2922 [inline] kmem_cache_alloc_node+0x2ca/0x370 mm/slub.c:2992 __alloc_skb+0xd8/0x580 net/core/skbuff.c:414 alloc_skb_fclone include/linux/skbuff.h:1162 [inline] sk_stream_alloc_skb+0x1f4/0xb40 net/ipv4/tcp.c:887 tcp_sendmsg_locked+0xcbc/0x4230 net/ipv4/tcp.c:1309 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1461 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg net/socket.c:723 [inline] sock_write_iter+0x398/0x520 net/socket.c:1056 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xa39/0xc90 fs/read_write.c:605 ksys_write+0x171/0x2a0 fs/read_write.c:658 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1346 [inline] free_pcp_prepare+0xc29/0xd20 mm/page_alloc.c:1397 free_unref_page_prepare mm/page_alloc.c:3332 [inline] free_unref_page+0x7e/0x550 mm/page_alloc.c:3411 free_slab mm/slub.c:1931 [inline] discard_slab mm/slub.c:1937 [inline] __slab_free+0x5c0/0x6b0 mm/slub.c:3140 do_slab_free mm/slub.c:3198 [inline] ___cache_free+0xfc/0x120 mm/slub.c:3217 qlist_free_all mm/kasan/quarantine.c:165 [inline] kasan_quarantine_reduce+0x151/0x1c0 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:2956 [inline] __kmalloc_node+0x22a/0x430 mm/slub.c:4156 kmalloc_node include/linux/slab.h:614 [inline] __vmalloc_area_node mm/vmalloc.c:2849 [inline] __vmalloc_node_range+0x2c5/0x7f0 mm/vmalloc.c:2966 alloc_thread_stack_node kernel/fork.c:245 [inline] dup_task_struct+0x65a/0x980 kernel/fork.c:875 copy_process+0x615/0x5b00 kernel/fork.c:1952 kernel_clone+0x21a/0x7d0 kernel/fork.c:2509 __do_sys_clone kernel/fork.c:2626 [inline] __se_sys_clone kernel/fork.c:2610 [inline] __x64_sys_clone+0x236/0x2b0 kernel/fork.c:2610 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff88804d3be580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804d3be600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804d3be680: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ^ ffff88804d3be700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804d3be780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================