[v6.1] possible deadlock in uinput_request_submit

0 views
Skip to first unread message

syzbot

unread,
May 5, 2024, 9:52:34 AMMay 5
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 909ba1f1b414 Linux 6.1.90
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14fa9450980000
kernel config: https://syzkaller.appspot.com/x/.config?x=3be6d6f79b879a67
dashboard link: https://syzkaller.appspot.com/bug?extid=2f445fb32f2350d20dee
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/63178de7cba7/disk-909ba1f1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/25dec90d8126/vmlinux-909ba1f1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/25509ea1c6cd/bzImage-909ba1f1.xz

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

input: syz1 as /devices/virtual/input/input6
======================================================
WARNING: possible circular locking dependency detected
6.1.90-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.1/16091 is trying to acquire lock:
ffff88805921e070 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_send drivers/input/misc/uinput.c:150 [inline]
ffff88805921e070 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_submit+0x198/0x730 drivers/input/misc/uinput.c:181

but task is already holding lock:
ffff88805921b8b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3e0/0xae0 drivers/input/ff-core.c:120

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&ff->mutex){+.+.}-{3:3}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
input_ff_flush+0x5a/0x130 drivers/input/ff-core.c:240
input_flush_device+0x94/0xc0 drivers/input/input.c:682
evdev_release+0xf5/0x7c0 drivers/input/evdev.c:444
__fput+0x3b7/0x890 fs/file_table.c:320
task_work_run+0x246/0x300 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #2 (&dev->mutex#2){+.+.}-{3:3}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
input_register_handle+0x69/0x3a0 drivers/input/input.c:2555
kbd_connect+0xbb/0x120 drivers/tty/vt/keyboard.c:1589
input_attach_handler drivers/input/input.c:1060 [inline]
input_register_device+0xcec/0x1080 drivers/input/input.c:2396
acpi_button_add+0x62a/0x9f0 drivers/acpi/button.c:559
acpi_device_probe+0xa0/0x2f0 drivers/acpi/bus.c:1023
really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:785
driver_probe_device+0x50/0x420 drivers/base/dd.c:815
__driver_attach+0x458/0x6f0 drivers/base/dd.c:1201
bus_for_each_dev+0x17c/0x1f0 drivers/base/bus.c:301
bus_add_driver+0x334/0x600 drivers/base/bus.c:618
driver_register+0x2bf/0x3a0 drivers/base/driver.c:246
do_one_initcall+0x265/0x8f0 init/main.c:1299
do_initcall_level+0x157/0x207 init/main.c:1372
do_initcalls+0x49/0x86 init/main.c:1388
kernel_init_freeable+0x45c/0x60f init/main.c:1627
kernel_init+0x19/0x290 init/main.c:1515
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

