From: P J P <ppandit@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Jann Horn <jannh@google.com>,
Qemu Developers <qemu-devel@nongnu.org>,
Riku Voipio <riku.voipio@iki.fi>
Subject: Re: [Qemu-devel] [PATCH] linux-user: limit number of arguments to execve
Date: Mon, 6 Mar 2017 10:56:37 +0530 (IST) [thread overview]
Message-ID: <alpine.LFD.2.20.1703061044280.16064@wniryva> (raw)
In-Reply-To: <CAG48ez2eaXFk50puw_bc27tNdfOHDsL08A9jY8=7DnA-mtEXWA@mail.gmail.com>
+-- On Fri, 3 Mar 2017, Jann Horn wrote --+
| On Fri, Mar 3, 2017 at 4:55 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
| >> + if (argc > ARG_MAX || envc > ARG_MAX) {
| >> + fprintf(stderr,
| >> + "argc(%d), envc(%d) exceed %d\n", argc, envc, ARG_MAX);
| >> + ret = -TARGET_EFAULT;
| >> + break;
| >> + }
| >> argp = alloca((argc + 1) * sizeof(void *));
| >> envp = alloca((envc + 1) * sizeof(void *));
| >
| > This code is already supposed to handle "argument string too big",
| > see commit a6f79cc9a5e.
| >
| > What's the actual bug case we're trying to handle here?
Not argument string, but argument count too big leads to a bad address in
get_user_ual(...), resulting in segfault.
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F
prev parent reply other threads:[~2017-03-06 5:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 11:25 [Qemu-devel] [PATCH] linux-user: limit number of arguments to execve P J P
2017-03-03 14:54 ` Eric Blake
2017-03-03 15:56 ` Peter Maydell
2017-03-03 16:00 ` Jann Horn
2017-03-06 7:20 ` P J P
2017-03-03 15:55 ` Peter Maydell
2017-03-03 15:57 ` Jann Horn
2017-03-03 15:59 ` Peter Maydell
2017-03-06 5:26 ` P J P [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=alpine.LFD.2.20.1703061044280.16064@wniryva \
--to=ppandit@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).