From: sashiko-bot@kernel.org
To: "Grégoire Layet" <gregoire.layet@9elements.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 7/7] ARM: dts: aspeed: g6: add aspeed,vuart-over-pci prop to vuart3 and 4
Date: Wed, 08 Jul 2026 15:49:09 +0000 [thread overview]
Message-ID: <20260708154910.0C82B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <39091b1d0c716da3502a691d0a0bdb7621693cf5.1783524645.git.gregoire.layet@9elements.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing 8250 port unregistration on probe error paths leads to Use-After-Free.
--
--- Patch [7]: [PATCH v4 7/7] ARM: dts: aspeed: g6: add aspeed,vuart-over-pci prop to vuart3 and 4 ---
commit ab6072ba3517ecf2daa88b15c7fd964dcebb0912
Author: Grégoire Layet <gregoire.layet@9elements.com>
ARM: dts: aspeed: g6: add aspeed,vuart-over-pci prop to vuart3 and 4
This commit adds the aspeed,vuart-over-pci property and a syscon phandle to
VUART 3 and 4 to indicate they are VUART over PCI.
> diff --git a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
> index 7c02633f2bd69..2b51749300f87 100644
> --- a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
> +++ b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
> @@ -722,7 +722,9 @@ vuart3: serial@1e787800 {
> reg-shift = <2>;
> interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&syscon ASPEED_CLK_APB2>;
> + syscon = <&syscon>;
> no-loopback-test;
> + aspeed,vuart-over-pci;
[Severity: High]
This is a pre-existing issue, but adding this property exposes a new
failure path in the driver that triggers a use-after-free.
If aspeed_ast2600_vuart_over_pci_set_enabled() fails during
aspeed_vuart_probe(), the code jumps to the err_sysfs_remove label:
drivers/tty/serial/8250/8250_aspeed_vuart.c:aspeed_vuart_probe() {
...
err_sysfs_remove:
sysfs_remove_group(&vuart->dev->kobj, &aspeed_vuart_attr_group);
return rc;
}
This error path returns without calling serial8250_unregister_port() or
timer_delete_sync(). Because the probe failed, the devm_ framework
automatically frees the vuart struct. However, the 8250 serial core still
has the port registered from an earlier call to
serial8250_register_8250_port(), resulting in a dangling pointer.
Could this allow a local user who opens the port to trigger a
use-after-free in aspeed_vuart_startup() when it dereferences vuart->port?
> status = "disabled";
> };
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1783524645.git.gregoire.layet@9elements.com?part=7
prev parent reply other threads:[~2026-07-08 15:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 15:35 [PATCH v4 0/7] soc: aspeed: Add BMC and host driver for PCIe BMC device Grégoire Layet
2026-07-08 15:35 ` [PATCH v4 1/7] dt-bindings: serial: 8250: aspeed: add compatible string for ast2600 Grégoire Layet
2026-07-08 16:38 ` Andrew Lunn
2026-07-09 8:50 ` Krzysztof Kozlowski
2026-07-09 14:21 ` Grégoire Layet
2026-07-08 15:35 ` [PATCH v4 2/7] dt-bindings: serial: 8250: aspeed: add aspeed,vuart-over-pci bool prop Grégoire Layet
2026-07-08 15:45 ` sashiko-bot
2026-07-09 8:54 ` Krzysztof Kozlowski
2026-07-08 15:35 ` [PATCH v4 3/7] serial: 8250_aspeed_vuart: add aspeed,ast2600-vuart compatible string Grégoire Layet
2026-07-08 15:49 ` sashiko-bot
2026-07-08 15:35 ` [PATCH v4 4/7] serial: 8250_aspeed_vuart: add VUART over PCI Grégoire Layet
2026-07-08 15:47 ` sashiko-bot
2026-07-08 16:46 ` Andrew Lunn
2026-07-09 5:18 ` Jiri Slaby
2026-07-09 5:17 ` Jiri Slaby
2026-07-08 15:35 ` [PATCH v4 5/7] soc: aspeed: add host-side PCIe BMC device driver Grégoire Layet
2026-07-08 15:48 ` sashiko-bot
2026-07-09 5:27 ` Jiri Slaby
2026-07-08 15:35 ` [PATCH v4 6/7] ARM: dts: aspeed: g6: Change vuart compatible string for ast2600 Grégoire Layet
2026-07-08 15:35 ` [PATCH v4 7/7] ARM: dts: aspeed: g6: add aspeed,vuart-over-pci prop to vuart3 and 4 Grégoire Layet
2026-07-08 15:49 ` 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=20260708154910.0C82B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregoire.layet@9elements.com \
--cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).