qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: P J P <ppandit@redhat.com>
Cc: Qinghao Tang <luodalongde@gmail.com>,
	Scott Feldman <sfeldma@gmail.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] net: rocker: fix an incorrect array bounds check
Date: Tue, 22 Dec 2015 14:36:56 +0100	[thread overview]
Message-ID: <20151222133656.GA5330@nanopsycho.orion> (raw)
In-Reply-To: <alpine.LFD.2.20.1512221830330.5001@wniryva>

Tue, Dec 22, 2015 at 02:07:01PM CET, ppandit@redhat.com wrote:
>  Hello Scott, Jiri
>
>A stack overflow issue was reported by Mr Qinghao Tang, CC'd here. It occurs
>while processing transmit(tx) descriptors in tx_consume() routine. If a
>descriptor was to have more than allowed(ROCKER_TX_FRAGS_MAX=16) packet
>fragments, the processing loop suffers an off-by-one error. Thus leading to
>OOB memory access and leakage of host memory.
>
>Please see below a proposed patch to fix this issue. Does it look okay?
>
>===
>From f3461d8098a0572786f5a2d7a492863090c73134 Mon Sep 17 00:00:00 2001
>From: Prasad J Pandit <pjp@fedoraproject.org>
>Date: Tue, 22 Dec 2015 18:21:00 +0530
>Subject: [PATCH] net: rocker: fix an incorrect array bounds check
>
>While processing transmit(tx) descriptors in 'tx_consume' routine
>the switch emulator suffers from an off-by-one error, if a
>descriptor was to have more than allowed(ROCKER_TX_FRAGS_MAX)
>fragments. Fix an incorrect bounds check to avoid it.
>
>Reported-by: Qinghao Tang <luodalongde@gmail.com>
>Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>

Reviewed-by: Jiri Pirko <jiri@mellanox.com>

  reply	other threads:[~2015-12-22 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 13:07 [Qemu-devel] [PATCH] net: rocker: fix an incorrect array bounds check P J P
2015-12-22 13:36 ` Jiri Pirko [this message]
2015-12-22 14:45   ` P J P
2015-12-22 14:46 ` Paolo Bonzini
2015-12-22 17:26   ` P J P
2015-12-22 18:13     ` Paolo Bonzini
2015-12-22 19:04       ` P J P

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=20151222133656.GA5330@nanopsycho.orion \
    --to=jiri@resnulli.us \
    --cc=luodalongde@gmail.com \
    --cc=ppandit@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sfeldma@gmail.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).