From: Andreas Kemnade <andreas@kemnade.info>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: Re: [PATCH v2] drm/omap: dsi: do not copy isr table
Date: Tue, 28 Jul 2026 20:43:21 +0200 [thread overview]
Message-ID: <amj4SaekGK6yfmM8@akepd> (raw)
In-Reply-To: <20260702-dsi-uaf-v2-1-dbb4aa0f0b8e@kemnade.info>
On Thu, Jul 02, 2026 at 05:27:11PM +0200, Andreas Kemnade wrote:
> To te able to unregister stuff from isrs, the corresponding table was
> copied. Nobody seems to unregister stuff that way, so it does not help.
> But there are stack-allocated objects passed to these isrs giving chances
> of UAF of these objects if irqs are unregistered while they are handled,
> so better do not copy that table.
>
> Fixes: 4ae2ddddf44cd ("OMAP: DSS2: DSI: Add ISR support")
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
a friendly ping... the corresponding fix in the old fb code already was
accepted.
Regards,
Andreas
> ---
> If this gets backported, it should be re-checked that
> no isr unregisters itself in older kernel versions`.
> ---
> Changes in v2:
> - remove variable definition (Sashiko)
> - Link to v1: https://patch.msgid.link/20260629-dsi-uaf-v1-1-a5e894f4e4d1@kemnade.info
>
> To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> To: Maxime Ripard <mripard@kernel.org>
> To: Thomas Zimmermann <tzimmermann@suse.de>
> To: David Airlie <airlied@gmail.com>
> To: Simona Vetter <simona@ffwll.ch>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/gpu/drm/omapdrm/dss/dsi.c | 7 +------
> drivers/gpu/drm/omapdrm/dss/dsi.h | 2 --
> 2 files changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index 27fe7bca9e2c..70cfb779d6ae 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -455,15 +455,10 @@ static irqreturn_t omap_dsi_irq_handler(int irq, void *arg)
> timer_delete(&dsi->te_timer);
> #endif
>
> - /* make a copy and unlock, so that isrs can unregister
> - * themselves */
> - memcpy(&dsi->isr_tables_copy, &dsi->isr_tables,
> - sizeof(dsi->isr_tables));
> + dsi_handle_isrs(&dsi->isr_tables, irqstatus, vcstatus, ciostatus);
>
> spin_unlock(&dsi->irq_lock);
>
> - dsi_handle_isrs(&dsi->isr_tables_copy, irqstatus, vcstatus, ciostatus);
> -
> dsi_handle_irq_errors(dsi, irqstatus, vcstatus, ciostatus);
>
> dsi_collect_irq_stats(dsi, irqstatus, vcstatus, ciostatus);
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.h b/drivers/gpu/drm/omapdrm/dss/dsi.h
> index 601707c0ecc4..2b25247ea893 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.h
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.h
> @@ -379,8 +379,6 @@ struct dsi_data {
>
> spinlock_t irq_lock;
> struct dsi_isr_tables isr_tables;
> - /* space for a copy used by the interrupt handler */
> - struct dsi_isr_tables isr_tables_copy;
>
> int update_vc;
> #ifdef DSI_PERF_MEASURE
>
> ---
> base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
> change-id: 20260629-dsi-uaf-71bfbf3553bf
>
> Best regards,
> --
> Andreas Kemnade <andreas@kemnade.info>
>
>
next prev parent reply other threads:[~2026-07-29 6:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 15:27 Andreas Kemnade
2026-07-28 18:43 ` Andreas Kemnade [this message]
2026-07-29 8:23 ` Tomi Valkeinen
2026-08-04 8:49 ` Andreas Kemnade
2026-08-04 11:08 ` Tomi Valkeinen
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=amj4SaekGK6yfmM8@akepd \
--to=andreas@kemnade.info \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tomi.valkeinen@ti.com \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®