syzbot


KASAN: null-ptr-deref Write in input_ff_create

Status: upstream: reported C repro on 2024/12/24 06:38
Subsystems: input
[Documentation on labels]
Reported-by: syzbot+dd5f8d6456680e55eb0a@syzkaller.appspotmail.com
First crash: 6d17h, last: 8m
Cause bisection: introduced by (bisect log) :
commit 5203b3a18c1bbf50ec5fff27489da8e9bce48ddb
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Thu Nov 7 07:15:29 2024 +0000

  Input: ff-core - make use of __free() cleanup facility

Crash: KASAN: null-ptr-deref Write in input_ff_create (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] drivers/input: Fix null pointer dereferences in input_ff_create() and input_ff_create_memless() 1 (1) 2024/12/25 23:59
[syzbot] [input?] KASAN: null-ptr-deref Write in input_ff_create 0 (6) 2024/12/25 23:31
Last patch testing requests (5)
Created Duration User Patch Repo Result
2024/12/25 23:31 18m qasdev00@gmail.com patch linux-next report log
2024/12/25 16:44 22m qasdev00@gmail.com patch linux-next OK log
2024/12/25 16:39 0m qasdev00@gmail.com patch linux-next error
2024/12/25 15:47 8m qasdev00@gmail.com patch linux-next error
2024/12/25 00:36 32m qasdev00@gmail.com patch linux-next OK log

Sample crash report:
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: syz
usb 1-1: Manufacturer: syz
usb 1-1: SerialNumber: syz
usb 1-1: config 0 descriptor??
==================================================================
BUG: KASAN: null-ptr-deref in instrument_write include/linux/instrumented.h:40 [inline]
BUG: KASAN: null-ptr-deref in ___set_bit include/asm-generic/bitops/instrumented-non-atomic.h:28 [inline]
BUG: KASAN: null-ptr-deref in input_ff_create+0x1aa/0x2f0 drivers/input/ff-core.c:325
Write of size 8 at addr 0000000000000040 by task kworker/0:2/975

CPU: 0 UID: 0 PID: 975 Comm: kworker/0:2 Not tainted 6.13.0-rc3-next-20241220-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_report+0xe8/0x550 mm/kasan/report.c:492
 kasan_report+0x143/0x180 mm/kasan/report.c:602
 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189
 instrument_write include/linux/instrumented.h:40 [inline]
 ___set_bit include/asm-generic/bitops/instrumented-non-atomic.h:28 [inline]
 input_ff_create+0x1aa/0x2f0 drivers/input/ff-core.c:325
 input_ff_create_memless+0x133/0x630 drivers/input/ff-memless.c:522
 xpad_init_ff drivers/input/joystick/xpad.c:1562 [inline]
 xpad_init_input+0xcef/0x1440 drivers/input/joystick/xpad.c:1960
 xpad_probe+0x1427/0x1b90 drivers/input/joystick/xpad.c:2143
 usb_probe_interface+0x641/0xbb0 drivers/usb/core/driver.c:396
 really_probe+0x2b9/0xad0 drivers/base/dd.c:658
 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800
 driver_probe_device+0x50/0x430 drivers/base/dd.c:830
 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:958
 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:459
 __device_attach+0x333/0x520 drivers/base/dd.c:1030
 bus_probe_device+0x189/0x260 drivers/base/bus.c:534
 device_add+0x856/0xbf0 drivers/base/core.c:3665
 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:291
 really_probe+0x2b9/0xad0 drivers/base/dd.c:658
 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800
 driver_probe_device+0x50/0x430 drivers/base/dd.c:830
 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:958
 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:459
 __device_attach+0x333/0x520 drivers/base/dd.c:1030
 bus_probe_device+0x189/0x260 drivers/base/bus.c:534
 device_add+0x856/0xbf0 drivers/base/core.c:3665
 usb_new_device+0x104a/0x19a0 drivers/usb/core/hub.c:2651
 hub_port_connect drivers/usb/core/hub.c:5521 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
 port_event drivers/usb/core/hub.c:5821 [inline]
 hub_event+0x2d6d/0x5150 drivers/usb/core/hub.c:5903
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310
 worker_thread+0x870/0xd30 kernel/workqueue.c:3391
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
==================================================================

Crashes (1269):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/20 13:23 linux-next 8155b4ef3466 1d58202c .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in input_ff_create
2024/12/20 13:30 linux-next 8155b4ef3466 1d58202c .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 06:23 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in input_ff_create
2024/12/25 01:34 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in input_ff_create
2024/12/24 21:32 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in input_ff_create
2024/12/24 16:42 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in input_ff_create
2024/12/26 23:46 linux-next 8155b4ef3466 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 19:58 linux-next 8155b4ef3466 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 18:36 linux-next 8155b4ef3466 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 17:58 linux-next 8155b4ef3466 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 12:17 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 11:06 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 10:07 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 08:56 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 06:43 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 05:27 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 04:46 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 04:25 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 04:15 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 03:06 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/26 00:24 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 23:33 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 22:06 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 19:52 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 18:47 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 16:26 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 15:23 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 14:45 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 13:09 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 11:36 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 09:06 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 08:23 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 06:24 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 05:23 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 04:57 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 03:55 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 02:53 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/25 00:17 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/24 23:15 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/24 21:41 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/24 20:28 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/24 20:28 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/24 19:27 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/24 17:26 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/24 16:20 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/24 15:10 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
2024/12/24 14:00 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Read in input_ff_create
* Struck through repros no longer work on HEAD.