-> #1 (input_mutex){+.+.}-{3:3}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
input_register_device+0xadd/0x1080 drivers/input/input.c:2389
uinput_create_device+0x40e/0x620 drivers/input/misc/uinput.c:364
uinput_ioctl_handler+0xa83/0x16d0 drivers/input/misc/uinput.c:870
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (&newdev->mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain+0x1661/0x5950 kernel/locking/lockdep.c:3825
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
uinput_request_send drivers/input/misc/uinput.c:150 [inline]
uinput_request_submit+0x198/0x730 drivers/input/misc/uinput.c:181
uinput_dev_upload_effect+0x195/0x230 drivers/input/misc/uinput.c:256
input_ff_upload+0x5d7/0xae0 drivers/input/ff-core.c:150
evdev_do_ioctl drivers/input/evdev.c:1183 [inline]
evdev_ioctl_handler+0x16ee/0x2170 drivers/input/evdev.c:1272
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

Chain exists of:
&newdev->mutex --> &dev->mutex#2 --> &ff->mutex

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&ff->mutex);
lock(&dev->mutex#2);
lock(&ff->mutex);
lock(&newdev->mutex);

*** DEADLOCK ***

2 locks held by syz-executor.1/16091:
#0: ffff88807a7d4110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_ioctl_handler+0x124/0x2170 drivers/input/evdev.c:1263
#1: ffff88805921b8b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3e0/0xae0 drivers/input/ff-core.c:120

stack backtrace:
CPU: 1 PID: 16091 Comm: syz-executor.1 Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
check_noncircular+0x2fa/0x3b0 kernel/locking/lockdep.c:2170
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain+0x1661/0x5950 kernel/locking/lockdep.c:3825
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
uinput_request_send drivers/input/misc/uinput.c:150 [inline]
uinput_request_submit+0x198/0x730 drivers/input/misc/uinput.c:181
uinput_dev_upload_effect+0x195/0x230 drivers/input/misc/uinput.c:256
input_ff_upload+0x5d7/0xae0 drivers/input/ff-core.c:150
evdev_do_ioctl drivers/input/evdev.c:1183 [inline]
evdev_ioctl_handler+0x16ee/0x2170 drivers/input/evdev.c:1272
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f15b647dca9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f15b4ff60c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f15b65abf80 RCX: 00007f15b647dca9
RDX: 0000000020000300 RSI: 0000000040304580 RDI: 0000000000000004
RBP: 00007f15b64c947e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f15b65abf80 R15: 00007fffd073bfe8
</TASK>


---
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 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,
May 5, 2024, 9:53:29 AMMay 5
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 284087d4f7d5 Linux 5.15.158
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=128f6338980000
kernel config: https://syzkaller.appspot.com/x/.config?x=b0dd54e4b5171ebc
dashboard link: https://syzkaller.appspot.com/bug?extid=51d6626c6b035ff47f4f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c2e33c1db6bf/disk-284087d4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d9f77284af1d/vmlinux-284087d4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a600323dd149/bzImage-284087d4.xz

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

input: syz1 as /devices/virtual/input/input12
======================================================
WARNING: possible circular locking dependency detected
5.15.158-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.3/8572 is trying to acquire lock:
ffff888079340870 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_send drivers/input/misc/uinput.c:150 [inline]
ffff888079340870 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_submit+0x19a/0x730 drivers/input/misc/uinput.c:181

but task is already holding lock:
ffff8880793400b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3a5/0xa00 drivers/input/ff-core.c:123

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&ff->mutex){+.+.}-{3:3}:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
input_ff_flush+0x5a/0x130 drivers/input/ff-core.c:243
input_flush_device+0x94/0xc0 drivers/input/input.c:672
evdev_release+0xf5/0x7c0 drivers/input/evdev.c:444
__fput+0x3bf/0x890 fs/file_table.c:280
task_work_run+0x129/0x1a0 kernel/task_work.c:164
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
__syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #2 (&dev->mutex#2){+.+.}-{3:3}:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_interruptible_nested+0x17/0x20 kernel/locking/mutex.c:765
input_register_handle+0x69/0x3a0 drivers/input/input.c:2513
kbd_connect+0xbb/0x120 drivers/tty/vt/keyboard.c:1577
input_attach_handler drivers/input/input.c:1046 [inline]
input_register_device+0xdae/0x1150 drivers/input/input.c:2354
acpi_button_add+0x62d/0x9f0 drivers/acpi/button.c:568
acpi_device_probe+0xa3/0x2f0 drivers/acpi/bus.c:1005
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__driver_attach+0x479/0x690 drivers/base/dd.c:1164
bus_for_each_dev+0x17c/0x1f0 drivers/base/bus.c:301
bus_add_driver+0x334/0x600 drivers/base/bus.c:618
driver_register+0x2bf/0x3a0 drivers/base/driver.c:240
do_one_initcall+0x22b/0x7a0 init/main.c:1302
do_initcall_level+0x157/0x210 init/main.c:1375
do_initcalls+0x49/0x90 init/main.c:1391
kernel_init_freeable+0x425/0x5c0 init/main.c:1615
kernel_init+0x19/0x290 init/main.c:1506
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300

-> #1 (input_mutex){+.+.}-{3:3}:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_interruptible_nested+0x17/0x20 kernel/locking/mutex.c:765
input_register_device+0xb81/0x1150 drivers/input/input.c:2347
uinput_create_device+0x40e/0x620 drivers/input/misc/uinput.c:364
uinput_ioctl_handler+0xa83/0x16d0 drivers/input/misc/uinput.c:870
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
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

-> #0 (&newdev->mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_interruptible_nested+0x17/0x20 kernel/locking/mutex.c:765
uinput_request_send drivers/input/misc/uinput.c:150 [inline]
uinput_request_submit+0x19a/0x730 drivers/input/misc/uinput.c:181
uinput_dev_upload_effect+0x195/0x230 drivers/input/misc/uinput.c:256
input_ff_upload+0x59c/0xa00 drivers/input/ff-core.c:153
evdev_do_ioctl drivers/input/evdev.c:1183 [inline]
evdev_ioctl_handler+0x178b/0x2090 drivers/input/evdev.c:1272
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
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

other info that might help us debug this:

