==================================================================
BUG: KASAN: slab-use-after-free in atkbd_event_work+0x592/0x650
Read of size 4 at addr ffff8881114ec164 by task kworker/0:8/10126

CPU: 0 UID: 0 PID: 10126 Comm: kworker/0:8 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: events atkbd_event_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 atkbd_event_work+0x592/0x650
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 5004:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x321/0x600
 input_allocate_device+0x4e/0x2a0
 atkbd_connect+0xb1/0x9c0
 serio_driver_probe+0x82/0xa0
 really_probe+0x254/0xae0
 __driver_probe_device+0x1e8/0x360
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x270/0x410
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2c4/0x450
 device_initial_probe+0xa1/0xd0
 bus_probe_device+0x12a/0x220
 device_add+0x7d7/0xb80
 serio_handle_event+0x9e6/0xf80
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Freed by task 15103:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x650
 input_dev_release+0xab/0xc0
 device_release+0xc4/0x1f0
 kobject_put+0x222/0x550
 atkbd_disconnect+0xb5/0x110
 serio_driver_remove+0x85/0xa0
 device_release_driver_internal+0x48b/0x880
 serio_unregister_port+0x128/0x150
 userio_char_release+0x80/0xc0
 __fput+0x418/0xa50
 task_work_run+0x1d9/0x270
 do_exit+0x73a/0x2360
 do_group_exit+0x22d/0x2f0
 get_signal+0x121b/0x12c0
 arch_do_signal_or_restart+0xbb/0x860
 exit_to_user_mode_loop+0x10e/0x770
 do_syscall_64+0x328/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff8881114ec000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 356 bytes inside of
 freed 4096-byte region [ffff8881114ec000, ffff8881114ed000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1114e8
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x17ff00000000040(head|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 017ff00000000040 ffff888100042140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 017ff00000000040 ffff888100042140 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 017ff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 10123, tgid 10123 (kworker/u9:8), ts 801071804285
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x2209/0x2280
 __alloc_frozen_pages_noprof+0x217/0x5a0
 allocate_slab+0x7d/0x620
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c8/0x6c0
 __kmalloc_node_track_caller_noprof+0x548/0x720
 __alloc_skb+0x2c1/0x7a0
 nsim_dev_trap_report_work+0x25f/0xb40
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
page last free pid 10126 tgid 10126 ts 800351141744 stack trace:
 __free_frozen_pages+0xc93/0xd90
 __slab_free+0x274/0x2c0
 qlist_free_all+0x99/0x100
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 __kmalloc_cache_noprof+0x29f/0x600
 usb_control_msg+0x73/0x3e0
 hub_port_init+0xddb/0x28c0
 hub_event+0x24e8/0x4d30
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Memory state around the buggy address:
 ffff8881114ec000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881114ec080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8881114ec100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                       ^
 ffff8881114ec180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881114ec200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
