All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	syzbot <syzbot+9671693590ef5aad8953@syzkaller.appspotmail.com>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [syzbot] KASAN: stack-out-of-bounds Read in iov_iter_revert
Date: Tue, 22 Feb 2022 16:48:36 +0000	[thread overview]
Message-ID: <YhUT5I/64oaOjfDA@google.com> (raw)
In-Reply-To: <YbtxPB/ceMUVK7t7@google.com>

On Thu, 16 Dec 2021, Lee Jones wrote:

> On Wed, 15 Dec 2021, Pavel Begunkov wrote:
> 
> > On 12/15/21 08:06, Lee Jones wrote:
> > > On Tue, 09 Nov 2021, Lee Jones wrote:
> > > 
> > > > On Mon, 08 Nov 2021, Jens Axboe wrote:
> > > > > On 11/8/21 8:29 AM, Pavel Begunkov wrote:
> > > > > > On 11/3/21 17:01, Lee Jones wrote:
> > > > > > > Good afternoon Pavel,
> > > > > > > 
> > > > > > > > syzbot has tested the proposed patch and the reproducer did not trigger any issue:
> > > > > > > > 
> > > > > > > > Reported-and-tested-by: syzbot+9671693590ef5aad8953@syzkaller.appspotmail.com
> > > > > > > > 
> > > > > > > > Tested on:
> > > > > > > > 
> > > > > > > > commit:         bff2c168 io_uring: don't retry with truncated iter
> > > > > > > > git tree:       https://github.com/isilence/linux.git truncate
> > > > > > > > kernel config:  https://syzkaller.appspot.com/x/.config?x=730106bfb5bf8ace
> > > > > > > > dashboard link: https://syzkaller.appspot.com/bug?extid=9671693590ef5aad8953
> > > > > > > > compiler:       Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1
> > > > > > > > 
> > > > > > > > Note: testing is done by a robot and is best-effort only.
> > > > > > > 
> > > > > > > As you can see in the 'dashboard link' above this bug also affects
> > > > > > > android-5-10 which is currently based on v5.10.75.
> > > > > > > 
> > > > > > > I see that the back-port of this patch failed in v5.10.y:
> > > > > > > 
> > > > > > >     https://lore.kernel.org/stable/163152589512611@kroah.com/
> > > > > > > 
> > > > > > > And after solving the build-error by back-porting both:
> > > > > > > 
> > > > > > >     2112ff5ce0c11 iov_iter: track truncated size
> > > > > > >     89c2b3b749182 io_uring: reexpand under-reexpanded iters
> > > > > > > 
> > > > > > > I now see execution tripping the WARN() in iov_iter_revert():
> > > > > > > 
> > > > > > >     if (WARN_ON(unroll > MAX_RW_COUNT))
> > > > > > >         return
> > > > > > > 
> > > > > > > Am I missing any additional patches required to fix stable/v5.10.y?
> > > > > > 
> > > > > > Is it the same syz test? There was a couple more patches for
> > > > > > IORING_SETUP_IOPOLL, but strange if that's not the case.
> > > > > > 
> > > > > > 
> > > > > > fwiw, Jens decided to replace it with another mechanism shortly
> > > > > > after, so it may be a better idea to backport those. Jens,
> > > > > > what do you think?
> > > > > > 
> > > > > > 
> > > > > > commit 8fb0f47a9d7acf620d0fd97831b69da9bc5e22ed
> > > > > > Author: Jens Axboe <axboe@kernel.dk>
> > > > > > Date:   Fri Sep 10 11:18:36 2021 -0600
> > > > > > 
> > > > > >       iov_iter: add helper to save iov_iter state
> > > > > > 
> > > > > > commit cd65869512ab5668a5d16f789bc4da1319c435c4
> > > > > > Author: Jens Axboe <axboe@kernel.dk>
> > > > > > Date:   Fri Sep 10 11:19:14 2021 -0600
> > > > > > 
> > > > > >       io_uring: use iov_iter state save/restore helpers
> > > > > 
> > > > > Yes, I think backporting based on the save/restore setup is the
> > > > > sanest way by far.
> > > > 
> > > > Would you be kind enough to attempt to send these patches to Stable?
> > > > 
> > > > When I tried to back-port them, the second one gave me trouble.  And
> > > > without the in depth knowledge of the driver/subsystem that you guys
> > > > have, I found it almost impossible to resolve all of the conflicts:
> > > 
> > > Any movement on this chaps?
> > > 
> > > Not sure I am able to do this back-port without your help.
> > 
> > Apologies, slipped from my attention, we'll backport it,
> > and thanks for the reminder
> 
> Excellent.  Thanks Pavel.

Has this now been back-ported to Stable?

If so, would you be kind enough to provide the SHA1?

Thanks.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2022-02-22 16:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 13:43 [syzbot] KASAN: stack-out-of-bounds Read in iov_iter_revert syzbot
2021-08-12 14:30 ` Pavel Begunkov
2021-08-12 20:36   ` syzbot
2021-11-03 17:01     ` Lee Jones
2021-11-08 15:29       ` Pavel Begunkov
2021-11-08 15:41         ` Jens Axboe
2021-11-09 13:33           ` Lee Jones
2021-12-15  8:06             ` Lee Jones
2021-12-15 11:16               ` Pavel Begunkov
2021-12-16 17:02                 ` Lee Jones
2022-02-22 16:48                   ` Lee Jones [this message]
2022-03-21 10:52                 ` Lee Jones
2022-05-05 14:11           ` linux-stable-5.10-y CVE-2022-1508 of io_uring module Guo Xuenan
2022-05-06  2:16             ` Jens Axboe
2022-05-06 15:57               ` Pavel Begunkov
2022-05-06 16:15                 ` Jens Axboe
2022-05-06 18:22                   ` Jens Axboe
2022-05-07  9:16                     ` Pavel Begunkov
2022-05-07 14:18                       ` Jens Axboe
2022-05-08 11:43                         ` Pavel Begunkov
2021-08-23  0:24 ` [syzbot] KASAN: stack-out-of-bounds Read in iov_iter_revert Pavel Begunkov
2021-08-23  0:44   ` 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 \
    --in-reply-to=YhUT5I/64oaOjfDA@google.com \
    --to=lee.jones@linaro.org \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+9671693590ef5aad8953@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.