From: Joas Antonio dos Santos via B4 Relay <devnull+joasantonio108.gmail.com@kernel.org>
To: mkl@pengutronix.de, mailhol@kernel.org, frank.jungclaus@esd.eu,
socketcan@esd.eu, joasantonio108@gmail.com
Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: [PATCH 0/2] can: esd_usb: validate data received from the device
Date: Tue, 10 Nov 2026 03:56:27 +0000 [thread overview]
Message-ID: <20261110-esd-usb-validate-v1-0-7ee499b4926d@gmail.com> (raw)
Two fixes for values that esd_usb takes from the USB device without
checking them.
Patch 1 limits the number of nets reported in the version reply to
ESD_USB_MAX_NETS. Marc Kleine-Budde asked for this clamp during the
review of the esd_usb cleanup series in August 2025; as far as I can
tell it never landed.
Patch 2 validates the message length in the rx path, so that a zero
length cannot stall the URB completion handler and a message is not
handled before checking that it fits in the received data.
These issues were found with the help of an LLM-based code review tool
(Claude). I checked the code paths by hand against v7.4-rc3 and
reviewed the fixes myself. They are build-tested only (W=1, arm64); I
do not have the hardware to test them at runtime.
---
Joas Antonio dos Santos (2):
can: esd_usb: limit the number of nets reported by the device
can: esd_usb: validate the message length in the rx path
drivers/net/can/usb/esd_usb.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
---
base-commit: b3dfbde62cf1981c4638939c159dfd087b7a72e9
change-id: 20261110-esd-usb-validate-14264b90e5bb
Best regards,
--
Joas Antonio dos Santos <joasantonio108@gmail.com>
next reply other threads:[~2026-11-10 3:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 3:56 Joas Antonio dos Santos via B4 Relay [this message]
2026-11-10 3:56 ` [PATCH 1/2] can: esd_usb: limit the number of nets reported by " Joas Antonio dos Santos via B4 Relay
2026-11-10 3:56 ` [PATCH 2/2] can: esd_usb: validate the message length in the rx path Joas Antonio dos Santos via B4 Relay
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=20261110-esd-usb-validate-v1-0-7ee499b4926d@gmail.com \
--to=devnull+joasantonio108.gmail.com@kernel.org \
--cc=frank.jungclaus@esd.eu \
--cc=joasantonio108@gmail.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@esd.eu \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®