From: Johan Hovold <johan@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Pengpeng Hou <pengpeng@iscas.ac.cn>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: serial: mxuport: validate firmware header size
Date: Mon, 20 Jul 2026 16:33:40 +0200 [thread overview]
Message-ID: <al4xxLVJlevgpACq@hovoldconsulting.com> (raw)
In-Reply-To: <7cd8b7b0-17bc-4470-ae92-0bf39904b7d1@lunn.ch>
On Wed, Jul 15, 2026 at 07:17:33PM +0200, Andrew Lunn wrote:
> On Wed, Jul 15, 2026 at 04:46:11PM +0800, Pengpeng Hou wrote:
> > mxuport_probe() reads version bytes at fixed offsets after
> > request_firmware() succeeds. Firmware loading success does not prove that
> > the blob contains the whole header.
> >
> > Reject blobs that do not reach the highest version byte before
> > dereferencing them.
> >
> > Fixes: ee467a1f2066 ("USB: serial: add Moxa UPORT 12XX/14XX/16XX driver")
>
> Does this bother people?
>
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
>
> I would suggest dropping the Fixes tag, unless you can point to
> reports of this crashing.
I'd say not validating input is still a bug even if it should not be
backported to stable.
Here we may end up leaking three bytes beyond the buffer to the logs,
but of course only root should be able to corrupt the fw file in the
first place.
So I'll add back the Fixes tag (without adding CC-stable) when applying
v2.
> > Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Thanks for reviewing.
Johan
prev parent reply other threads:[~2026-07-20 14:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 8:46 [PATCH] USB: serial: mxuport: validate firmware header size Pengpeng Hou
2026-07-15 17:17 ` Andrew Lunn
2026-07-20 14:33 ` Johan Hovold [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=al4xxLVJlevgpACq@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=andrew@lunn.ch \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pengpeng@iscas.ac.cn \
/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