misc raw-gadget: fail, usb_gadget_probe_driver returned -16 ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x31af/0x3b60 kernel/locking/lockdep.c:3827 Read of size 8 at addr ffff8881c91c1910 by task syz-executor.1/9184 CPU: 1 PID: 9184 Comm: syz-executor.1 Not tainted 5.5.0-rc7-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+0xef/0x16e lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x314 mm/kasan/report.c:374 __kasan_report.cold+0x37/0x85 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:639 __lock_acquire+0x31af/0x3b60 kernel/locking/lockdep.c:3827 lock_acquire+0x130/0x340 kernel/locking/lockdep.c:4484 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 xpad_play_effect+0xfe/0xcc0 drivers/input/joystick/xpad.c:1225 ml_play_effects+0x817/0x1270 drivers/input/ff-memless.c:398 ml_ff_playback+0x293/0x430 drivers/input/ff-memless.c:460 input_ff_event+0x13a/0x2e0 drivers/input/ff-core.c:286 input_handle_event+0x732/0x13a0 drivers/input/input.c:375 input_inject_event+0x305/0x31e drivers/input/input.c:470 evdev_write+0x2c9/0x410 drivers/input/evdev.c:542 __vfs_write+0x76/0x100 fs/read_write.c:494 vfs_write+0x262/0x5c0 fs/read_write.c:558 ksys_write+0x1e8/0x250 fs/read_write.c:611 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b349 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f3b13122c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f3b131236d4 RCX: 000000000045b349 RDX: 0000000000000364 RSI: 00000000200000c0 RDI: 0000000000000007 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000cae R14: 00000000004cd867 R15: 000000000075bf2c Allocated by task 1788: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:486 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2759 [inline] __kmalloc_node_track_caller+0xfc/0x3b0 mm/slub.c:4365 __kmalloc_reserve.isra.0+0x39/0xe0 net/core/skbuff.c:141 __alloc_skb+0xef/0x5a0 net/core/skbuff.c:209 alloc_skb_fclone include/linux/skbuff.h:1099 [inline] sk_stream_alloc_skb net/ipv4/tcp.c:877 [inline] sk_stream_alloc_skb+0x106/0xc70 net/ipv4/tcp.c:854 tcp_sendmsg_locked+0xcb0/0x3250 net/ipv4/tcp.c:1284 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1434 inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:659 sock_write_iter+0x283/0x3c0 net/socket.c:991 call_write_iter include/linux/fs.h:1902 [inline] new_sync_write+0x420/0x650 fs/read_write.c:483 __vfs_write+0xc9/0x100 fs/read_write.c:496 vfs_write+0x262/0x5c0 fs/read_write.c:558 ksys_write+0x1e8/0x250 fs/read_write.c:611 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4384: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x117/0x160 mm/kasan/common.c:474 slab_free_hook mm/slub.c:1425 [inline] slab_free_freelist_hook mm/slub.c:1458 [inline] slab_free mm/slub.c:3005 [inline] kfree+0xd5/0x300 mm/slub.c:3957 skb_free_head+0x8b/0xa0 net/core/skbuff.c:591 skb_release_data+0x41f/0x7c0 net/core/skbuff.c:611 skb_release_all+0x46/0x60 net/core/skbuff.c:665 __kfree_skb+0x11/0x20 net/core/skbuff.c:679 sk_wmem_free_skb include/net/sock.h:1487 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:1828 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3167 [inline] tcp_ack+0x1bc3/0x56e0 net/ipv4/tcp_input.c:3694 tcp_rcv_established+0x6a4/0x1d50 net/ipv4/tcp_input.c:5702 tcp_v4_do_rcv+0x605/0x8b0 net/ipv4/tcp_ipv4.c:1562 tcp_v4_rcv+0x2b67/0x3570 net/ipv4/tcp_ipv4.c:1943 ip_protocol_deliver_rcu+0x57/0x860 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x222/0x370 net/ipv4/ip_input.c:231 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_local_deliver+0x1c8/0x4e0 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:442 [inline] ip_sublist_rcv_finish+0x9a/0x2c0 net/ipv4/ip_input.c:549 ip_list_rcv_finish net/ipv4/ip_input.c:599 [inline] ip_sublist_rcv+0x456/0x890 net/ipv4/ip_input.c:607 ip_list_rcv+0x32f/0x456 net/ipv4/ip_input.c:642 __netif_receive_skb_list_ptype net/core/dev.c:5193 [inline] __netif_receive_skb_list_core+0x583/0x900 net/core/dev.c:5241 __netif_receive_skb_list net/core/dev.c:5293 [inline] netif_receive_skb_list_internal+0x78b/0xd80 net/core/dev.c:5388 gro_normal_list.part.0+0x19/0xb0 net/core/dev.c:5810 gro_normal_list net/core/dev.c:6216 [inline] napi_complete_done+0x201/0x490 net/core/dev.c:6203 virtqueue_napi_complete+0x2c/0xa0 drivers/net/virtio_net.c:329 virtnet_poll+0xab8/0xd70 drivers/net/virtio_net.c:1432 napi_poll net/core/dev.c:6532 [inline] net_rx_action+0x428/0xef0 net/core/dev.c:6600 __do_softirq+0x21e/0x950 kernel/softirq.c:292 The buggy address belongs to the object at ffff8881c91c1800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 272 bytes inside of 1024-byte region [ffff8881c91c1800, ffff8881c91c1c00) The buggy address belongs to the page: page:ffffea0007247000 refcount:1 mapcount:0 mapping:ffff8881da002280 index:0x0 compound_mapcount: 0 raw: 0200000000010200 ffffea0006b2d400 0000000300000002 ffff8881da002280 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c91c1800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c91c1880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881c91c1900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881c91c1980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c91c1a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================