From: Jens Axboe <axboe@kernel.dk>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Cc: Pavel Begunkov <asml.silence@gmail.com>,
io-uring@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] io_uring: Fix NULL dereference in error in io_sqe_files_register()
Date: Mon, 1 Feb 2021 11:57:16 -0700 [thread overview]
Message-ID: <76165fad-a61a-a59c-6b6f-d8ae151bed86@kernel.dk> (raw)
In-Reply-To: <YBfyzmcP1N6jpDjo@mwanda>
On 2/1/21 5:23 AM, Dan Carpenter wrote:
> If we hit a "goto out_free;" before the "ctx->file_data" pointer has
> been assigned then it leads to a NULL derefence when we call:
>
> free_fixed_rsrc_data(ctx->file_data);
>
> We can fix this by moving the assignment earlier.
Applied, thanks Dan.
--
Jens Axboe
prev parent reply other threads:[~2021-02-01 18:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 12:23 [PATCH] io_uring: Fix NULL dereference in error in io_sqe_files_register() Dan Carpenter
2021-02-01 18:34 ` Pavel Begunkov
2021-02-01 18:57 ` Jens Axboe [this message]
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=76165fad-a61a-a59c-6b6f-d8ae151bed86@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=bijan.mottahedeh@oracle.com \
--cc=dan.carpenter@oracle.com \
--cc=io-uring@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
/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