public inbox for [email protected]
 help / color / mirror / Atom feed
From: syzbot <[email protected]>
To: [email protected], [email protected],
	[email protected], [email protected],
	[email protected]
Subject: [syzbot] KASAN: null-ptr-deref Write in io_file_get_normal
Date: Thu, 31 Mar 2022 09:52:21 -0700	[thread overview]
Message-ID: <[email protected]> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    fdcbcd1348f4 Add linux-next specific files for 20220331
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1146e5fd700000
kernel config:  https://syzkaller.appspot.com/x/.config?x=366ab475940a4177
dashboard link: https://syzkaller.appspot.com/bug?extid=c4b9303500a21750b250
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1434c99b700000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1623e2f7700000

The issue was bisected to:

commit c686f7a5cbe2eff3c9b41f225fb7cf9e163cde5c
Author: Jens Axboe <[email protected]>
Date:   Tue Mar 29 16:59:20 2022 +0000

    io_uring: defer splice/tee file validity check until command issue

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=12b0199b700000
final oops:     https://syzkaller.appspot.com/x/report.txt?x=11b0199b700000
console output: https://syzkaller.appspot.com/x/log.txt?x=16b0199b700000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]
Fixes: c686f7a5cbe2 ("io_uring: defer splice/tee file validity check until command issue")

==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: null-ptr-deref in atomic_inc include/linux/atomic/atomic-instrumented.h:190 [inline]
BUG: KASAN: null-ptr-deref in io_req_track_inflight fs/io_uring.c:1648 [inline]
BUG: KASAN: null-ptr-deref in io_file_get_normal+0x33e/0x380 fs/io_uring.c:7518
Write of size 4 at addr 0000000000000118 by task iou-wrk-3588/3589

CPU: 1 PID: 3589 Comm: iou-wrk-3588 Not tainted 5.17.0-next-20220331-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_report mm/kasan/report.c:432 [inline]
 kasan_report.cold+0x61/0x1c6 mm/kasan/report.c:491
 check_region_inline mm/kasan/generic.c:183 [inline]
 kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189
 instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
 atomic_inc include/linux/atomic/atomic-instrumented.h:190 [inline]
 io_req_track_inflight fs/io_uring.c:1648 [inline]
 io_file_get_normal+0x33e/0x380 fs/io_uring.c:7518
 io_file_get fs/io_uring.c:7528 [inline]
 io_tee fs/io_uring.c:4401 [inline]
 io_issue_sqe+0x45f5/0x8f40 fs/io_uring.c:7354
 io_wq_submit_work+0x2b6/0x770 fs/io_uring.c:7444
 io_worker_handle_work+0xb1c/0x1ab0 fs/io-wq.c:597
 io_wqe_worker+0x637/0xdb0 fs/io-wq.c:644
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
==================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 3589 Comm: iou-wrk-3588 Not tainted 5.17.0-next-20220331-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 panic+0x2d7/0x636 kernel/panic.c:274
 end_report.part.0+0x3f/0x7c mm/kasan/report.c:168
 end_report include/trace/events/error_report.h:69 [inline]
 kasan_report.cold+0x93/0x1c6 mm/kasan/report.c:493
 check_region_inline mm/kasan/generic.c:183 [inline]
 kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189
 instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
 atomic_inc include/linux/atomic/atomic-instrumented.h:190 [inline]
 io_req_track_inflight fs/io_uring.c:1648 [inline]
 io_file_get_normal+0x33e/0x380 fs/io_uring.c:7518
 io_file_get fs/io_uring.c:7528 [inline]
 io_tee fs/io_uring.c:4401 [inline]
 io_issue_sqe+0x45f5/0x8f40 fs/io_uring.c:7354
 io_wq_submit_work+0x2b6/0x770 fs/io_uring.c:7444
 io_worker_handle_work+0xb1c/0x1ab0 fs/io-wq.c:597
 io_wqe_worker+0x637/0xdb0 fs/io-wq.c:644
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
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 [email protected].

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
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

             reply	other threads:[~2022-03-31 16:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 16:52 syzbot [this message]
2022-03-31 18:51 ` [syzbot] KASAN: null-ptr-deref Write in io_file_get_normal Jens Axboe
2022-03-31 19:06   ` syzbot

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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