From: David Miller <davem@davemloft.net>
To: bjorn@mork.no
Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org,
alexey.orishko@gmail.com, oliver@neukum.org
Subject: Re: [PATCH net,stable] net: cdc_ncm: fix buffer overflow
Date: Mon, 05 May 2014 15:20:37 -0400 (EDT) [thread overview]
Message-ID: <20140505.152037.455988814617308575.davem@davemloft.net> (raw)
In-Reply-To: <1399066020-22748-1-git-send-email-bjorn@mork.no>
From: Bjørn Mork <bjorn@mork.no>
Date: Fri, 2 May 2014 23:27:00 +0200
> Commit 4d619f625a60 ("net: cdc_ncm: no point in filling up the NTBs
> if we send ZLPs") changed the padding logic for devices with the ZLP
> flag set. This meant that frames of any size will be sent without
> additional padding, except for the single byte added if the size is
> a multiple of the USB packet size. But if the unpadded size is
> identical to the maximum frame size, and the maximum size is a
> multiplum of the USB packet size, then this one-byte padding will
> overflow the buffer.
>
> Prevent padding if already at maximum frame size, letting usbnet
> transmit a ZLP instead in this case.
>
> Fixes: 4d619f625a60 ("net: cdc_ncm: no point in filling up the NTBs if we send ZLPs")
> Reported by: Yu-an Shih <yshih@nvidia.com>
> Signed-off-by: Bjørn Mork <bjorn@mork.no>
> ---
> Please add this to the stable v3.13 and v3.14 queues as well. Thanks.
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2014-05-05 19:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-02 21:27 [PATCH net,stable] net: cdc_ncm: fix buffer overflow Bjørn Mork
2014-05-05 19:20 ` David Miller [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=20140505.152037.455988814617308575.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexey.orishko@gmail.com \
--cc=bjorn@mork.no \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.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;
as well as URLs for NNTP newsgroup(s).