From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Nick Dyer <nick@shmanahar.org>,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
Christopher Heiny <cheiny@synaptics.com>,
linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] Input: synaptics-rmi4 - fix use after free in rmi_unregister_function()
Date: Sun, 29 Oct 2023 02:54:01 +0000 [thread overview]
Message-ID: <ZT3JSaeOOHYZpKb8@google.com> (raw)
In-Reply-To: <706efd36-7561-42f3-adfa-dd1d0bd4f5a1@moroto.mountain>
On Fri, Oct 27, 2023 at 03:18:28PM +0300, Dan Carpenter wrote:
> The put_device() calls rmi_release_function() which frees "fn" so the
> dereference on the next line "fn->num_of_irqs" is a use after free.
> Move the put_device() to the end to fix this.
>
> Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Applied, thank you.
--
Dmitry
prev parent reply other threads:[~2023-10-29 2:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 12:18 [PATCH] Input: synaptics-rmi4 - fix use after free in rmi_unregister_function() Dan Carpenter
2023-10-29 2:54 ` Dmitry Torokhov [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=ZT3JSaeOOHYZpKb8@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=cheiny@synaptics.com \
--cc=dan.carpenter@linaro.org \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=nick@shmanahar.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;
as well as URLs for NNTP newsgroup(s).