All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dickson Wu" <dickson.wu@certik.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH 6.18.y] serial: core: fix NULL pointer dereference in serial_core_unregister_port()
Date: Sat, 05 Dec 2026 14:05:39 +0000	[thread overview]
Message-ID: <sashiko-outbox-251616@kernel.org> (raw)
In-Reply-To: <20261205-serial-618-v1-1-ed1f370c3295@certik.com>

> From: Ruslan Valiyev <linuxoid@gmail.com>
> 
> commit 499485a67fbacf4d9afbdb43522388c64f853428 upstream.
> 
> port->port_dev is NULL when no port device is installed: it is cleared
> on teardown, and never set if registration failed before
> serial_core_port_device_add().  serial_core_unregister_port() passes it
> straight to serial_core_get_ctrl_dev(), which dereferences it:
> 
>   KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047]
>   RIP: serial_core_unregister_port
>   Call Trace:
>    serial8250_unregister_port
>    serial8250_remove
>    unbind_store
> [ ... ]
> Reviewed-by: Tony Lindgren <tony.lindgren@linux.intel.com>
> Link: https://patch.msgid.link/20260826084654.1392851-1-linuxoid@gmail.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> [ adapted to 6.18.y: release the explicit port_mutex on early return ]
> Signed-off-by: Dickson Wu <dickson.wu@certik.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-serial-618-v1-1-ed1f370c3295@certik.com?part=1

      reply	other threads:[~2026-12-05 14:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 10:15 FAILED: patch "[PATCH] serial: core: fix NULL pointer dereference in" failed to apply to 6.18-stable tree gregkh
2026-12-05 13:55 ` [PATCH 6.18.y] serial: core: fix NULL pointer dereference in serial_core_unregister_port() Dickson Wu
2026-12-05 13:55   ` Dickson Wu via B4 Relay
2026-12-05 14:05   ` 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-251616@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dickson.wu@certik.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.