From: Jason Wang <jasowang@redhat.com>
To: Dmitry Fleytman <dmitry@daynix.com>, P J P <ppandit@redhat.com>
Cc: Qinghao Tang <luodalongde@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] net: vmxnet3: memory leakage issue
Date: Fri, 4 Dec 2015 11:16:50 +0800 [thread overview]
Message-ID: <566105A2.6040508@redhat.com> (raw)
In-Reply-To: <66A887B2-7CFF-45F9-AD7F-1381F8B1F318@daynix.com>
On 12/03/2015 03:17 PM, Dmitry Fleytman wrote:
> Hello Prasad,
>
> The patch is good.
> Jason, would you apply is from attachment or should it be resent by
> "git send-email”?
Better with "git send-email". And I've a question for this patch which
needs to be answered before merging this.
What if guest deactivate the device before re-activate the device?
Thanks
>
> Acked-by: Dmitry Fleytman <dmitry@daynix.com <mailto:dmitry@daynix.com>>
>
> ~Dmitry
>
>> On 2 Dec 2015, at 14:17 PM, P J P <ppandit@redhat.com
>> <mailto:ppandit@redhat.com>> wrote:
>>
>> Hello Dmitry, all
>>
>> A memory leakage issue was reported by Mr Qinghao Tang, CC'd here.
>>
>> In that, the Qemu VMXNET3 paravirtual device emulator does not check
>> if the device is already active, before activating it. This leads to
>> host memory leakage via calls to vmxnet_tx_pkt_init(), which calls
>> g_malloc0().
>>
>> ===
>> static void vmxnet3_activate_device(VMXNET3State *s)
>> {
>> ...
>> /* Preallocate TX packet wrapper */
>> VMW_CFPRN("Max TX fragments is %u", s->max_tx_frags);
>> vmxnet_tx_pkt_init(&s->tx_pkt, s->max_tx_frags, s->peer_has_vhdr);
>> ...
>> }
>> ===
>>
>> A malicious guest driver could use this flaw to leak excessive memory
>> on the host, eventually killing the Qemu process.
>>
>> Please see attached herein is a proposed (tested)patch which fixes
>> this issue. Please let me know if it's okay or requires any changes.
>>
>> Thank you.
>> --
>> Prasad J Pandit / Red Hat Product Security Team
>> 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B
>> 041F<0001-net-vmxnet3-avoid-multiple-activations-of-device.patch>
>
next prev parent reply other threads:[~2015-12-04 3:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 12:17 [Qemu-devel] net: vmxnet3: memory leakage issue P J P
2015-12-03 7:17 ` Dmitry Fleytman
2015-12-03 11:20 ` P J P
2015-12-04 3:16 ` Jason Wang [this message]
2015-12-08 10:17 ` P J P
2015-12-09 15:28 ` P J P
2015-12-11 9:10 ` Jason Wang
2015-12-11 9:34 ` Dmitry Fleytman
2015-12-11 10:04 ` P J P
2015-12-13 8:27 ` Dmitry Fleytman
2015-12-13 9:45 ` Dmitry Fleytman
2015-12-14 11:58 ` P J P
2015-12-14 17:27 ` Dmitry Fleytman
2015-12-15 6:57 ` P J P
2015-12-15 7:01 ` Dmitry Fleytman
2015-12-15 8:00 ` P J P
2015-12-15 8:24 ` Jason Wang
2015-12-15 8:50 ` P J P
2015-12-15 8:43 ` Miao Yan
2015-12-15 10:08 ` P J P
2015-12-04 2:22 ` 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=566105A2.6040508@redhat.com \
--to=jasowang@redhat.com \
--cc=dmitry@daynix.com \
--cc=luodalongde@gmail.com \
--cc=ppandit@redhat.com \
--cc=qemu-devel@nongnu.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).