================================================================== BUG: KASAN: use-after-free in kill_pending_fw_fallback_reqs+0x2fb/0x370 drivers/base/firmware_loader/fallback.c:116 Read of size 8 at addr ffff88802f8230c0 by task syz-executor.5/13639 CPU: 0 PID: 13639 Comm: syz-executor.5 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+0xcd/0x134 lib/dump_stack.c:105 print_address_description.constprop.0.cold+0x6c/0x2d6 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:436 kill_pending_fw_fallback_reqs+0x2fb/0x370 drivers/base/firmware_loader/fallback.c:116 fw_pm_notify+0xa2/0x140 drivers/base/firmware_loader/main.c:1450 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 notifier_call_chain_robust kernel/notifier.c:118 [inline] blocking_notifier_call_chain_robust kernel/notifier.c:302 [inline] blocking_notifier_call_chain_robust+0xc4/0x160 kernel/notifier.c:290 pm_notifier_call_chain_robust+0x26/0x60 kernel/power/main.c:87 snapshot_open+0x190/0x2a0 kernel/power/user.c:75 misc_open+0x372/0x4a0 drivers/char/misc.c:141 chrdev_open+0x266/0x770 fs/char_dev.c:414 do_dentry_open+0x4c8/0x11d0 fs/open.c:826 do_open fs/namei.c:3374 [inline] path_openat+0x1c23/0x27f0 fs/namei.c:3507 do_filp_open+0x1aa/0x400 fs/namei.c:3534 do_sys_openat2+0x16d/0x420 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+0x13f/0x1f0 fs/open.c:1231 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 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:00007f7b50759188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000141000 RSI: 0000000020000000 RDI: ffffffffffffff9c RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffd018aad6f R14: 00007f7b50759300 R15: 0000000000022000 Allocated by task 11954: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0x98/0xc0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] __do_kmalloc mm/slab.c:3702 [inline] __kmalloc_track_caller+0x212/0x4d0 mm/slab.c:3717 copy_array+0xc5/0xe0 kernel/bpf/verifier.c:759 copy_stack_state kernel/bpf/verifier.c:805 [inline] copy_func_state kernel/bpf/verifier.c:922 [inline] copy_verifier_state+0x71e/0xb80 kernel/bpf/verifier.c:958 push_stack+0x1d2/0x560 kernel/bpf/verifier.c:1029 check_cond_jmp_op kernel/bpf/verifier.c:8799 [inline] do_check kernel/bpf/verifier.c:10867 [inline] do_check_common+0x6b4e/0xd2d0 kernel/bpf/verifier.c:12802 do_check_main kernel/bpf/verifier.c:12865 [inline] bpf_check+0x9a1c/0xca80 kernel/bpf/verifier.c:13432 bpf_prog_load+0xe57/0x21e0 kernel/bpf/syscall.c:2274 __sys_bpf+0x64f/0x4760 kernel/bpf/syscall.c:4469 __do_sys_bpf kernel/bpf/syscall.c:4573 [inline] __se_sys_bpf kernel/bpf/syscall.c:4571 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4571 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 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xa4/0xd0 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3029 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3109 fib6_info_release include/net/ip6_fib.h:337 [inline] fib6_info_release include/net/ip6_fib.h:334 [inline] ip6_route_info_create+0x16bb/0x1aa0 net/ipv6/route.c:3842 ip6_route_add+0x24/0x150 net/ipv6/route.c:3856 addrconf_prefix_route+0x30a/0x4e0 net/ipv6/addrconf.c:2415 inet6_addr_add+0x719/0xae0 net/ipv6/addrconf.c:2948 inet6_rtm_newaddr+0xf00/0x1970 net/ipv6/addrconf.c:4871 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5574 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:723 __sys_sendto+0x21c/0x320 net/socket.c:2019 __do_sys_sendto net/socket.c:2031 [inline] __se_sys_sendto net/socket.c:2027 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2027 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 ffff88802f823000 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 192 bytes inside of 256-byte region [ffff88802f823000, ffff88802f823100) The buggy address belongs to the page: page:ffffea0000be08c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802f823200 pfn:0x2f823 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000bdd708 ffffea0000ab5788 ffff888010840500 raw: ffff88802f823200 ffff88802f823000 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 8788, ts 229666148985, free_ts 229665103395 prep_new_page mm/page_alloc.c:2436 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4169 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5391 __alloc_pages_node include/linux/gfp.h:570 [inline] kmem_getpages mm/slab.c:1377 [inline] cache_grow_begin+0x75/0x460 mm/slab.c:2593 cache_alloc_refill+0x27f/0x380 mm/slab.c:2965 ____cache_alloc mm/slab.c:3048 [inline] ____cache_alloc mm/slab.c:3031 [inline] __do_cache_alloc mm/slab.c:3275 [inline] slab_alloc mm/slab.c:3316 [inline] __do_kmalloc mm/slab.c:3700 [inline] __kmalloc+0x3d5/0x4d0 mm/slab.c:3711 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] fib_create_info+0x8a7/0x4890 net/ipv4/fib_semantics.c:1419 fib_table_insert+0x1cd/0x1af0 net/ipv4/fib_trie.c:1224 fib_magic+0x455/0x540 net/ipv4/fib_frontend.c:1087 fib_add_ifaddr+0x395/0x500 net/ipv4/fib_frontend.c:1122 fib_netdev_event+0x46f/0x680 net/ipv4/fib_frontend.c:1466 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2123 call_netdevice_notifiers_extack net/core/dev.c:2135 [inline] call_netdevice_notifiers net/core/dev.c:2149 [inline] __dev_notify_flags+0x110/0x2b0 net/core/dev.c:8860 dev_change_flags+0x112/0x170 net/core/dev.c:8898 do_setlink+0x90a/0x3900 net/core/rtnetlink.c:2721 __rtnl_newlink+0xddb/0x1760 net/core/rtnetlink.c:3393 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+0x2c5/0x780 mm/page_alloc.c:1397 free_unref_page_prepare mm/page_alloc.c:3332 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3411 __vunmap+0x783/0xb70 mm/vmalloc.c:2587 free_work+0x58/0x70 mm/vmalloc.c:82 process_one_work+0x98d/0x1630 kernel/workqueue.c:2276 worker_thread+0x658/0x11f0 kernel/workqueue.c:2422 kthread+0x3e5/0x4d0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88802f822f80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff88802f823000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802f823080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802f823100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802f823180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================