================================================================== 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 ffff888033fdf6c0 by task syz-executor.3/26769 CPU: 0 PID: 26769 Comm: syz-executor.3 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+0x209/0x2a0 kernel/power/user.c:85 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:00007fe1a92d3188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000101001 RSI: 0000000020001400 RDI: ffffffffffffff9c RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fffb9651daf R14: 00007fe1a92d3300 R15: 0000000000022000 Allocated by task 24056: 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+0xcd3/0x12e0 security/selinux/hooks.c:1516 sb_finish_set_opts+0x21d/0x7f0 security/selinux/hooks.c:591 selinux_set_mnt_opts+0xe76/0x16c0 security/selinux/hooks.c:881 security_sb_set_mnt_opts+0x6f/0xd0 security/security.c:980 vfs_get_tree+0x18f/0x2f0 fs/super.c:1523 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x132a/0x1fa0 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3433 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 ffff888033fdf600 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 192 bytes inside of 256-byte region [ffff888033fdf600, ffff888033fdf700) The buggy address belongs to the page: page:ffffea0000cff7c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888033fdfe00 pfn:0x33fdf flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00009a8548 ffffea0000ab9688 ffff888010840500 raw: ffff888033fdfe00 ffff888033fdf000 0000000100000004 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 8476, ts 199257972229, free_ts 199202209668 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] kmem_cache_alloc_trace+0x38c/0x480 mm/slab.c:3573 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] fib6_info_alloc+0xc1/0x210 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x33e/0x1aa0 net/ipv6/route.c:3762 ip6_route_add+0x24/0x150 net/ipv6/route.c:3856 addrconf_prefix_route+0x30a/0x4e0 net/ipv6/addrconf.c:2415 sit_add_v4_addrs net/ipv6/addrconf.c:3137 [inline] addrconf_sit_config net/ipv6/addrconf.c:3387 [inline] addrconf_notify+0x1a96/0x2400 net/ipv6/addrconf.c:3580 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_node mm/slab.c:3261 [inline] kmem_cache_alloc_node+0x31d/0x590 mm/slab.c:3599 alloc_task_struct_node kernel/fork.c:171 [inline] dup_task_struct kernel/fork.c:871 [inline] copy_process+0x5c8/0x74d0 kernel/fork.c:1952 kernel_clone+0xe7/0xac0 kernel/fork.c:2509 kernel_thread+0xb5/0xf0 kernel/fork.c:2561 create_kthread kernel/kthread.c:342 [inline] kthreadd+0x4ea/0x750 kernel/kthread.c:685 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff888033fdf580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888033fdf600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888033fdf680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888033fdf700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888033fdf780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================