lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <350f59fb-4413-c95a-aade-300b356009d6@oracle.com>
Date:   Tue, 5 Nov 2019 10:08:17 -0800
From:   Bijan Mottahedeh <bijan.mottahedeh@...cle.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Cc:     stable@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH 5.3 143/163] io_uring: ensure we clear io_kiocb->result
 before each issue

On 11/4/2019 1:45 PM, Greg Kroah-Hartman wrote:
> From: Jens Axboe <axboe@...nel.dk>
>
> commit 6873e0bd6a9cb14ecfadd89d9ed9698ff1761902 upstream.
>
> We use io_kiocb->result == -EAGAIN as a way to know if we need to
> re-submit a polled request, as -EAGAIN reporting happens out-of-line
> for IO submission failures. This field is cleared when we originally
> allocate the request, but it isn't reset when we retry the submission
> from async context. This can cause issues where we think something
> needs a re-issue, but we're really just reading stale data.
>
> Reset ->result whenever we re-prep a request for polled submission.
>
> Cc: stable@...r.kernel.org
> Fixes: 9e645e1105ca ("io_uring: add support for sqe links")
> Reported-by: Bijan Mottahedeh <bijan.mottahedeh@...cle.com>
> Signed-off-by: Jens Axboe <axboe@...nel.dk>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>
> ---
>   fs/io_uring.c |    1 +
>   1 file changed, 1 insertion(+)
>
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -1078,6 +1078,7 @@ static int io_prep_rw(struct io_kiocb *r
>   
>   		kiocb->ki_flags |= IOCB_HIPRI;
>   		kiocb->ki_complete = io_complete_rw_iopoll;
> +		req->result = 0;
>   	} else {
>   		if (kiocb->ki_flags & IOCB_HIPRI)
>   			return -EINVAL;
>
>
Reviewd-by: Bijan Mottahedeh <bijan.mottahedeh@...cle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