From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Mathias Krause <minipli@grsecurity.net>
Cc: Torsten Hilbrich <torsten.hilbrich@secunet.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Nick Dyer <nick@shmanahar.org>,
Brad Spengler <spender@grsecurity.net>,
Sasha Levin <sashal@kernel.org>,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal
Date: Thu, 7 Mar 2024 16:20:15 -0800 [thread overview]
Message-ID: <ZepZv98s4cHR24E1@google.com> (raw)
In-Reply-To: <20240222142654.856566-1-minipli@grsecurity.net>
On Thu, Feb 22, 2024 at 03:26:54PM +0100, Mathias Krause wrote:
> Calling irq_domain_remove() will lead to freeing the IRQ domain
> prematurely. The domain is still referenced and will be attempted to get
> used via rmi_free_function_list() -> rmi_unregister_function() ->
> irq_dispose_mapping() -> irq_get_irq_data()'s ->domain pointer.
>
> With PaX's MEMORY_SANITIZE this will lead to an access fault when
> attempting to dereference embedded pointers, as in Torsten's report that
> was faulting on the 'domain->ops->unmap' test.
>
> Fix this by releasing the IRQ domain only after all related IRQs have
> been deactivated.
>
> Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain")
> Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
> Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Applied, thank you.
--
Dmitry
prev parent reply other threads:[~2024-03-08 0:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 14:26 [PATCH] Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal Mathias Krause
2024-03-08 0:20 ` 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=ZepZv98s4cHR24E1@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minipli@grsecurity.net \
--cc=nick@shmanahar.org \
--cc=sashal@kernel.org \
--cc=spender@grsecurity.net \
--cc=torsten.hilbrich@secunet.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.