binder: 17621:17623 ioctl 4018620d 0 returned -22 input: syz0 as /devices/virtual/input/input147 ================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic64_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:1515 [inline] BUG: KASAN: use-after-free in atomic_long_try_cmpxchg_acquire include/asm-generic/atomic-long.h:443 [inline] BUG: KASAN: use-after-free in __mutex_trylock_fast kernel/locking/mutex.c:173 [inline] BUG: KASAN: use-after-free in mutex_lock+0x98/0x110 kernel/locking/mutex.c:298 Write of size 8 at addr ffff88811f182440 by task syz.4.4290/17623 CPU: 1 PID: 17623 Comm: syz.4.4290 Not tainted 5.10.225-syzkaller-00513-g8d23314f588a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic64_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:1515 [inline] atomic_long_try_cmpxchg_acquire include/asm-generic/atomic-long.h:443 [inline] __mutex_trylock_fast kernel/locking/mutex.c:173 [inline] mutex_lock+0x98/0x110 kernel/locking/mutex.c:298 steam_input_open+0x91/0x1a0 drivers/hid/hid-steam.c:297 input_open_device+0x151/0x2a0 drivers/input/input.c:635 evdev_open_device drivers/input/evdev.c:400 [inline] evdev_open+0x3a5/0x5c0 drivers/input/evdev.c:487 chrdev_open+0x4f7/0x620 fs/char_dev.c:414 do_dentry_open+0x7c1/0x10d0 fs/open.c:819 vfs_open+0x73/0x80 fs/open.c:942 do_open fs/namei.c:3391 [inline] path_openat+0x2660/0x3000 fs/namei.c:3509 do_filp_open+0x21c/0x460 fs/namei.c:3536 do_sys_openat2+0x13f/0x710 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_openat fs/open.c:1249 [inline] __se_sys_openat fs/open.c:1244 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1244 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f4cefa55890 Code: 48 89 44 24 20 75 93 44 89 54 24 0c e8 19 8f 02 00 44 8b 54 24 0c 89 da 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 38 44 89 c7 89 44 24 0c e8 6c 8f 02 00 8b 44 RSP: 002b:00007f4cee6aeb70 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4cefa55890 RDX: 0000000000000000 RSI: 00007f4cee6aec10 RDI: 00000000ffffff9c RBP: 00007f4cee6aec10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4cefc0f058 R15: 00007ffc87913388 Allocated by task 15256: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] ____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:509 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] __kmalloc+0x1aa/0x330 mm/slub.c:4033 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:664 [inline] fib6_info_alloc+0x33/0xe0 net/ipv6/ip6_fib.c:154 ip6_route_info_create+0x4b7/0x1440 net/ipv6/route.c:3667 addrconf_f6i_alloc+0x215/0x4c0 net/ipv6/route.c:4464 fixup_permanent_addr net/ipv6/addrconf.c:3500 [inline] addrconf_permanent_addr+0x270/0xba0 net/ipv6/addrconf.c:3539 addrconf_notify+0x75b/0xe90 net/ipv6/addrconf.c:3607 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:410 __dev_notify_flags+0x304/0x610 dev_change_flags+0xf0/0x1a0 net/core/dev.c:8590 do_setlink+0xc5c/0x3c30 net/core/rtnetlink.c:2729 __rtnl_newlink net/core/rtnetlink.c:3407 [inline] rtnl_newlink+0x15f0/0x2000 net/core/rtnetlink.c:3527 rtnetlink_rcv_msg+0x955/0xc50 net/core/rtnetlink.c:5607 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2499 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5625 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x8df/0xac0 net/netlink/af_netlink.c:1348 netlink_sendmsg+0xa46/0xd00 net/netlink/af_netlink.c:1916 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] __sys_sendto+0x545/0x700 net/socket.c:2006 __do_sys_sendto net/socket.c:2018 [inline] __se_sys_sendto net/socket.c:2014 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2014 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 11937: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kfree+0xc3/0x270 mm/slub.c:4191 release_nodes+0x873/0x8f0 drivers/base/devres.c:524 devres_release_all+0x7b/0xa0 drivers/base/devres.c:545 __device_release_driver drivers/base/dd.c:1190 [inline] device_release_driver_internal+0x515/0x7c0 drivers/base/dd.c:1221 device_release_driver+0x19/0x20 drivers/base/dd.c:1244 bus_remove_device+0x2f8/0x360 drivers/base/bus.c:533 device_del+0x68b/0xf00 drivers/base/core.c:3455 hid_remove_device drivers/hid/hid-core.c:2501 [inline] hid_destroy_device+0x68/0x110 drivers/hid/hid-core.c:2520 usbhid_disconnect+0x9e/0xc0 drivers/hid/usbhid/hid-core.c:1445 usb_unbind_interface+0x1fa/0x8c0 drivers/usb/core/driver.c:459 device_release_driver_internal+0x506/0x7c0 drivers/base/dd.c:1221 device_release_driver+0x19/0x20 drivers/base/dd.c:1244 bus_remove_device+0x2f8/0x360 drivers/base/bus.c:533 device_del+0x68b/0xf00 drivers/base/core.c:3455 usb_disable_device+0x380/0x720 drivers/usb/core/message.c:1411 usb_disconnect+0x32a/0x890 drivers/usb/core/hub.c:2271 hub_port_connect drivers/usb/core/hub.c:5296 [inline] hub_port_connect_change drivers/usb/core/hub.c:5597 [inline] port_event drivers/usb/core/hub.c:5747 [inline] hub_event+0x1e73/0x47c0 drivers/usb/core/hub.c:5829 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu kernel/rcu/tree.c:2976 [inline] call_rcu+0x135/0x11f0 kernel/rcu/tree.c:3050 fib6_info_release include/net/ip6_fib.h:346 [inline] __ip6_del_rt+0xf3/0x140 net/ipv6/route.c:3788 ip6_del_rt+0xdd/0x130 net/ipv6/route.c:3799 __ipv6_ifa_notify+0xa09/0x11c0 net/ipv6/addrconf.c:6172 addrconf_ifdown+0xe14/0x1a60 net/ipv6/addrconf.c:3908 addrconf_notify+0x378/0xe90 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:410 call_netdevice_notifiers_info net/core/dev.c:2054 [inline] call_netdevice_notifiers_extack net/core/dev.c:2066 [inline] call_netdevice_notifiers net/core/dev.c:2080 [inline] dev_close_many+0x37f/0x530 net/core/dev.c:1655 unregister_netdevice_many+0x492/0x17d0 net/core/dev.c:10724 default_device_exit_batch+0x38a/0x3f0 net/core/dev.c:11267 ops_exit_list net/core/net_namespace.c:190 [inline] cleanup_net+0x6e9/0xcb0 net/core/net_namespace.c:609 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 kvfree_call_rcu+0x136/0x650 kernel/rcu/tree.c:3535 neigh_destroy+0x3f9/0x510 net/core/neighbour.c:865 neigh_release include/net/neighbour.h:427 [inline] neigh_cleanup_and_release+0x73/0x1b0 net/core/neighbour.c:104 neigh_flush_dev+0x65e/0x840 net/core/neighbour.c:375 __neigh_ifdown+0x41/0x3a0 net/core/neighbour.c:392 neigh_ifdown+0x1f/0x30 net/core/neighbour.c:409 rt6_disable_ip+0x69a/0x720 net/ipv6/route.c:4794 addrconf_ifdown+0x160/0x1a60 net/ipv6/addrconf.c:3784 addrconf_notify+0x378/0xe90 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:410 call_netdevice_notifiers_info net/core/dev.c:2054 [inline] call_netdevice_notifiers_extack net/core/dev.c:2066 [inline] call_netdevice_notifiers net/core/dev.c:2080 [inline] dev_close_many+0x37f/0x530 net/core/dev.c:1655 unregister_netdevice_many+0x492/0x17d0 net/core/dev.c:10724 default_device_exit_batch+0x38a/0x3f0 net/core/dev.c:11267 ops_exit_list net/core/net_namespace.c:190 [inline] cleanup_net+0x6e9/0xcb0 net/core/net_namespace.c:609 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff88811f182400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 64 bytes inside of 512-byte region [ffff88811f182400, ffff88811f182600) The buggy address belongs to the page: page:ffffea00047c6000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11f180 head:ffffea00047c6000 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 0000000000000000 0000000100000001 ffff888100043080 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 283, ts 21151961395, free_ts 21151466774 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] __kmalloc_track_caller+0x1f8/0x320 mm/slub.c:4536 __kmalloc_reserve net/core/skbuff.c:144 [inline] __alloc_skb+0xbc/0x510 net/core/skbuff.c:212 alloc_skb include/linux/skbuff.h:1126 [inline] nlmsg_new include/net/netlink.h:953 [inline] inet6_netconf_notify_devconf+0xdd/0x190 net/ipv6/addrconf.c:577 __addrconf_sysctl_register+0x380/0x3e0 net/ipv6/addrconf.c:7046 addrconf_sysctl_register+0x141/0x1a0 net/ipv6/addrconf.c:7083 ipv6_add_dev+0xc11/0x10b0 net/ipv6/addrconf.c:448 addrconf_notify+0x58e/0xe90 net/ipv6/addrconf.c:3567 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:410 call_netdevice_notifiers_info net/core/dev.c:2054 [inline] call_netdevice_notifiers_extack net/core/dev.c:2066 [inline] call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2080 register_netdevice+0x1066/0x13f0 net/core/dev.c:10067 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] __free_pages_ok+0x82c/0x850 mm/page_alloc.c:1629 free_the_page+0x76/0x370 mm/page_alloc.c:5409 __free_pages+0x67/0xc0 mm/page_alloc.c:5418 free_pages+0x7c/0x90 mm/page_alloc.c:5429 __stack_depot_save+0x47b/0x4d0 lib/stackdepot.c:359 kasan_save_stack mm/kasan/common.c:39 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] __kasan_slab_alloc+0xc3/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x80/0x510 net/core/skbuff.c:200 alloc_skb include/linux/skbuff.h:1126 [inline] alloc_uevent_skb+0x80/0x230 lib/kobject_uevent.c:290 uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline] kobject_uevent_net_broadcast+0x188/0x590 lib/kobject_uevent.c:412 kobject_uevent_env+0x525/0x700 lib/kobject_uevent.c:608 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:657 device_add+0x791/0xbc0 drivers/base/core.c:3257 netdev_register_kobject+0x177/0x320 net/core/net-sysfs.c:1997 register_netdevice+0xe9b/0x13f0 net/core/dev.c:10036 Memory state around the buggy address: ffff88811f182300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811f182380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88811f182400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811f182480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811f182500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== hid 0003:28DE:1102.006F: No HID_FEATURE_REPORT submitted - nothing to read hid 0003:28DE:1102.006F: No HID_FEATURE_REPORT submitted - nothing to read