From: P J P <ppandit@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Qemu Developers <qemu-devel@nongnu.org>,
Riku Voipio <riku.voipio@iki.fi>, Jann Horn <jannh@google.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments
Date: Tue, 7 Mar 2017 00:13:18 +0530 (IST) [thread overview]
Message-ID: <alpine.LFD.2.20.1703070010520.6862@wniryva> (raw)
In-Reply-To: <8ba0840f-43cf-601d-f0ea-3094b935c4b0@redhat.com>
+-- On Mon, 6 Mar 2017, Eric Blake wrote --+
| If you impose any limit smaller than _SC_ARG_MAX, you are needlessly
| limiting things. Furthermore, _SC_ARG_MAX may not always be the same
| value, depending on how the kernel was compiled. So it's probably
| asiest to just let execve() impose its own limits (and correctly report
| errors to the caller when execve() fails), rather than trying to impose
| limits yourself.
Okay.
| In short, the bug that you are fixing is not caused by the guest
| requesting something beyond execve() limits, but caused by poor use of
| alloca() leading to a stack overrun.
Yes, true.
| You only need to fix the bug (by switching alloca() to heap allocation),
Okay, I'll send just one revised patch.
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F
next prev parent reply other threads:[~2017-03-06 18:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 7:17 [Qemu-devel] [PATCH v2 0/2] Limit and protect execve arguments P J P
2017-03-06 7:17 ` [Qemu-devel] [PATCH v2 1/2] linux-user: limit number of arguments to execve P J P
2017-03-06 15:42 ` Peter Maydell
2017-03-06 15:54 ` Eric Blake
2017-03-06 7:17 ` [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments P J P
2017-03-06 15:53 ` Eric Blake
2017-03-06 16:08 ` Eric Blake
2017-03-06 18:06 ` P J P
2017-03-06 18:11 ` Eric Blake
2017-03-06 18:43 ` P J P [this message]
2017-03-06 15:57 ` Peter Maydell
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=alpine.LFD.2.20.1703070010520.6862@wniryva \
--to=ppandit@redhat.com \
--cc=eblake@redhat.com \
--cc=jannh@google.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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).