* [syzbot] [input?] KASAN: null-ptr-deref Write in input_ff_create
@ 2024-12-24 6:38 syzbot
2024-12-25 0:36 ` [syzbot] test patch input_ff_create syzbot
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: syzbot @ 2024-12-24 6:38 UTC (permalink / raw)
To: appsforartists, dmitry.torokhov, linux-input, linux-kernel,
syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 8155b4ef3466 Add linux-next specific files for 20241220
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=111cafe8580000
kernel config: https://syzkaller.appspot.com/x/.config?x=9c90bb7161a56c88
dashboard link: https://syzkaller.appspot.com/bug?extid=dd5f8d6456680e55eb0a
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=12ea52df980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=111600c4580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98a974fc662d/disk-8155b4ef.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2dea9b72f624/vmlinux-8155b4ef.xz
kernel image: https://storage.googleapis.com/syzbot-assets/593a42b9eb34/bzImage-8155b4ef.xz
The issue was bisected to:
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
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14ffd2df980000
final oops: https://syzkaller.appspot.com/x/report.txt?x=16ffd2df980000
console output: https://syzkaller.appspot.com/x/log.txt?x=12ffd2df980000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+dd5f8d6456680e55eb0a@syzkaller.appspotmail.com
Fixes: 5203b3a18c1b ("Input: ff-core - make use of __free() cleanup facility")
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>
==================================================================
---
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 syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
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
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [syzbot] test patch input_ff_create
2024-12-24 6:38 [syzbot] [input?] KASAN: null-ptr-deref Write in input_ff_create syzbot
@ 2024-12-25 0:36 ` syzbot
2024-12-25 15:47 ` [syzbot] test null ptr deref patch syzbot
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-12-25 0:36 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: test patch input_ff_create
Author: qasdev00@gmail.com
#syz test
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [syzbot] test null ptr deref patch
2024-12-24 6:38 [syzbot] [input?] KASAN: null-ptr-deref Write in input_ff_create syzbot
2024-12-25 0:36 ` [syzbot] test patch input_ff_create syzbot
@ 2024-12-25 15:47 ` syzbot
2024-12-25 16:39 ` [syzbot] test patch syzbot
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-12-25 15:47 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: test null ptr deref patch
Author: qasdev00@gmail.com
#syz test
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [syzbot] test patch
2024-12-24 6:38 [syzbot] [input?] KASAN: null-ptr-deref Write in input_ff_create syzbot
2024-12-25 0:36 ` [syzbot] test patch input_ff_create syzbot
2024-12-25 15:47 ` [syzbot] test null ptr deref patch syzbot
@ 2024-12-25 16:39 ` syzbot
2024-12-25 16:44 ` [syzbot] syzbot
2024-12-25 23:31 ` [syzbot] final patch test syzbot
4 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-12-25 16:39 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: test patch
Author: qasdev00@gmail.com
#syz test
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot]
2024-12-24 6:38 [syzbot] [input?] KASAN: null-ptr-deref Write in input_ff_create syzbot
` (2 preceding siblings ...)
2024-12-25 16:39 ` [syzbot] test patch syzbot
@ 2024-12-25 16:44 ` syzbot
2024-12-25 23:31 ` [syzbot] final patch test syzbot
4 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-12-25 16:44 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject:
Author: qasdev00@gmail.com
#syz test
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [syzbot] final patch test
2024-12-24 6:38 [syzbot] [input?] KASAN: null-ptr-deref Write in input_ff_create syzbot
` (3 preceding siblings ...)
2024-12-25 16:44 ` [syzbot] syzbot
@ 2024-12-25 23:31 ` syzbot
4 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-12-25 23:31 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: final patch test
Author: qasdev00@gmail.com
#syz test
^ permalink raw reply [flat|nested] 7+ messages in thread
* [syzbot] [bfs?] general protection fault in bfs_get_block (2)
@ 2023-11-25 14:24 syzbot
2023-11-26 23:24 ` [syzbot] Test patch syzbot
0 siblings, 1 reply; 7+ messages in thread
From: syzbot @ 2023-11-25 14:24 UTC (permalink / raw)
To: aivazian.tigran, linux-fsdevel, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 98b1cc82c4af Linux 6.7-rc2
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1427ba00e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=aec35c1281ec0aaf
dashboard link: https://syzkaller.appspot.com/bug?extid=dc6ed11a88fb40d6e184
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16783b84e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=165172a0e80000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b60687e82ad4/disk-98b1cc82.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/29477f0b04df/vmlinux-98b1cc82.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9aab12888a60/bzImage-98b1cc82.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/58e57ae1d84f/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+dc6ed11a88fb40d6e184@syzkaller.appspotmail.com
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 1 PID: 5059 Comm: syz-executor306 Not tainted 6.7.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:bfs_move_block fs/bfs/file.c:42 [inline]
RIP: 0010:bfs_move_blocks fs/bfs/file.c:56 [inline]
RIP: 0010:bfs_get_block+0x3b2/0xeb0 fs/bfs/file.c:125
Code: a8 ff 48 8d 7d 20 48 89 c3 48 89 f8 48 c1 e8 03 42 80 3c 28 00 0f 85 5b 08 00 00 48 8d 7b 28 48 8b 55 20 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 0f 85 dd 08 00 00 48 8d 7d 28 48 8b 43 28 48 89 f9
RSP: 0018:ffffc900033fef30 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 0000000000000000 RCX: ffffffff81fd2b77
RDX: 0000000000000200 RSI: ffffffff81fd2e15 RDI: 0000000000000028
RBP: ffff888074ee20e8 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffffa R11: 0000000000000003 R12: 0000000000000019
R13: dffffc0000000000 R14: ffff88807fb36000 R15: ffffed100ff66c2c
FS: 0000555556c24380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6250121b3b CR3: 000000001f25d000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__block_write_begin_int+0x3c0/0x1560 fs/buffer.c:2119
__block_write_begin fs/buffer.c:2168 [inline]
block_write_begin+0xb1/0x490 fs/buffer.c:2227
bfs_write_begin+0x31/0xd0 fs/bfs/file.c:177
generic_perform_write+0x278/0x600 mm/filemap.c:3918
__generic_file_write_iter+0x1f9/0x240 mm/filemap.c:4013
generic_file_write_iter+0xe3/0x350 mm/filemap.c:4039
__kernel_write_iter+0x261/0x7b0 fs/read_write.c:517
__kernel_write+0xf6/0x140 fs/read_write.c:537
__dump_emit fs/coredump.c:813 [inline]
dump_emit+0x21d/0x330 fs/coredump.c:850
writenote+0x215/0x2b0 fs/binfmt_elf.c:1422
write_note_info fs/binfmt_elf.c:1897 [inline]
elf_core_dump+0x250c/0x3900 fs/binfmt_elf.c:2064
do_coredump+0x2c97/0x3fd0 fs/coredump.c:764
get_signal+0x2438/0x2790 kernel/signal.c:2890
arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
exit_to_user_mode_prepare+0x121/0x240 kernel/entry/common.c:204
irqentry_exit_to_user_mode+0xa/0x40 kernel/entry/common.c:309
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0033:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 002b:0000000020000008 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 0000000000000020 RCX: 00007f3fa02f7db9
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000555500000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000f4240
R13: 00007ffdb733b1e8 R14: 0000000000000001 R15: 00007ffdb733afb0
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bfs_move_block fs/bfs/file.c:42 [inline]
RIP: 0010:bfs_move_blocks fs/bfs/file.c:56 [inline]
RIP: 0010:bfs_get_block+0x3b2/0xeb0 fs/bfs/file.c:125
Code: a8 ff 48 8d 7d 20 48 89 c3 48 89 f8 48 c1 e8 03 42 80 3c 28 00 0f 85 5b 08 00 00 48 8d 7b 28 48 8b 55 20 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 0f 85 dd 08 00 00 48 8d 7d 28 48 8b 43 28 48 89 f9
RSP: 0018:ffffc900033fef30 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 0000000000000000 RCX: ffffffff81fd2b77
RDX: 0000000000000200 RSI: ffffffff81fd2e15 RDI: 0000000000000028
RBP: ffff888074ee20e8 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffffa R11: 0000000000000003 R12: 0000000000000019
R13: dffffc0000000000 R14: ffff88807fb36000 R15: ffffed100ff66c2c
FS: 0000555556c24380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000001f25d000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: a8 ff test $0xff,%al
2: 48 8d 7d 20 lea 0x20(%rbp),%rdi
6: 48 89 c3 mov %rax,%rbx
9: 48 89 f8 mov %rdi,%rax
c: 48 c1 e8 03 shr $0x3,%rax
10: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
15: 0f 85 5b 08 00 00 jne 0x876
1b: 48 8d 7b 28 lea 0x28(%rbx),%rdi
1f: 48 8b 55 20 mov 0x20(%rbp),%rdx
23: 48 89 f8 mov %rdi,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1) <-- trapping instruction
2f: 0f 85 dd 08 00 00 jne 0x912
35: 48 8d 7d 28 lea 0x28(%rbp),%rdi
39: 48 8b 43 28 mov 0x28(%rbx),%rax
3d: 48 89 f9 mov %rdi,%rcx
---
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 syzkaller@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] Test patch
2023-11-25 14:24 [syzbot] [bfs?] general protection fault in bfs_get_block (2) syzbot
@ 2023-11-26 23:24 ` syzbot
0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2023-11-26 23:24 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Test patch
Author: yuran.pereira@hotmail.com
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
fs/bfs/file.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/bfs/file.c b/fs/bfs/file.c
index adc2230079c6..8a97909b1484 100644
--- a/fs/bfs/file.c
+++ b/fs/bfs/file.c
@@ -38,7 +38,12 @@ static int bfs_move_block(unsigned long from, unsigned long to,
bh = sb_bread(sb, from);
if (!bh)
return -EIO;
+
new = sb_getblk(sb, to);
+ if (!new) {
+ bforget(bh);
+ return -ENOMEM;
+ }
memcpy(new->b_data, bh->b_data, bh->b_size);
mark_buffer_dirty(new);
bforget(bh);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-12-25 23:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-24 6:38 [syzbot] [input?] KASAN: null-ptr-deref Write in input_ff_create syzbot
2024-12-25 0:36 ` [syzbot] test patch input_ff_create syzbot
2024-12-25 15:47 ` [syzbot] test null ptr deref patch syzbot
2024-12-25 16:39 ` [syzbot] test patch syzbot
2024-12-25 16:44 ` [syzbot] syzbot
2024-12-25 23:31 ` [syzbot] final patch test syzbot
-- strict thread matches above, loose matches on Subject: below --
2023-11-25 14:24 [syzbot] [bfs?] general protection fault in bfs_get_block (2) syzbot
2023-11-26 23:24 ` [syzbot] Test patch syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox