linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: KASAN: stack-out-of-bounds in iov_iter_revert
Date: Tue, 3 Aug 2021 08:47:06 +0100	[thread overview]
Message-ID: <CADVatmPPnAWyOmyqT3iggeO_hOuPpALF5hqAqbQkrdvCPB5UaQ@mail.gmail.com> (raw)
In-Reply-To: <8db71657-bd61-6b1f-035f-9a69221e7cb3@gmail.com>

On Mon, Aug 2, 2021 at 12:55 PM Pavel Begunkov <asml.silence@gmail.com> wrote:
>
> On 8/1/21 9:28 PM, Sudip Mukherjee wrote:
> > Hi Pavel,
> >
> > On Sun, Aug 1, 2021 at 9:52 AM Pavel Begunkov <asml.silence@gmail.com> wrote:
> >>
> >> On 8/1/21 1:10 AM, Pavel Begunkov wrote:
> >>> On 7/31/21 7:21 PM, Sudip Mukherjee wrote:
> >>>> Hi Jens, Pavel,
> >>>>
> >>>> We had been running syzkaller on v5.10.y and a "KASAN:
> >>>> stack-out-of-bounds in iov_iter_revert" was being reported on it. I
> >>>> got some time to check that today and have managed to get a syzkaller
> >>>> reproducer. I dont have a C reproducer which I can share but I can use
> >>>> the syz-reproducer to reproduce this with v5.14-rc3 and also with
> >>>> next-20210730.
> >>>
> >>> Can you try out the diff below? Not a full-fledged fix, but need to
> >>> check a hunch.
> >>>
> >>> If that's important, I was using this branch:
> >>> git://git.kernel.dk/linux-block io_uring-5.14
> >>
> >> Or better this one, just in case it ooopses on warnings.
> >
> > I tested this one on top of "git://git.kernel.dk/linux-block
> > io_uring-5.14" and the issue was still seen, but after the BUG trace I
> > got lots of "truncated wr" message. The trace is:
>
> That's interesting, thanks
> Can you share the syz reproducer?

Unfortunately I dont have a C reproducer, but this is the reproducer
for syzkaller:

r0 = syz_io_uring_setup(0x4d4f, &(0x7f0000000080)={0x0, 0x0, 0x1},
&(0x7f00000a0000)=nil, &(0x7f0000ffc000/0x1000)=nil,
&(0x7f0000000000)=<r1=>0x0, &(0x7f0000000140))
r2 = openat(0xffffffffffffff9c, &(0x7f0000000040)='./file0\x00', 0x46e2, 0x0)
syz_io_uring_setup(0x1, &(0x7f0000000080),
&(0x7f0000ffd000/0x2000)=nil, &(0x7f0000ffc000/0x2000)=nil,
&(0x7f0000000100), &(0x7f0000000140)=<r3=>0x0)
syz_io_uring_submit(r1, r3, &(0x7f0000000100)=@IORING_OP_WRITE={0x17,
0x0, 0x0, @fd=r2, 0x0, &(0x7f0000000200)="e2", 0xffffffffffffff98},
0x200)
io_uring_enter(r0, 0x58ab, 0x0, 0x0, 0x0, 0x0)


-- 
Regards
Sudip

  reply	other threads:[~2021-08-03  7:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31 18:21 Sudip Mukherjee
2021-08-01  0:10 ` Pavel Begunkov
2021-08-01  8:52   ` Pavel Begunkov
2021-08-01 20:28     ` Sudip Mukherjee
2021-08-02 11:55       ` Pavel Begunkov
2021-08-03  7:47         ` Sudip Mukherjee [this message]
2021-08-03 10:34           ` Pavel Begunkov
2021-08-03 13:18             ` Pavel Begunkov
2021-08-03 14:56             ` Sudip Mukherjee

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=CADVatmPPnAWyOmyqT3iggeO_hOuPpALF5hqAqbQkrdvCPB5UaQ@mail.gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: KASAN: stack-out-of-bounds in iov_iter_revert' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).