platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 platform regulatory.0: Falling back to sysfs fallback for: regulatory.db ================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x36/0xc0 lib/list_debug.c:23 Read of size 8 at addr ffff888013a8acc8 by task syz-executor.0/9897 CPU: 0 PID: 9897 Comm: syz-executor.0 Not tainted 5.12.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x176/0x24e lib/dump_stack.c:120 print_address_description+0x5f/0x3a0 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report+0x15c/0x200 mm/kasan/report.c:416 __list_add_valid+0x36/0xc0 lib/list_debug.c:23 __list_add include/linux/list.h:67 [inline] list_add include/linux/list.h:86 [inline] fw_load_sysfs_fallback+0x110/0x720 drivers/base/firmware_loader/fallback.c:516 fw_load_from_user_helper+0x242/0x320 drivers/base/firmware_loader/fallback.c:581 _request_firmware+0x2c5/0x4c0 drivers/base/firmware_loader/main.c:831 request_firmware+0x35/0x50 drivers/base/firmware_loader/main.c:875 reg_reload_regdb+0x3a/0x1b0 net/wireless/reg.c:1095 genl_family_rcv_msg_doit net/netlink/genetlink.c:739 [inline] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0xe4e/0x1280 net/netlink/genetlink.c:800 netlink_rcv_skb+0x190/0x3a0 net/netlink/af_netlink.c:2502 genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x786/0x940 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x9ae/0xd50 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x519/0x800 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmsg+0x2bf/0x370 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466459 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:00007f7b00451188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000003 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffd2b8048ef R14: 00007f7b00451300 R15: 0000000000022000 Allocated by task 9889: 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:427 [inline] ____kasan_kmalloc+0xc2/0xf0 mm/kasan/common.c:506 kasan_kmalloc include/linux/kasan.h:233 [inline] kmem_cache_alloc_trace+0x21b/0x350 mm/slub.c:2934 kmalloc include/linux/slab.h:554 [inline] kzalloc include/linux/slab.h:684 [inline] __allocate_fw_priv+0x98/0x340 drivers/base/firmware_loader/main.c:186 alloc_lookup_fw_priv+0x1c3/0x380 drivers/base/firmware_loader/main.c:250 _request_firmware_prepare+0x23c/0x5b0 drivers/base/firmware_loader/main.c:744 _request_firmware+0xd9/0x4c0 drivers/base/firmware_loader/main.c:806 request_firmware+0x35/0x50 drivers/base/firmware_loader/main.c:875 reg_reload_regdb+0x3a/0x1b0 net/wireless/reg.c:1095 genl_family_rcv_msg_doit net/netlink/genetlink.c:739 [inline] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0xe4e/0x1280 net/netlink/genetlink.c:800 netlink_rcv_skb+0x190/0x3a0 net/netlink/af_netlink.c:2502 genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x786/0x940 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x9ae/0xd50 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x519/0x800 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmsg+0x2bf/0x370 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 9889: 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:357 ____kasan_slab_free+0x100/0x140 mm/kasan/common.c:360 kasan_slab_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x171/0x270 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kfree+0xcf/0x2d0 mm/slub.c:4213 kref_put include/linux/kref.h:65 [inline] free_fw_priv drivers/base/firmware_loader/main.c:289 [inline] firmware_free_data drivers/base/firmware_loader/main.c:584 [inline] release_firmware+0x139/0x1b0 drivers/base/firmware_loader/main.c:1053 _request_firmware+0x3e1/0x4c0 drivers/base/firmware_loader/main.c:839 request_firmware+0x35/0x50 drivers/base/firmware_loader/main.c:875 reg_reload_regdb+0x3a/0x1b0 net/wireless/reg.c:1095 genl_family_rcv_msg_doit net/netlink/genetlink.c:739 [inline] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0xe4e/0x1280 net/netlink/genetlink.c:800 netlink_rcv_skb+0x190/0x3a0 net/netlink/af_netlink.c:2502 genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x786/0x940 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x9ae/0xd50 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x519/0x800 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmsg+0x2bf/0x370 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888013a8ac00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 200 bytes inside of 256-byte region [ffff888013a8ac00, ffff888013a8ad00) The buggy address belongs to the page: page:ffffea00004ea280 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13a8a head:ffffea00004ea280 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010841b40 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888013a8ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888013a8ac00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888013a8ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888013a8ad00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888013a8ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================