[Android 5.10] KASAN: use-after-free Write in steam_input_open

1 view
Skip to first unread message

syzbot

unread,
Sep 3, 2024, 5:12:27 AMSep 3
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1c5354a314ea Merge branch 'android13-5.10' into android13-..
git tree: android13-5.10-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=12e5e529980000
kernel config: https://syzkaller.appspot.com/x/.config?x=a7feff018ba57f28
dashboard link: https://syzkaller.appspot.com/bug?extid=d6a6ba46361f19622c24
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10488f33980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15b32a8f980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/84c9d285cd0b/disk-1c5354a3.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d4319d712136/vmlinux-1c5354a3.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1b4b1e7bfd60/bzImage-1c5354a3.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+d6a6ba...@syzkaller.appspotmail.com

==================================================================
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 ffff8881203a7c40 by task udevd/304

CPU: 0 PID: 304 Comm: udevd Not tainted 5.10.223-syzkaller-00011-g1c5354a314ea #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:0x7fb9c19369a4
Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffcd747e530 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb9c19369a4
RDX: 0000000000080000 RSI: 0000562ee5587910 RDI: 00000000ffffff9c
RBP: 0000562ee5587910 R08: 0000562ee55b6df8 R09: 00007fb9c1a11b10
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000
R13: 00007ffcd747e6f8 R14: 0000000000000000 R15: 0000562ee3b7bed5

Allocated by task 0:
(stack is not available)

Freed by task 25:
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:3452
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:3452
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
process_scheduled_works kernel/workqueue.c:2363 [inline]
worker_thread+0xe18/0x1510 kernel/workqueue.c:2449
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 ffff8881203a7c00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 64 bytes inside of
512-byte region [ffff8881203a7c00, ffff8881203a7e00)
The buggy address belongs to the page:
page:ffffea000480e900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1203a4
head:ffffea000480e900 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 dead000000000100 dead000000000122 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 287, ts 26059281854, free_ts 25832487534
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]
alloc_skb_with_frags+0xa1/0x570 net/core/skbuff.c:5951
sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2388
unix_stream_sendmsg+0x590/0xf50 net/unix/af_unix.c:1931
sock_sendmsg_nosec net/socket.c:652 [inline]
__sock_sendmsg net/socket.c:664 [inline]
sock_write_iter+0x39b/0x530 net/socket.c:1018
call_write_iter include/linux/fs.h:2021 [inline]
new_sync_write fs/read_write.c:518 [inline]
vfs_write+0xb4c/0xe70 fs/read_write.c:605
ksys_write+0x199/0x2c0 fs/read_write.c:658
__do_sys_write fs/read_write.c:670 [inline]
__se_sys_write fs/read_write.c:667 [inline]
__x64_sys_write+0x7b/0x90 fs/read_write.c:667
do_syscall_64+0x34/0x70
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
skb_clone+0x1de/0x370 net/core/skbuff.c:1467
dev_queue_xmit_nit+0x25f/0xa20 net/core/dev.c:2350
xmit_one net/core/dev.c:3602 [inline]
dev_hard_start_xmit+0x149/0x620 net/core/dev.c:3623
sch_direct_xmit+0x292/0x9b0 net/sched/sch_generic.c:336
qdisc_restart net/sched/sch_generic.c:401 [inline]
__qdisc_run+0xa85/0x1df0 net/sched/sch_generic.c:409
qdisc_run+0x121/0x330 include/net/pkt_sched.h:127
__dev_xmit_skb net/core/dev.c:3799 [inline]
__dev_queue_xmit+0xcf0/0x28e0 net/core/dev.c:4155
dev_queue_xmit+0x17/0x20 net/core/dev.c:4223

