================================================================== 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 ffff88803c7660c0 by task syz-executor.0/30350 CPU: 0 PID: 30350 Comm: syz-executor.0 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:00007fbe46ce2188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000004040 RSI: 0000000020008580 RDI: ffffffffffffff9c RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffcbba6f8df R14: 00007fbe46ce2300 R15: 0000000000022000 Allocated by task 4868: 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] kmem_cache_alloc_trace+0x1e4/0x480 mm/slab.c:3575 kmalloc include/linux/slab.h:591 [inline] inode_doinit_use_xattr+0x54/0x340 security/selinux/hooks.c:1389 inode_doinit_with_dentry+0x10ec/0x12e0 security/selinux/hooks.c:1580 selinux_d_instantiate+0x23/0x30 security/selinux/hooks.c:6444 security_d_instantiate+0x50/0xe0 security/security.c:2038 d_splice_alias+0x8c/0xc60 fs/dcache.c:3064 kernfs_iop_lookup+0x1ac/0x220 fs/kernfs/dir.c:1107 __lookup_slow+0x24c/0x480 fs/namei.c:1646 lookup_slow fs/namei.c:1663 [inline] walk_component+0x40f/0x6a0 fs/namei.c:1959 lookup_last fs/namei.c:2414 [inline] path_lookupat+0x1bb/0x860 fs/namei.c:2438 filename_lookup+0x1c6/0x5b0 fs/namei.c:2467 do_readlinkat+0xcd/0x2f0 fs/stat.c:425 __do_sys_readlinkat fs/stat.c:452 [inline] __se_sys_readlinkat fs/stat.c:449 [inline] __x64_sys_readlinkat+0x93/0xf0 fs/stat.c:449 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] fixup_permanent_addr net/ipv6/addrconf.c:3435 [inline] addrconf_permanent_addr net/ipv6/addrconf.c:3463 [inline] addrconf_notify+0x1d4d/0x2400 net/ipv6/addrconf.c:3531 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 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3508 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 ffff88803c766000 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 192 bytes inside of 256-byte region [ffff88803c766000, ffff88803c766100) The buggy address belongs to the page: page:ffffea0000f1d980 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88803c766000 pfn:0x3c766 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000bdf8c8 ffffea0000aaa048 ffff888010840500 raw: ffff88803c766000 ffff88803c766000 0000000100000007 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 8469, ts 285198794647, free_ts 285147949263 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+0x476/0x500 net/ipv4/fib_frontend.c:1129 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 slab_destroy mm/slab.c:1627 [inline] slabs_destroy+0x89/0xc0 mm/slab.c:1647 cache_flusharray mm/slab.c:3418 [inline] ___cache_free+0x4c6/0x610 mm/slab.c:3480 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x4e/0x110 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x8b/0xa0 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 mm/slab.c:3323 [inline] kmem_cache_alloc_trace+0x256/0x480 mm/slab.c:3573 kmalloc include/linux/slab.h:591 [inline] syslog_print+0xb2/0x430 kernel/printk/printk.c:1491 do_syslog.part.0+0x367/0x830 kernel/printk/printk.c:1661 do_syslog+0x49/0x60 kernel/printk/printk.c:1641 kmsg_read+0x90/0xb0 fs/proc/kmsg.c:40 pde_read fs/proc/inode.c:311 [inline] proc_reg_read+0x119/0x300 fs/proc/inode.c:321 vfs_read+0x1b5/0x570 fs/read_write.c:494 ksys_read+0x12d/0x250 fs/read_write.c:634 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 Memory state around the buggy address: ffff88803c765f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803c766000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88803c766080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803c766100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803c766180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================