All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Joas Antonio dos Santos" <joasantonio108@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: 8250: fix use-after-free of IRQ action name on port removal
Date: Tue, 03 Nov 2026 23:50:53 +0000	[thread overview]
Message-ID: <sashiko-outbox-196241@kernel.org> (raw)
In-Reply-To: <20261103-serial-8250-irq-uaf-v1-1-24223dcc3119@gmail.com>

> From: Joas Antonio dos Santos <joasantonio108@gmail.com>
> 
> serial_link_irq_chain() passes up->port.name directly to request_irq().
> The IRQ subsystem stores this pointer in irqaction->name without copying
> the string.
> 
> When the port that originally called request_irq() is removed while
> other ports still share the same IRQ:
> 
>   1. serial_unlink_irq_chain() removes the port from the shared list
>   2. Since other ports remain, free_irq() is NOT called
>   3. irqaction->name still references the removed port's name string
>   4. serial_core_remove_one_port() frees uport->name (kfree at line 3292)
>   5. irqaction->name becomes a dangling pointer
> 
> [ ... ]
> Reported-by: syzbot+bc6b37960b1d13f68f9f@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=bc6b37960b1d13f68f9f
> Fixes: f7048b15900f ("tty: serial_core: Add name field to uart_port struct")
> Cc: stable@vger.kernel.org
> Signed-off-by: Joas Antonio dos Santos <joasantonio108@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103-serial-8250-irq-uaf-v1-1-24223dcc3119@gmail.com?part=1


      reply	other threads:[~2026-11-03 23:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 23:41 [PATCH] serial: 8250: fix use-after-free of IRQ action name on port removal Joas Antonio dos Santos
2026-11-03 23:41 ` Joas Antonio dos Santos via B4 Relay
2026-11-03 23:50 ` 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=sashiko-outbox-196241@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=joasantonio108@gmail.com \
    --cc=linux-serial@vger.kernel.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.