Memory state around the buggy address:
ffff8881203a7b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881203a7b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881203a7c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8881203a7c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8881203a7d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
hid 0003:28DE:1102.0001: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0001: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0001: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0001: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0001: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0021: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0021: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0021: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0021: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0021: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.002D: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.002D: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.002D: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.002D: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.002D: No HID_FEATURE_REPORT submitted - nothing to read


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Sep 7, 2024, 10:35:23 PMSep 7
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 53be7c8abe11 ANDROID: usb: dwc3: Fix gadget mis-merge from..
git tree: android13-5.15-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=162feffb980000
kernel config: https://syzkaller.appspot.com/x/.config?x=db75c907f4392428
dashboard link: https://syzkaller.appspot.com/bug?extid=73d7bd81116b4ca4f785
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1225ef29980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1042abc7980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/87bfcacca60f/disk-53be7c8a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e28b8404f2b4/vmlinux-53be7c8a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5027f7beaa68/bzImage-53be7c8a.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+73d7bd...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: use-after-free in atomic_long_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1667 [inline]
BUG: KASAN: use-after-free in __mutex_trylock_fast kernel/locking/mutex.c:169 [inline]
BUG: KASAN: use-after-free in mutex_lock+0xa9/0x1e0 kernel/locking/mutex.c:288
Write of size 8 at addr ffff88810b0bb850 by task acpid/85

CPU: 0 PID: 85 Comm: acpid Not tainted 5.15.157-syzkaller-00897-g53be7c8abe11 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1c0 lib/dump_stack.c:106
print_address_description+0x87/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0x179/0x1c0 mm/kasan/report.c:444
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]
atomic_long_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1667 [inline]
__mutex_trylock_fast kernel/locking/mutex.c:169 [inline]
mutex_lock+0xa9/0x1e0 kernel/locking/mutex.c:288
steam_input_open+0x91/0x1a0 drivers/hid/hid-steam.c:297
input_open_device+0x1a5/0x310 drivers/input/input.c:640
evdev_open_device drivers/input/evdev.c:404 [inline]
evdev_open+0x3df/0x620 drivers/input/evdev.c:491
chrdev_open+0x4f7/0x620 fs/char_dev.c:414
do_dentry_open+0x81c/0xfd0 fs/open.c:828
vfs_open+0x73/0x80 fs/open.c:958
do_open fs/namei.c:3608 [inline]
path_openat+0x26f0/0x2f40 fs/namei.c:3742
do_filp_open+0x21c/0x460 fs/namei.c:3769
do_sys_openat2+0x13f/0x830 fs/open.c:1234
do_sys_open fs/open.c:1250 [inline]
__do_sys_openat fs/open.c:1266 [inline]
__se_sys_openat fs/open.c:1261 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1261
x64_sys_call+0x6bf/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:258
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fb2d0a449a4
Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007fff058659b0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fff05865c98 RCX: 00007fb2d0a449a4
RDX: 0000000000080800 RSI: 00007fff05865b98 RDI: 00000000ffffff9c
RBP: 00007fff05865b98 R08: 00000000000000f4 R09: 00007fff05865b98
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080800
R13: 0000000000000020 R14: 00007fff05865c98 R15: 00007fff05865b98
</TASK>

