From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, Guo Xuenan <[email protected]>
Cc: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Subject: Re: linux-stable-5.10-y CVE-2022-1508 of io_uring module
Date: Sun, 8 May 2022 12:43:26 +0100 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 5/7/22 15:18, Jens Axboe wrote:
> On 5/7/22 3:16 AM, Pavel Begunkov wrote:
>> On 5/6/22 19:22, Jens Axboe wrote:
>>> On 5/6/22 10:15 AM, Jens Axboe wrote:
>>>> On 5/6/22 9:57 AM, Pavel Begunkov wrote:
>>>>> On 5/6/22 03:16, Jens Axboe wrote:
>>>>>> On 5/5/22 8:11 AM, Guo Xuenan wrote:
>>>>>>> Hi, Pavel & Jens
>>>>>>>
>>>>>>> CVE-2022-1508[1] contains an patch[2] of io_uring. As Jones reported,
>>>>>>> it is not enough only apply [2] to stable-5.10.
>>>>>>> Io_uring is very valuable and active module of linux kernel.
>>>>>>> I've tried to apply these two patches[3] [4] to my local 5.10 code, I
>>>>>>> found my understanding of io_uring is not enough to resolve all conflicts.
>>>>>>>
>>>>>>> Since 5.10 is an important stable branch of linux, we would appreciate
>>>>>>> your help in solving this problem.
>>>>>>
>>>>>> Yes, this really needs to get buttoned up for 5.10. I seem to recall
>>>>>> there was a reproducer for this that was somewhat saner than the
>>>>>> syzbot one (which doesn't do anything for me). Pavel, do you have one?
>>>>>
>>>>> No, it was the only repro and was triggering the problem
>>>>> just fine back then
>>>>
>>>> I modified it a bit and I can now trigger it.
>>>
>>> Pavel, why don't we just keep it really simple and just always save the
>>> iter state in read/write, and use the restore instead of the revert?
>>
>> The problem here is where we're doing revert. If it's done deep in
>> the stack and then while unwinding someone decides to revert it again,
>> e.g. blkdev_read_iter(), we're screwed.
>>
>> The last attempt was backporting 20+ patches that would move revert
>> into io_read/io_write, i.e. REQ_F_REISSUE, back that failed some of
>> your tests back then. (was it read retry tests iirc?)
>
> Do you still have that series? Yes, if I recall correctly, the series
Yep, still in the repo:
https://github.com/isilence/linux/tree/5.10_revert
> had an issue with the resubmit. Which might just be minor, I don't
> believe we really took a closer look at that.
>
> Let's resurrect that series and see if we can pull it to completion,
> would be nice to finally close the chapter on this issue for 5.10...
We can try, but I'm not too comfortable with those backports, I had
to considerably rewrite last three patches or so. Another option
is to disable retries from the rw callback if the iter has been
truncated.
--
Pavel Begunkov
next prev parent reply other threads:[~2022-05-08 11:44 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
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 [this message]
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 \
[email protected] \
[email protected] \
[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