From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Johan Hovold <johan@kernel.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] USB: serial: mct_u232: fix missing interrupt-in transfer sanity check
Date: Wed, 20 May 2026 13:16:36 +0200 [thread overview]
Message-ID: <2026052027-boxing-strenuous-b014@gregkh> (raw)
In-Reply-To: <20260520101750.657933-1-johan@kernel.org>
On Wed, May 20, 2026 at 12:17:50PM +0200, Johan Hovold wrote:
> Add the missing sanity check on the size of interrupt-in transfers to
> avoid parsing stale or uninitialised slab data (and leaking it to user
> space).
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/usb/serial/mct_u232.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
> index ca1530da6e77..163161881d2d 100644
> --- a/drivers/usb/serial/mct_u232.c
> +++ b/drivers/usb/serial/mct_u232.c
> @@ -544,6 +544,11 @@ static void mct_u232_read_int_callback(struct urb *urb)
> goto exit;
> }
>
> + if (urb->actual_length < 2) {
> + dev_warn_ratelimited(&port->dev, "short interrupt-in packet\n");
> + goto exit;
> + }
> +
> /*
> * The interrupt-in pipe signals exceptional conditions (modem line
> * signal changes and errors). data[0] holds MSR, data[1] holds LSR.
> --
> 2.53.0
>
>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
prev parent reply other threads:[~2026-05-20 11:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 10:17 [PATCH] USB: serial: mct_u232: fix missing interrupt-in transfer sanity check Johan Hovold
2026-05-20 11:16 ` Greg Kroah-Hartman [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=2026052027-boxing-strenuous-b014@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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