Allocated by task 599:
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:433 [inline]
____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:512
__kasan_kmalloc+0x9/0x10 mm/kasan/common.c:521
kasan_kmalloc include/linux/kasan.h:227 [inline]
__kmalloc_track_caller+0x139/0x260 mm/slub.c:4950
alloc_dr drivers/base/devres.c:116 [inline]
devm_kmalloc+0x4f/0x160 drivers/base/devres.c:823
devm_kzalloc include/linux/device.h:209 [inline]
steam_probe+0x11d/0xa80 drivers/hid/hid-steam.c:741
hid_device_probe+0x261/0x390 drivers/hid/hid-core.c:2302
really_probe+0x28d/0x970 drivers/base/dd.c:595
__driver_probe_device+0x1a0/0x310 drivers/base/dd.c:755
driver_probe_device+0x54/0x3d0 drivers/base/dd.c:785
__device_attach_driver+0x2c5/0x470 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x312/0x510 drivers/base/dd.c:979
device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028
bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:487
device_add+0xb60/0xf10 drivers/base/core.c:3419
hid_add_device+0x39c/0x4e0 drivers/hid/hid-core.c:2452
usbhid_probe+0xb0e/0xea0 drivers/hid/usbhid/hid-core.c:1424
usb_probe_interface+0x5b6/0xa90 drivers/usb/core/driver.c:396
really_probe+0x28d/0x970 drivers/base/dd.c:595
__driver_probe_device+0x1a0/0x310 drivers/base/dd.c:755
driver_probe_device+0x54/0x3d0 drivers/base/dd.c:785
__device_attach_driver+0x2c5/0x470 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x312/0x510 drivers/base/dd.c:979
device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028
bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:487
device_add+0xb60/0xf10 drivers/base/core.c:3419
usb_set_configuration+0x190f/0x1e80 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x8b/0x150 drivers/usb/core/generic.c:238
usb_probe_device+0x144/0x260 drivers/usb/core/driver.c:293
really_probe+0x28d/0x970 drivers/base/dd.c:595
__driver_probe_device+0x1a0/0x310 drivers/base/dd.c:755
driver_probe_device+0x54/0x3d0 drivers/base/dd.c:785
__device_attach_driver+0x2c5/0x470 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x312/0x510 drivers/base/dd.c:979
device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028
bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:487
device_add+0xb60/0xf10 drivers/base/core.c:3419
usb_new_device+0x1038/0x1c00 drivers/usb/core/hub.c:2599
hub_port_connect drivers/usb/core/hub.c:5512 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5652 [inline]
port_event drivers/usb/core/hub.c:5802 [inline]
hub_event+0x2def/0x4770 drivers/usb/core/hub.c:5884
process_one_work+0x6bb/0xc10 kernel/workqueue.c:2325
worker_thread+0xad5/0x12a0 kernel/workqueue.c:2472
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300

Freed by task 599:
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+0x126/0x160 mm/kasan/common.c:365
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
kasan_slab_free include/linux/kasan.h:193 [inline]
slab_free_hook mm/slub.c:1723 [inline]
slab_free_freelist_hook+0xbd/0x190 mm/slub.c:1749
slab_free mm/slub.c:3519 [inline]
kfree+0xc8/0x220 mm/slub.c:4579
release_nodes+0xf1/0x230 drivers/base/devres.c:501
devres_release_all+0x148/0x1a0 drivers/base/devres.c:530
__device_release_driver drivers/base/dd.c:1231 [inline]
device_release_driver_internal+0x51a/0x7d0 drivers/base/dd.c:1262
device_release_driver+0x19/0x20 drivers/base/dd.c:1285
bus_remove_device+0x2f8/0x360 drivers/base/bus.c:529
device_del+0x663/0xe90 drivers/base/core.c:3607
hid_remove_device drivers/hid/hid-core.c:2500 [inline]
hid_destroy_device+0x68/0x110 drivers/hid/hid-core.c:2519
usbhid_disconnect+0x9e/0xc0 drivers/hid/usbhid/hid-core.c:1451
usb_unbind_interface+0x1fa/0x8c0 drivers/usb/core/driver.c:458
__device_release_driver drivers/base/dd.c:1229 [inline]
device_release_driver_internal+0x50b/0x7d0 drivers/base/dd.c:1262
device_release_driver+0x19/0x20 drivers/base/dd.c:1285
bus_remove_device+0x2f8/0x360 drivers/base/bus.c:529
device_del+0x663/0xe90 drivers/base/core.c:3607
usb_disable_device+0x380/0x720 drivers/usb/core/message.c:1414
usb_disconnect+0x32a/0x890 drivers/usb/core/hub.c:2249
hub_port_connect drivers/usb/core/hub.c:5351 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5652 [inline]
port_event drivers/usb/core/hub.c:5802 [inline]
hub_event+0x1d42/0x4770 drivers/usb/core/hub.c:5884
process_one_work+0x6bb/0xc10 kernel/workqueue.c:2325
process_scheduled_works kernel/workqueue.c:2388 [inline]
worker_thread+0xe02/0x12a0 kernel/workqueue.c:2474
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300

