================================================================== BUG: KASAN: slab-out-of-bounds in asus_report_fixup+0x857/0xed0 drivers/hid/hid-asus.c:1210 Read of size 1 at addr ffff88807572efe7 by task kworker/1:6/5176 CPU: 1 PID: 5176 Comm: kworker/1:6 Not tainted 6.9.0-syzkaller-10323-g8f6a15f095a6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 asus_report_fixup+0x857/0xed0 drivers/hid/hid-asus.c:1210 hid_open_report+0x1ba/0x14a0 drivers/hid/hid-core.c:1235 hid_parse include/linux/hid.h:1118 [inline] asus_probe+0x82e/0xc90 drivers/hid/hid-asus.c:1065 __hid_device_probe drivers/hid/hid-core.c:2633 [inline] hid_device_probe+0x26e/0x4f0 drivers/hid/hid-core.c:2670 really_probe+0x2b8/0xad0 drivers/base/dd.c:656 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798 driver_probe_device+0x50/0x430 drivers/base/dd.c:828 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:956 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457 __device_attach+0x333/0x520 drivers/base/dd.c:1028 bus_probe_device+0x189/0x260 drivers/base/bus.c:532 device_add+0x8ff/0xca0 drivers/base/core.c:3720 hid_add_device+0x3b6/0x520 drivers/hid/hid-core.c:2816 usbhid_probe+0xb38/0xea0 drivers/hid/usbhid/hid-core.c:1429 usb_probe_interface+0x645/0xbb0 drivers/usb/core/driver.c:399 really_probe+0x2b8/0xad0 drivers/base/dd.c:656 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798 driver_probe_device+0x50/0x430 drivers/base/dd.c:828 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:956 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457 __device_attach+0x333/0x520 drivers/base/dd.c:1028 bus_probe_device+0x189/0x260 drivers/base/bus.c:532 device_add+0x8ff/0xca0 drivers/base/core.c:3720 usb_set_configuration+0x1976/0x1fb0 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x88/0x140 drivers/usb/core/generic.c:254 usb_probe_device+0x1b8/0x380 drivers/usb/core/driver.c:294 really_probe+0x2b8/0xad0 drivers/base/dd.c:656 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798 driver_probe_device+0x50/0x430 drivers/base/dd.c:828 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:956 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457 __device_attach+0x333/0x520 drivers/base/dd.c:1028 bus_probe_device+0x189/0x260 drivers/base/bus.c:532 device_add+0x8ff/0xca0 drivers/base/core.c:3720 usb_new_device+0x104a/0x19a0 drivers/usb/core/hub.c:2652 hub_port_connect drivers/usb/core/hub.c:5522 [inline] hub_port_connect_change drivers/usb/core/hub.c:5662 [inline] port_event drivers/usb/core/hub.c:5822 [inline] hub_event+0x2d6a/0x5150 drivers/usb/core/hub.c:5904 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd70 kernel/workqueue.c:3393 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 5176: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4121 [inline] kmalloc_node_track_caller_noprof+0x22a/0x450 mm/slub.c:4141 kmemdup_noprof+0x2a/0x60 mm/util.c:131 hid_open_report+0x156/0x14a0 drivers/hid/hid-core.c:1230 hid_parse include/linux/hid.h:1118 [inline] asus_probe+0x82e/0xc90 drivers/hid/hid-asus.c:1065 __hid_device_probe drivers/hid/hid-core.c:2633 [inline] hid_device_probe+0x26e/0x4f0 drivers/hid/hid-core.c:2670 really_probe+0x2b8/0xad0 drivers/base/dd.c:656 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798 driver_probe_device+0x50/0x430 drivers/base/dd.c:828 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:956 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457 __device_attach+0x333/0x520 drivers/base/dd.c:1028 bus_probe_device+0x189/0x260 drivers/base/bus.c:532 device_add+0x8ff/0xca0 drivers/base/core.c:3720 hid_add_device+0x3b6/0x520 drivers/hid/hid-core.c:2816 usbhid_probe+0xb38/0xea0 drivers/hid/usbhid/hid-core.c:1429 usb_probe_interface+0x645/0xbb0 drivers/usb/core/driver.c:399 really_probe+0x2b8/0xad0 drivers/base/dd.c:656 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798 driver_probe_device+0x50/0x430 drivers/base/dd.c:828 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:956 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457 __device_attach+0x333/0x520 drivers/base/dd.c:1028 bus_probe_device+0x189/0x260 drivers/base/bus.c:532 device_add+0x8ff/0xca0 drivers/base/core.c:3720 usb_set_configuration+0x1976/0x1fb0 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x88/0x140 drivers/usb/core/generic.c:254 usb_probe_device+0x1b8/0x380 drivers/usb/core/driver.c:294 really_probe+0x2b8/0xad0 drivers/base/dd.c:656 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798 driver_probe_device+0x50/0x430 drivers/base/dd.c:828 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:956 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457 __device_attach+0x333/0x520 drivers/base/dd.c:1028 bus_probe_device+0x189/0x260 drivers/base/bus.c:532 device_add+0x8ff/0xca0 drivers/base/core.c:3720 usb_new_device+0x104a/0x19a0 drivers/usb/core/hub.c:2652 hub_port_connect drivers/usb/core/hub.c:5522 [inline] hub_port_connect_change drivers/usb/core/hub.c:5662 [inline] port_event drivers/usb/core/hub.c:5822 [inline] hub_event+0x2d6a/0x5150 drivers/usb/core/hub.c:5904 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd70 kernel/workqueue.c:3393 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88807572efe0 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes to the right of allocated 7-byte region [ffff88807572efe0, ffff88807572efe7) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7572e flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 00fff00000000000 ffff888015041500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080800080 00000001ffffefff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5136, tgid 5136 (syz-executor.4), ts 112696179104, free_ts 112695984202 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x2e2d/0x2ee0 mm/page_alloc.c:3402 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4660 __alloc_pages_node_noprof include/linux/gfp.h:244 [inline] alloc_pages_node_noprof include/linux/gfp.h:271 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2264 allocate_slab+0x5a/0x2e0 mm/slub.c:2427 new_slab mm/slub.c:2480 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3666 __slab_alloc+0x58/0xa0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] __do_kmalloc_node mm/slub.c:4120 [inline] __kmalloc_node_noprof+0x28b/0x450 mm/slub.c:4128 kmalloc_node_noprof include/linux/slab.h:681 [inline] __vmalloc_area_node mm/vmalloc.c:3629 [inline] __vmalloc_node_range_noprof+0x5f9/0x1490 mm/vmalloc.c:3824 __vmalloc_node_noprof mm/vmalloc.c:3889 [inline] vzalloc_noprof+0x79/0x90 mm/vmalloc.c:3962 alloc_counters+0xd7/0x770 net/ipv4/netfilter/arp_tables.c:660 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:837 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1039 [inline] do_ip6t_get_ctl+0xecc/0x1820 net/ipv6/netfilter/ip6_tables.c:1677 nf_getsockopt+0x299/0x2c0 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x263/0x380 net/ipv6/ipv6_sockglue.c:1494 tcp_getsockopt+0x163/0x1c0 net/ipv4/tcp.c:4399 do_sock_getsockopt+0x373/0x850 net/socket.c:2374 page last free pid 5136 tgid 5136 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2565 vfree+0x186/0x2e0 mm/vmalloc.c:3346 __do_replace+0x87b/0xa50 net/ipv6/netfilter/ip6_tables.c:1107 do_replace net/ipv6/netfilter/ip6_tables.c:1158 [inline] do_ip6t_set_ctl+0xf11/0x1270 net/ipv6/netfilter/ip6_tables.c:1644 nf_setsockopt+0x295/0x2c0 net/netfilter/nf_sockopt.c:101 do_sock_setsockopt+0x3af/0x720 net/socket.c:2312 __sys_setsockopt+0x1ae/0x250 net/socket.c:2335 __do_sys_setsockopt net/socket.c:2344 [inline] __se_sys_setsockopt net/socket.c:2341 [inline] __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2341 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88807572ee80: 05 fc fc fc 05 fc fc fc 07 fc fc fc 05 fc fc fc ffff88807572ef00: 07 fc fc fc 05 fc fc fc fa fc fc fc 07 fc fc fc >ffff88807572ef80: fa fc fc fc fa fc fc fc fa fc fc fc 07 fc fc fc ^ ffff88807572f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807572f080: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 ==================================================================