binder: 6955:6956 ioctl 400c620e 9999999999999999 returned -14
==================================================================
BUG: KASAN: slab-use-after-free in sysfs_remove_file_ns+0x3d/0x70
Read of size 8 at addr ffff888108524830 by task syz.0.195/6956

CPU: 0 UID: 0 PID: 6956 Comm: syz.0.195 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 print_report+0xca/0x240
 kasan_report+0x118/0x150
 sysfs_remove_file_ns+0x3d/0x70
 bus_remove_driver+0x198/0x2f0
 comedi_device_detach_locked+0x178/0x750
 comedi_unlocked_ioctl+0xcde/0x1020
 __se_sys_ioctl+0xfc/0x170
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fca2d38eba9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fca2e1f7038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fca2d5d5fa0 RCX: 00007fca2d38eba9
RDX: 0000000000000000 RSI: 0000000040946400 RDI: 0000000000000005
RBP: 00007fca2d411e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fca2d5d6038 R14: 00007fca2d5d5fa0 R15: 00007ffc8f24e6f8
 </TASK>

Allocated by task 6906:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_noprof+0x27a/0x4f0
 io_cache_alloc_new+0x40/0x100
 __io_prep_rw+0x23f/0xe20
 io_prep_rwv+0x8c/0x3d0
 io_submit_sqes+0x917/0x1d30
 __se_sys_io_uring_enter+0x2df/0x2b20
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 6906:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5b/0x80
 kfree+0x18e/0x440
 io_clean_op+0x298/0x330
 __io_submit_flush_completions+0xc20/0xe40
 io_handle_tw_list+0x44e/0x4c0
 tctx_task_work_run+0x99/0x370
 tctx_task_work+0x3f/0x90
 task_work_run+0x1d4/0x260
 get_signal+0x11ed/0x1340
 arch_do_signal_or_restart+0x9a/0x750
 exit_to_user_mode_loop+0x75/0x110
 do_syscall_64+0x2bd/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff888108524800
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 48 bytes inside of
 freed 256-byte region [ffff888108524800, ffff888108524900)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x108524
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000040 ffff88801a441b40 ffffea0004280c80 dead000000000003
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff88801a441b40 ffffea0004280c80 dead000000000003
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000001 ffffea0004214901 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
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 5859, tgid 5859 (syz-executor), ts 65469391350, free_ts 65390229359
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 allocate_slab+0x8a/0x370
 ___slab_alloc+0xbeb/0x1420
 __kmalloc_noprof+0x305/0x4f0
 fib_create_info+0x1728/0x3210
 fib_table_insert+0xc6/0x1b50
 fib_magic+0x2c4/0x390
 fib_add_ifaddr+0x3fb/0x5f0
 fib_inetaddr_event+0x12e/0x190
 notifier_call_chain+0x1b6/0x3e0
 blocking_notifier_call_chain+0x6a/0x90
 __inet_insert_ifa+0xa13/0xbf0
 inetdev_event+0xfa6/0x15b0
page last free pid 5859 tgid 5859 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 __put_partials+0x156/0x1a0
 put_cpu_partial+0x17c/0x250
 __slab_free+0x2d5/0x3c0
 qlist_free_all+0x97/0x140
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 __kmalloc_cache_noprof+0x1be/0x3d0
 netdevice_event+0x3a1/0x8a0
 notifier_call_chain+0x1b6/0x3e0
 __dev_notify_flags+0x18d/0x2e0
 netif_change_flags+0xe8/0x1a0
 do_setlink+0xc55/0x41c0
 rtnl_newlink+0x160b/0x1c70
 rtnetlink_rcv_msg+0x7cf/0xb70
 netlink_rcv_skb+0x208/0x470

Memory state around the buggy address:
 ffff888108524700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888108524780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888108524800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                     ^
 ffff888108524880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888108524900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