The buggy address belongs to the object at ffff88810b0bb800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 80 bytes inside of
512-byte region [ffff88810b0bb800, ffff88810b0bba00)
The buggy address belongs to the page:
page:ffffea00042c2e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10b0b8
head:ffffea00042c2e00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea0004677a00 0000000200000002 ffff888100042f00
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 1, ts 2143604773, free_ts 2130550586
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2605
prep_new_page+0x1b/0x110 mm/page_alloc.c:2611
get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4485
__alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5779
allocate_slab mm/slub.c:1932 [inline]
new_slab+0x9a/0x4e0 mm/slub.c:1995
___slab_alloc+0x39e/0x830 mm/slub.c:3028
__slab_alloc+0x4a/0x90 mm/slub.c:3115
slab_alloc_node mm/slub.c:3206 [inline]
slab_alloc mm/slub.c:3248 [inline]
kmem_cache_alloc_trace+0x142/0x210 mm/slub.c:3265
kmalloc include/linux/slab.h:603 [inline]
kzalloc include/linux/slab.h:733 [inline]
dev_pm_qos_constraints_allocate+0x53/0x400 drivers/base/power/qos.c:201
__dev_pm_qos_add_request+0x149/0x420 drivers/base/power/qos.c:345
dev_pm_qos_add_request+0x39/0x60 drivers/base/power/qos.c:395
usb_hub_create_port_device+0x44e/0xab0 drivers/usb/core/port.c:601
hub_configure drivers/usb/core/hub.c:1669 [inline]
hub_probe+0x1e67/0x2900 drivers/usb/core/hub.c:1913
usb_probe_interface+0x5b6/0xa90 drivers/usb/core/driver.c:396
really_probe+0x28d/0x970 drivers/base/dd.c:595
__driver_probe_device+0x1a0/0x310 drivers/base/dd.c:755
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1472 [inline]
free_pcp_prepare mm/page_alloc.c:1544 [inline]
free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3534
free_unref_page+0xe8/0x750 mm/page_alloc.c:3616
free_the_page mm/page_alloc.c:805 [inline]
__free_pages+0x61/0xf0 mm/page_alloc.c:5855
free_pages+0x7c/0x90 mm/page_alloc.c:5866
__stack_depot_save+0x420/0x470 lib/stackdepot.c:358
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:433 [inline]
__kasan_slab_alloc+0xc3/0xe0 mm/kasan/common.c:466
kasan_slab_alloc include/linux/kasan.h:217 [inline]
slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550
slab_alloc_node mm/slub.c:3240 [inline]
slab_alloc mm/slub.c:3248 [inline]
kmem_cache_alloc+0xf5/0x200 mm/slub.c:3253
radix_tree_node_alloc+0x198/0x3c0 lib/radix-tree.c:251
idr_get_free+0x2b6/0xa90 lib/radix-tree.c:1504
idr_alloc_u32 lib/idr.c:46 [inline]
idr_alloc_cyclic+0x1ec/0x5d0 lib/idr.c:125
__kernfs_new_node+0x124/0x700 fs/kernfs/dir.c:599
kernfs_new_node+0x130/0x230 fs/kernfs/dir.c:669
kernfs_create_link+0xba/0x210 fs/kernfs/symlink.c:39
sysfs_do_create_link_sd+0x89/0x110 fs/sysfs/symlink.c:44
sysfs_do_create_link fs/sysfs/symlink.c:80 [inline]
sysfs_create_link+0x68/0x80 fs/sysfs/symlink.c:92

Memory state around the buggy address:
ffff88810b0bb700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88810b0bb780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88810b0bb800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88810b0bb880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88810b0bb900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
hid 0003:28DE:1102.0371: No HID_FEATURE_REPORT submitted - nothing to read
Reply all
Reply to author
Forward
0 new messages