From: Stefan Hajnoczi <stefanha@gmail.com>
To: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Cc: Dmitry Fleytman <dmitry@daynix.com>,
idan.brown@ravellosystems.com, qemu-devel@nongnu.org,
Dana Rubin <dana.rubin@ravellosystems.com>
Subject: Re: [Qemu-devel] [PATCH] net/vmxnet3: Refine l2 header validation
Date: Thu, 3 Sep 2015 17:45:34 +0100 [thread overview]
Message-ID: <20150903164533.GD18405@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1439891155-16011-1-git-send-email-shmulik.ladkani@ravellosystems.com>
On Tue, Aug 18, 2015 at 12:45:55PM +0300, Shmulik Ladkani wrote:
> From: Dana Rubin <dana.rubin@ravellosystems.com>
>
> Validation of l2 header length assumed minimal packet size as
> eth_header + 2 * vlan_header regardless of the actual protocol.
>
> This caused crash for valid non-IP packets shorter than 22 bytes, as
> 'tx_pkt->packet_type' hasn't been assigned for such packets, and
> 'vmxnet3_on_tx_done_update_stats()' expects it to be properly set.
>
> Refine header length validation in 'vmxnet_tx_pkt_parse_headers'.
> Check its return value during packet processing flow.
>
> As a side effect, in case IPv4 and IPv6 header validation failure,
> corrupt packets will be dropped.
>
> Signed-off-by: Dana Rubin <dana.rubin@ravellosystems.com>
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
> ---
> hw/net/vmxnet3.c | 4 +---
> hw/net/vmxnet_tx_pkt.c | 19 ++++++++++++++++---
> 2 files changed, 17 insertions(+), 6 deletions(-)
Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net
Stefan
next prev parent reply other threads:[~2015-09-03 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 9:45 [Qemu-devel] [PATCH] net/vmxnet3: Refine l2 header validation Shmulik Ladkani
2015-08-19 17:31 ` Dmitry Fleytman
2015-09-03 16:45 ` Stefan Hajnoczi [this message]
2015-09-18 6:13 ` Shmulik Ladkani
2015-09-24 4:20 ` Jason Wang
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=20150903164533.GD18405@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=dana.rubin@ravellosystems.com \
--cc=dmitry@daynix.com \
--cc=idan.brown@ravellosystems.com \
--cc=qemu-devel@nongnu.org \
--cc=shmulik.ladkani@ravellosystems.com \
/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).