From: sashiko-bot@kernel.org
To: "Andreas Kemnade" <andreas@kemnade.info>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/omap: dsi: do not copy isr table
Date: Thu, 02 Jul 2026 15:40:19 +0000 [thread overview]
Message-ID: <20260702154020.0DC991F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260702-dsi-uaf-v2-1-dbb4aa0f0b8e@kemnade.info>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missed fix / Use-After-Free in fbdev omapfb driver
--
commit 84bfbe9de64eb5f62f575283f7f6c859c07c8287
Author: Andreas Kemnade <andreas@kemnade.info>
drm/omap: dsi: do not copy isr table
This commit stops copying the ISR table in the OMAP DSI interrupt handler
to prevent potential use-after-free vulnerabilities. By directly handling
ISRs with the original table, it avoids accessing stack-allocated objects
that might have been unregistered and destroyed.
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index 27fe7bca9e2cf..70cfb779d6ae5 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);
[Severity: High]
This is a pre-existing issue, but does the same vulnerability still exist
in the fbdev omapfb driver?
Looking at drivers/video/fbdev/omap2/omapfb/dss/dsi.c in omap_dsi_irq_handler(),
it still contains the copied table pattern:
/* make a copy and unlock, so that isrs can unregister
* themselves */
memcpy(&dsi->isr_tables_copy, &dsi->isr_tables,
sizeof(dsi->isr_tables));
spin_unlock(&dsi->irq_lock);
dsi_handle_isrs(&dsi->isr_tables_copy, irqstatus, vcstatus, ciostatus);
If a timed-out waiter unregisters its ISR and its on-stack completion object
is destroyed, could the interrupt handler still access it via the copied
isr_tables_copy table?
Should this fix be applied to the fbdev driver as well?
>
> 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);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260702-dsi-uaf-v2-1-dbb4aa0f0b8e@kemnade.info?part=1
prev parent reply other threads:[~2026-07-02 15:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 15:27 [PATCH v2] drm/omap: dsi: do not copy isr table Andreas Kemnade
2026-07-02 15:40 ` sashiko-bot [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=20260702154020.0DC991F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=andreas@kemnade.info \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.