fs/io_uring.c: Fix uninitialized variable is referenced in io_submit_sqe
Subsystems (3)
PATCH 1/1 fs/io_uring.c: Fix uninitialized variable is referenced in io_submit_sqe
the commit <a4d61e66ee4a> ("<io_uring: prevent re-read of sqe->opcode>") caused another vulnerability. After io_get_req(), the sqe_submit struct in req is not initialized, but the following code defaults that req->submit.opcode is available.
--- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+)
fs/io_uring.c +1 -0
@@ -2559,6 +2559,7 @@ static void io_submit_sqe(struct io_ring_ctx *ctx, struct sqe_submit *s, goto err; } +memcpy (&req->submit, s,sizeof (*s)); ret =io_req_set_file (ctx, s, state, req);if (unlikely (ret)) { err_req:
Signature · 1 line
2.17.1
Jens Axboe
maintainerQuoted 4 lines · Liu Yong
the commit <
a4d61e66ee4a> ("<io_uring: prevent re-read ofsqe->opcode>") caused another vulnerability. Afterio_get_req(), thesqe_submitstruct in req is not initialized, but the following code defaults thatreq->submit.opcodeis available.
Thanks, I'll add this for 5.4-stable, it doesn't affect any kernels newer than that.
Signature · 1 line
Jens Axboe
Jens Axboe
maintainerPATCH 1/1 fs/io_uring.c: Fix uninitialized variable is referenced in io_submit_sqe
In reply to Liu YongHi,
Can you queue this up for 5.4 as well? Thanks!
-------- Forwarded Message --------
Subject: [PATCH] fs/io_uring.c: Fix uninitialized variable is referenced in io_submit_sqe
Date: Wed, 12 Aug 2020 23:56:44 -0700
From: Liu Yong <[email protected]>
To: Jens Axboe <[email protected]>
CC: [email protected], [email protected], [email protected]
the commit <a4d61e66ee4a> ("<io_uring: prevent re-read of sqe->opcode>") caused another vulnerability. After io_get_req(), the sqe_submit struct in req is not initialized, but the following code defaults that req->submit.opcode is available.
--- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+)
fs/io_uring.c +1 -0
@@ -2559,6 +2559,7 @@ static void io_submit_sqe(struct io_ring_ctx *ctx, struct sqe_submit *s, goto err; } +memcpy (&req->submit, s,sizeof (*s)); ret =io_req_set_file (ctx, s, state, req);if (unlikely (ret)) { err_req:
Signature · 1 line
2.17.1
Quoted 3 lines · Jens Axboe
Hi,
Can you queue this up for 5.4 as well? Thanks!
Queued up, thanks!
Signature · 2 lines
Thanks, Sasha