From: David Howells <dhowells@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: dhowells@redhat.com, Dmitry Antipov <dmantipov@yandex.ru>,
Jeff Layton <jlayton@kernel.org>,
Christian Brauner <brauner@kernel.org>,
netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
lvc-project@linuxtesting.org,
syzbot+404b4b745080b6210c6c@syzkaller.appspotmail.com
Subject: syzbot program that crashes netfslib can also crash fuse
Date: Wed, 04 Dec 2024 09:56:39 +0000 [thread overview]
Message-ID: <1100513.1733306199@warthog.procyon.org.uk> (raw)
In-Reply-To: <20241202093943.227786-1-dmantipov@yandex.ru>
Interesting... The test program also causes fuse to oops (see attached) over
without even getting to netfslib. The BUG is in iov_iter_revert():
if (iov_iter_is_xarray(i) || iter_is_ubuf(i)) {
BUG(); /* We should never go beyond the start of the specified
* range since we might then be straying into pages that
* aren't pinned.
*/
I was trying the C reproducer from here:
https://syzkaller.appspot.com/bug?extid=404b4b745080b6210c6c
David
---
FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 0, space 0, times 1
CPU: 3 UID: 0 PID: 5926 Comm: repro-12bc200f9 Not tainted 6.13.0-rc1-build3+ #5189
Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014
Call Trace:
<TASK>
dump_stack_lvl+0x47/0x70
should_fail_ex+0x12e/0x160
should_failslab+0x50/0x60
__kmalloc_noprof+0x9f/0x290
? fuse_get_user_pages+0xad/0x290
? kmem_cache_debug_flags+0xc/0x20
fuse_get_user_pages+0xad/0x290
? fuse_folios_alloc+0x13/0x30
fuse_direct_io+0x220/0x460
fuse_direct_write_iter+0x10f/0x180
vfs_write+0x142/0x1e0
? __pfx_fuse_file_write_iter+0x10/0x10
ksys_write+0x6d/0xc0
do_syscall_64+0x80/0xe0
entry_SYSCALL_64_after_hwframe+0x71/0x79
RIP: 0033:0x7fdd71f0f85d
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 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 8b 0d a3 45 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007fdd71df7e68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fdd71df8cdc RCX: 00007fdd71f0f85d
RDX: 000000000000000f RSI: 0000000020000280 RDI: 0000000000000005
RBP: 00007fdd71df7e90 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fdd71df86c0
R13: ffffffffffffff88 R14: 0000000000000002 R15: 00007fffe6090bd0
</TASK>
------------[ cut here ]------------
kernel BUG at lib/iov_iter.c:626!
Oops: invalid opcode: 0000 [#1] SMP PTI
CPU: 3 UID: 0 PID: 5926 Comm: repro-12bc200f9 Not tainted 6.13.0-rc1-build3+ #5189
Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014
RIP: 0010:iov_iter_revert+0x4c/0xf0
Code: 80 f9 06 0f 84 bf 00 00 00 48 8b 47 08 48 39 f0 72 0c 48 29 f0 48 89 47 08 c3 cc cc cc cc 48 29 c6 80 f9 05 74 04 84 c9 75 02 <0f> 0b 80 f9 02 48 8b 47 10 75 15 8b 48 f8 48 83 e8 10 48 ff 42 20
RSP: 0018:ffff88811f16fd00 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff888107504900 RCX: 0000000000001600
RDX: ffff88811f16fe60 RSI: 000000000000000f RDI: ffff88811f16fe60
RBP: 0000000000000000 R08: ffff88840fb9fa40 R09: ffff88840fb9fa60
R10: 0000000000000006 R11: 0000000000000020 R12: ffff88810b481400
R13: 00000000fffffff4 R14: ffff88811ce26cc0 R15: ffff88811f16fdb8
FS: 00007fdd71df86c0(0000) GS:ffff88840fb80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560d9a217710 CR3: 000000010760e003 CR4: 00000000001706f0
Call Trace:
<TASK>
? __die_body+0x1a/0x60
? die+0x30/0x50
? do_trap+0x7a/0x100
? iov_iter_revert+0x4c/0xf0
? iov_iter_revert+0x4c/0xf0
? do_error_trap+0x6e/0xa0
? iov_iter_revert+0x4c/0xf0
? exc_invalid_op+0x49/0x60
? iov_iter_revert+0x4c/0xf0
? asm_exc_invalid_op+0x16/0x20
? iov_iter_revert+0x4c/0xf0
fuse_direct_io+0x398/0x460
fuse_direct_write_iter+0x10f/0x180
vfs_write+0x142/0x1e0
? __pfx_fuse_file_write_iter+0x10/0x10
ksys_write+0x6d/0xc0
do_syscall_64+0x80/0xe0
entry_SYSCALL_64_after_hwframe+0x71/0x79
next prev parent reply other threads:[~2024-12-04 9:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 9:39 [PATCH v2] netfs: fix kernel BUG in iov_iter_revert() Dmitry Antipov
2024-12-04 9:56 ` David Howells [this message]
2024-12-04 12:41 ` syzbot program that crashes netfslib can also crash fuse Miklos Szeredi
2024-12-04 13:13 ` Dmitry Antipov
2024-12-04 13:41 ` David Howells
2024-12-06 12:41 ` Bernd Schubert
2024-12-13 16:13 ` Miklos Szeredi
2024-12-04 14:03 ` [PATCH v2] netfs: fix kernel BUG in iov_iter_revert() David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1100513.1733306199@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=brauner@kernel.org \
--cc=dmantipov@yandex.ru \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=miklos@szeredi.hu \
--cc=netfs@lists.linux.dev \
--cc=syzbot+404b4b745080b6210c6c@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox