netdevsim netdevsim0: Direct firmware load for / failed with error -22 netdevsim netdevsim0: Falling back to sysfs fallback for: / ================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x36/0xc0 lib/list_debug.c:23 Read of size 8 at addr ffff8880208044c8 by task syz-executor.0/3738 CPU: 1 PID: 3738 Comm: syz-executor.0 Not tainted 5.14.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:88 [inline] dump_stack_lvl+0x1ae/0x29f lib/dump_stack.c:105 print_address_description+0x66/0x3b0 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report+0x163/0x210 mm/kasan/report.c:436 __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+0x3b4/0x560 drivers/base/firmware_loader/main.c:833 request_firmware+0x35/0x50 drivers/base/firmware_loader/main.c:877 devlink_compat_flash_update+0x209/0x420 net/core/devlink.c:11226 ethtool_flash_device+0x150/0x1c0 net/ethtool/ioctl.c:2072 dev_ethtool+0x2160/0x7bc0 net/ethtool/ioctl.c:2765 dev_ioctl+0x251/0xb90 net/core/dev_ioctl.c:440 sock_do_ioctl+0x227/0x300 net/socket.c:1117 sock_ioctl+0x444/0x6a0 net/socket.c:1221 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/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:00007f36881cd188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000020000100 RSI: 0000000000008946 RDI: 0000000000000003 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffee72d056f R14: 00007f36881cd300 R15: 0000000000022000 Allocated by task 3633: 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:434 [inline] ____kasan_kmalloc+0xc4/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x96/0x340 mm/slub.c:2983 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] __allocate_fw_priv+0x98/0x330 drivers/base/firmware_loader/main.c:187 alloc_lookup_fw_priv+0x1c0/0x380 drivers/base/firmware_loader/main.c:251 _request_firmware_prepare+0x27c/0x630 drivers/base/firmware_loader/main.c:746 _request_firmware+0x11b/0x560 drivers/base/firmware_loader/main.c:808 request_firmware+0x35/0x50 drivers/base/firmware_loader/main.c:877 devlink_compat_flash_update+0x209/0x420 net/core/devlink.c:11226 ethtool_flash_device+0x150/0x1c0 net/ethtool/ioctl.c:2072 dev_ethtool+0x2160/0x7bc0 net/ethtool/ioctl.c:2765 dev_ioctl+0x251/0xb90 net/core/dev_ioctl.c:440 sock_do_ioctl+0x227/0x300 net/socket.c:1117 sock_ioctl+0x444/0x6a0 net/socket.c:1221 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 3633: 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:360 ____kasan_slab_free+0x109/0x150 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1625 [inline] slab_free_freelist_hook+0x1d8/0x290 mm/slub.c:1650 slab_free mm/slub.c:3210 [inline] kfree+0xcf/0x2d0 mm/slub.c:4262 kref_put include/linux/kref.h:65 [inline] free_fw_priv drivers/base/firmware_loader/main.c:290 [inline] firmware_free_data drivers/base/firmware_loader/main.c:586 [inline] release_firmware+0x139/0x1b0 drivers/base/firmware_loader/main.c:1055 _request_firmware+0x408/0x560 drivers/base/firmware_loader/main.c:841 request_firmware+0x35/0x50 drivers/base/firmware_loader/main.c:877 devlink_compat_flash_update+0x209/0x420 net/core/devlink.c:11226 ethtool_flash_device+0x150/0x1c0 net/ethtool/ioctl.c:2072 dev_ethtool+0x2160/0x7bc0 net/ethtool/ioctl.c:2765 dev_ioctl+0x251/0xb90 net/core/dev_ioctl.c:440 sock_do_ioctl+0x227/0x300 net/socket.c:1117 sock_ioctl+0x444/0x6a0 net/socket.c:1221 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:348 kvfree_call_rcu+0x114/0x8a0 kernel/rcu/tree.c:3594 drop_sysctl_table+0x2cd/0x430 fs/proc/proc_sysctl.c:1647 drop_sysctl_table+0x2eb/0x430 fs/proc/proc_sysctl.c:1650 unregister_sysctl_table+0x88/0x130 fs/proc/proc_sysctl.c:1685 mpls_dev_sysctl_unregister net/mpls/af_mpls.c:1441 [inline] mpls_dev_notify+0x548/0x7d0 net/mpls/af_mpls.c:1621 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:410 call_netdevice_notifiers_info net/core/dev.c:2123 [inline] call_netdevice_notifiers_extack net/core/dev.c:2135 [inline] call_netdevice_notifiers net/core/dev.c:2149 [inline] unregister_netdevice_many+0xf7e/0x1980 net/core/dev.c:11093 unregister_netdevice_queue+0x2e6/0x350 net/core/dev.c:11027 unregister_netdevice include/linux/netdevice.h:2969 [inline] ip6_tnl_ioctl+0x3b7/0x1670 net/ipv6/ip6_tunnel.c:1699 dev_do_ioctl net/core/dev_ioctl.c:230 [inline] dev_ifsioc+0x7ea/0xbc0 net/core/dev_ioctl.c:336 dev_ioctl+0x5c9/0xb90 net/core/dev_ioctl.c:530 sock_ioctl+0x5e7/0x6a0 net/socket.c:1146 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:348 kvfree_call_rcu+0x114/0x8a0 kernel/rcu/tree.c:3594 drop_sysctl_table+0x2cd/0x430 fs/proc/proc_sysctl.c:1647 drop_sysctl_table+0x2eb/0x430 fs/proc/proc_sysctl.c:1650 unregister_sysctl_table+0x88/0x130 fs/proc/proc_sysctl.c:1685 sysctl_route_net_exit+0x58/0x80 net/ipv4/route.c:3621 ops_exit_list net/core/net_namespace.c:175 [inline] cleanup_net+0x758/0xc60 net/core/net_namespace.c:595 process_one_work+0x833/0x10c0 kernel/workqueue.c:2276 worker_thread+0xac1/0x1320 kernel/workqueue.c:2422 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888020804400 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 200 bytes inside of 256-byte region [ffff888020804400, ffff888020804500) The buggy address belongs to the page: page:ffffea0000820100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20804 head:ffffea0000820100 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001783e80 0000000c0000000c ffff888011041b40 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 8453, ts 58611437737, free_ts 58594956407 prep_new_page mm/page_alloc.c:2436 [inline] get_page_from_freelist+0x779/0xa30 mm/page_alloc.c:4169 __alloc_pages+0x26c/0x5f0 mm/page_alloc.c:5391 alloc_slab_page mm/slub.c:1688 [inline] allocate_slab+0xf1/0x540 mm/slub.c:1828 new_slab mm/slub.c:1891 [inline] new_slab_objects mm/slub.c:2637 [inline] ___slab_alloc+0x1cf/0x350 mm/slub.c:2800 __slab_alloc mm/slub.c:2840 [inline] slab_alloc_node mm/slub.c:2922 [inline] slab_alloc mm/slub.c:2964 [inline] __kmalloc+0x2e7/0x390 mm/slub.c:4100 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] fib6_info_alloc+0x2c/0xd0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x507/0x1a50 net/ipv6/route.c:3762 ip6_route_add+0x22/0x120 net/ipv6/route.c:3856 addrconf_prefix_route net/ipv6/addrconf.c:2415 [inline] inet6_addr_add+0xb16/0x1250 net/ipv6/addrconf.c:2948 inet6_rtm_newaddr+0x826/0x2a90 net/ipv6/addrconf.c:4871 rtnetlink_rcv_msg+0x91c/0xe50 net/core/rtnetlink.c:5574 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x7de/0x9b0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x9e7/0xe00 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg net/socket.c:723 [inline] __sys_sendto+0x541/0x720 net/socket.c:2019 __do_sys_sendto net/socket.c:2031 [inline] __se_sys_sendto net/socket.c:2027 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2027 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+0xc29/0xd20 mm/page_alloc.c:1397 free_unref_page_prepare mm/page_alloc.c:3332 [inline] free_unref_page+0x7e/0x550 mm/page_alloc.c:3411 free_slab mm/slub.c:1931 [inline] discard_slab mm/slub.c:1937 [inline] unfreeze_partials+0x18c/0x1e0 mm/slub.c:2418 put_cpu_partial+0xd2/0x210 mm/slub.c:2454 __slab_free+0x3a8/0x6b0 mm/slub.c:3104 do_slab_free mm/slub.c:3198 [inline] ___cache_free+0xfc/0x120 mm/slub.c:3217 qlist_free_all mm/kasan/quarantine.c:165 [inline] kasan_quarantine_reduce+0x151/0x1c0 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x2f/0xd0 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/slub.c:2956 [inline] slab_alloc mm/slub.c:2964 [inline] kmem_cache_alloc_trace+0x209/0x340 mm/slub.c:2981 kmalloc include/linux/slab.h:591 [inline] tomoyo_print_header security/tomoyo/audit.c:156 [inline] tomoyo_init_log+0x171/0x1ef0 security/tomoyo/audit.c:255 tomoyo_supervisor+0x3c9/0x1460 security/tomoyo/common.c:2097 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x533/0x790 security/tomoyo/file.c:734 security_file_ioctl+0x55/0xb0 security/security.c:1539 __do_sys_ioctl fs/ioctl.c:1063 [inline] __se_sys_ioctl+0x48/0x170 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff888020804380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888020804400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888020804480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888020804500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888020804580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================