Chain exists of:
&newdev->mutex --> &dev->mutex#2 --> &ff->mutex

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&ff->mutex);
lock(&dev->mutex#2);
lock(&ff->mutex);
lock(&newdev->mutex);

*** DEADLOCK ***

2 locks held by syz-executor.3/8572:
#0: ffff888079cd7110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_ioctl_handler+0x124/0x2090 drivers/input/evdev.c:1263
#1: ffff8880793400b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3a5/0xa00 drivers/input/ff-core.c:123

stack backtrace:
CPU: 0 PID: 8572 Comm: syz-executor.3 Not tainted 5.15.158-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
check_noncircular+0x2f8/0x3b0 kernel/locking/lockdep.c:2133
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_interruptible_nested+0x17/0x20 kernel/locking/mutex.c:765
uinput_request_send drivers/input/misc/uinput.c:150 [inline]
uinput_request_submit+0x19a/0x730 drivers/input/misc/uinput.c:181
uinput_dev_upload_effect+0x195/0x230 drivers/input/misc/uinput.c:256
input_ff_upload+0x59c/0xa00 drivers/input/ff-core.c:153
evdev_do_ioctl drivers/input/evdev.c:1183 [inline]
evdev_ioctl_handler+0x178b/0x2090 drivers/input/evdev.c:1272
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
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:0x7fa253c53ca9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa2521c60c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fa253d81f80 RCX: 00007fa253c53ca9
RDX: 0000000020000300 RSI: 0000000040304580 RDI: 0000000000000004
RBP: 00007fa253c9f47e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fa253d81f80 R15: 00007ffc1d2a3908

syzbot

unread,
May 5, 2024, 10:07:19 AMMay 5
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 909ba1f1b414 Linux 6.1.90
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12e55f5f180000
kernel config: https://syzkaller.appspot.com/x/.config?x=3be6d6f79b879a67
dashboard link: https://syzkaller.appspot.com/bug?extid=2f445fb32f2350d20dee
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=12a9b2a0980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14ab0470980000
input: syz1 as /devices/virtual/input/input5
======================================================
WARNING: possible circular locking dependency detected
6.1.90-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor159/3541 is trying to acquire lock:
ffff8880765b4070 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_send drivers/input/misc/uinput.c:150 [inline]
ffff8880765b4070 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_submit+0x198/0x730 drivers/input/misc/uinput.c:181

but task is already holding lock:
ffff8880765b48b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3e0/0xae0 drivers/input/ff-core.c:120
2 locks held by syz-executor159/3541:
#0: ffff888021534110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_ioctl_handler+0x124/0x2170 drivers/input/evdev.c:1263
#1: ffff8880765b48b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3e0/0xae0 drivers/input/ff-core.c:120

stack backtrace:
CPU: 0 PID: 3541 Comm: syz-executor159 Not tainted 6.1.90-syzkaller #0
RIP: 0033:0x7f78a76eb269
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd827d23d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffd827d25a8 RCX: 00007f78a76eb269
RDX: 0000000020000300 RSI: 0000000040304580 RDI: 0000000000000004
RBP: 00007f78a775e610 R08: 0000000000000000 R09: 00007ffd827d25a8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffd827d2598 R14: 0000000000000001 R15: 0000000000000001
</TASK>


---
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.

syzbot

unread,
May 5, 2024, 11:11:19 AMMay 5
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 284087d4f7d5 Linux 5.15.158
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17511898980000
kernel config: https://syzkaller.appspot.com/x/.config?x=b0dd54e4b5171ebc
dashboard link: https://syzkaller.appspot.com/bug?extid=51d6626c6b035ff47f4f
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=154dd3c4980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17647450980000
input: syz1 as /devices/virtual/input/input5
======================================================
WARNING: possible circular locking dependency detected
5.15.158-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor233/3500 is trying to acquire lock:
ffff88807d5cd070 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_send drivers/input/misc/uinput.c:150 [inline]
ffff88807d5cd070 (&newdev->mutex){+.+.}-{3:3}, at: uinput_request_submit+0x19a/0x730 drivers/input/misc/uinput.c:181

but task is already holding lock:
ffff88807d5cd8b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3a5/0xa00 drivers/input/ff-core.c:123
2 locks held by syz-executor233/3500:
#0: ffff888078cfa110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_ioctl_handler+0x124/0x2090 drivers/input/evdev.c:1263
#1: ffff88807d5cd8b0 (&ff->mutex){+.+.}-{3:3}, at: input_ff_upload+0x3a5/0xa00 drivers/input/ff-core.c:123

stack backtrace:
CPU: 0 PID: 3500 Comm: syz-executor233 Not tainted 5.15.158-syzkaller #0
RIP: 0033:0x7f8499890979
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc1c1a74b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f8499890979
RDX: 0000000020000300 RSI: 0000000040304580 RDI: 0000000000000004
RBP: 00007f84999035f0 R08: 0000000000000006 R09: 0000000000000006
R10: 000000000000001f R11: 0000000000000246 R12: 0000000000000001
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
Reply all
Reply to author
Forward
0 new messages