From: sashiko-bot@kernel.org
To: "Ciprian Regus via B4 Relay"
<devnull+ciprian.regus.analog.com@kernel.org>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH net-next v4 05/13] net: ethernet: oa_tc6: Export standard defined registers
Date: Wed, 10 Jun 2026 15:28:24 +0000 [thread overview]
Message-ID: <20260610152825.299231F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260609-adin1140-driver-v4-5-0753e28ee004@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing bounds check before extending the receive SKB allows a malformed or corrupted hardware response to crash the kernel via `skb_over_panic()` or NULL pointer dereference.
--
commit 0ab8a76f7ac8aad2293bc78260fe46bae8c49cec
Author: Ciprian Regus <ciprian.regus@analog.com>
net: ethernet: oa_tc6: Export standard defined registers
This commit moves standard Open Alliance TC6 register addresses and subfields
into the public oa_tc6 header so other ethernet drivers can use them directly.
> diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c
> index b37e398e30e37..97df38207827d 100644
> --- a/drivers/net/ethernet/oa_tc6.c
> +++ b/drivers/net/ethernet/oa_tc6.c
[Severity: High]
This is a pre-existing issue, but while reviewing the changes in this file,
I noticed a potential issue with SKB bounds checking in the receive path.
In oa_tc6_update_rx_skb(), the code unconditionally extends the SKB tail:
static void oa_tc6_update_rx_skb(struct oa_tc6 *tc6, u8 *payload, u8 length)
{
memcpy(skb_put(tc6->rx_skb, length), payload, length);
}
This is called repeatedly for continuous chunks lacking an end_valid
marker via oa_tc6_prcs_ongoing_rx_frame().
If the MAC-PHY misbehaves or the SPI data is corrupted such that the
end_valid bit is missing for consecutive chunks exceeding the MTU size,
will this continuously append data to the SKB and eventually exhaust the
tailroom, triggering skb_over_panic()?
Additionally, if an ongoing chunk is received before a start chunk
(e.g., start_valid=0), could tc6->rx_skb be NULL here, leading to an
immediate NULL pointer dereference in skb_put()?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260609-adin1140-driver-v4-0-0753e28ee004@analog.com?part=5
next prev parent reply other threads:[~2026-06-10 15:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 15:27 [PATCH net-next v4 00/13] net: Add ADIN1140 support Ciprian Regus via B4 Relay
2026-06-09 15:28 ` [PATCH net-next v4 01/13] dt-bindings: net: Add ADIN1140 Ciprian Regus via B4 Relay
2026-06-09 15:28 ` [PATCH net-next v4 02/13] net: ethernet: oa_tc6: Handle the OA TC6 SPI protected mode Ciprian Regus via B4 Relay
2026-06-10 15:28 ` sashiko-bot
2026-06-09 15:28 ` [PATCH net-next v4 03/13] net: ethernet: oa_tc6: add OA_TC6_BROKEN_PHY quirk flag Ciprian Regus via B4 Relay
2026-06-10 15:28 ` sashiko-bot
2026-06-09 15:28 ` [PATCH net-next v4 04/13] net: ethernet: oa_tc6: Export the C45 access functions Ciprian Regus via B4 Relay
2026-06-10 15:28 ` sashiko-bot
2026-06-09 15:28 ` [PATCH net-next v4 05/13] net: ethernet: oa_tc6: Export standard defined registers Ciprian Regus via B4 Relay
2026-06-10 15:28 ` sashiko-bot [this message]
2026-06-09 15:28 ` [PATCH net-next v4 06/13] net: ethernet: oa_tc6: Add the OA_TC6_ prefix to standard registers Ciprian Regus via B4 Relay
2026-06-10 15:28 ` sashiko-bot
2026-06-09 15:28 ` [PATCH net-next v4 07/13] net: ethernet: oa_tc6: Add read_mms/write_mms register access functions Ciprian Regus via B4 Relay
2026-06-09 15:28 ` [PATCH net-next v4 08/13] net: ethernet: oa_tc6: Use the read_mms/write_mms functions for C45 Ciprian Regus via B4 Relay
2026-06-10 15:28 ` sashiko-bot
2026-06-09 15:28 ` [PATCH net-next v4 09/13] net: ethernet: oa_tc6: Add new register address defines Ciprian Regus via B4 Relay
2026-06-09 15:28 ` [PATCH net-next v4 10/13] net: phy: add generic helpers for direct C45 MMD access Ciprian Regus via B4 Relay
2026-06-09 15:28 ` [PATCH net-next v4 11/13] net: phy: microchip-t1s: use generic C45 MMD access helpers Ciprian Regus via B4 Relay
2026-06-09 15:28 ` [PATCH net-next v4 12/13] net: phy: Add support for the ADIN1140 PHY Ciprian Regus via B4 Relay
2026-06-09 15:28 ` [PATCH net-next v4 13/13] net: ethernet: adi: Add a driver for the ADIN1140 MACPHY Ciprian Regus via B4 Relay
2026-06-10 15:28 ` sashiko-bot
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=20260610152825.299231F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+ciprian.regus.analog.com@kernel.org \
--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