platform regulatory.0: Falling back to sysfs fallback for: regulatory.db ================================================================== BUG: KASAN: use-after-free in __list_add_valid+0xab/0xf0 lib/list_debug.c:23 Read of size 8 at addr ffff8882374484b8 by task syz-executor.4/10990 CPU: 0 PID: 10990 Comm: syz-executor.4 Not tainted 5.6.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x96/0xe0 lib/dump_stack.c:118 print_address_description.constprop.4.cold.6+0x9/0x373 mm/kasan/report.c:374 __kasan_report.cold.7+0x7a/0x92 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:641 __list_add_valid+0xab/0xf0 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 drivers/base/firmware_loader/fallback.c:515 [inline] fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:580 [inline] firmware_fallback_sysfs+0x386/0x9b8 drivers/base/firmware_loader/fallback.c:655 _request_firmware+0x53d/0xc20 drivers/base/firmware_loader/main.c:786 request_firmware+0x2d/0x40 drivers/base/firmware_loader/main.c:829 reg_reload_regdb+0x75/0x1e0 net/wireless/reg.c:1083 genl_family_rcv_msg_doit net/netlink/genetlink.c:673 [inline] genl_family_rcv_msg net/netlink/genetlink.c:718 [inline] genl_rcv_msg+0x5e7/0xf10 net/netlink/genetlink.c:735 netlink_rcv_skb+0x119/0x340 net/netlink/af_netlink.c:2478 genl_rcv+0x1f/0x30 net/netlink/genetlink.c:746 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x434/0x630 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x766/0xc10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:672 ____sys_sendmsg+0x54e/0x760 net/socket.c:2343 ___sys_sendmsg+0xe4/0x160 net/socket.c:2397 __sys_sendmsg+0xce/0x170 net/socket.c:2430 do_syscall_64+0x98/0x560 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe 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:00007f8f7c32e188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056c0b0 RCX: 0000000000466459 RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000003 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c0b0 R13: 00007ffd39a5e9bf R14: 00007f8f7c32e300 R15: 0000000000022000 Allocated by task 10947: save_stack+0x19/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.15+0xc1/0xd0 mm/kasan/common.c:488 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] __allocate_fw_priv drivers/base/firmware_loader/main.c:174 [inline] alloc_lookup_fw_priv drivers/base/firmware_loader/main.c:229 [inline] _request_firmware_prepare drivers/base/firmware_loader/main.c:708 [inline] _request_firmware+0x278/0xc20 drivers/base/firmware_loader/main.c:769 request_firmware+0x2d/0x40 drivers/base/firmware_loader/main.c:829 reg_reload_regdb+0x75/0x1e0 net/wireless/reg.c:1083 genl_family_rcv_msg_doit net/netlink/genetlink.c:673 [inline] genl_family_rcv_msg net/netlink/genetlink.c:718 [inline] genl_rcv_msg+0x5e7/0xf10 net/netlink/genetlink.c:735 netlink_rcv_skb+0x119/0x340 net/netlink/af_netlink.c:2478 genl_rcv+0x1f/0x30 net/netlink/genetlink.c:746 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x434/0x630 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x766/0xc10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:672 ____sys_sendmsg+0x54e/0x760 net/socket.c:2343 ___sys_sendmsg+0xe4/0x160 net/socket.c:2397 __sys_sendmsg+0xce/0x170 net/socket.c:2430 do_syscall_64+0x98/0x560 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10947: save_stack+0x19/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x124/0x170 mm/kasan/common.c:476 slab_free_hook mm/slub.c:1444 [inline] slab_free_freelist_hook+0x53/0x140 mm/slub.c:1477 slab_free mm/slub.c:3024 [inline] kfree+0xd6/0x3c0 mm/slub.c:3976 firmware_free_data drivers/base/firmware_loader/main.c:544 [inline] release_firmware.part.3+0xcb/0x130 drivers/base/firmware_loader/main.c:952 release_firmware drivers/base/firmware_loader/main.c:794 [inline] _request_firmware+0x5e2/0xc20 drivers/base/firmware_loader/main.c:793 request_firmware+0x2d/0x40 drivers/base/firmware_loader/main.c:829 reg_reload_regdb+0x75/0x1e0 net/wireless/reg.c:1083 genl_family_rcv_msg_doit net/netlink/genetlink.c:673 [inline] genl_family_rcv_msg net/netlink/genetlink.c:718 [inline] genl_rcv_msg+0x5e7/0xf10 net/netlink/genetlink.c:735 netlink_rcv_skb+0x119/0x340 net/netlink/af_netlink.c:2478 genl_rcv+0x1f/0x30 net/netlink/genetlink.c:746 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x434/0x630 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x766/0xc10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:672 ____sys_sendmsg+0x54e/0x760 net/socket.c:2343 ___sys_sendmsg+0xe4/0x160 net/socket.c:2397 __sys_sendmsg+0xce/0x170 net/socket.c:2430 do_syscall_64+0x98/0x560 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888237448400 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 184 bytes inside of 256-byte region [ffff888237448400, ffff888237448500) The buggy address belongs to the page: page:ffffea0008dd1200 refcount:1 mapcount:0 mapping:ffff8880b5802780 index:0x0 compound_mapcount: 0 flags: 0x57ff00000010200(slab|head) raw: 057ff00000010200 ffffea0008e2d300 0000000200000002 ffff8880b5802780 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888237448380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888237448400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888237448480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888237448500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888237448580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================