All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: uclinux-dev@uclinux.org, linux-kernel@vger.kernel.org
Subject: [PATCH] binfmt_flat: missing argv table
Date: Wed, 15 Jun 2011 16:30:04 +0900	[thread overview]
Message-ID: <874o3rimbn.wl%ysato@users.sourceforge.jp> (raw)

"put_user" is multiple times evalute on argument
(in asm-generic/uaccess.h).
So this code building argv table include gabage.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 811384b..127a198 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -144,7 +144,7 @@ static unsigned long create_flat_tables(
 	put_user(argc, sp);
 	current->mm->arg_start = (unsigned long) p;
 	while (argc-->0) {
-		put_user((unsigned long) p, argv++);
+		put_user((unsigned long) p, argv); argv++;
 		do {
 			get_user(dummy, p); p++;
 		} while (dummy);

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

             reply	other threads:[~2011-06-15  7:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15  7:30 Yoshinori Sato [this message]
2011-06-15 15:52 ` [PATCH] binfmt_flat: missing argv table Mike Frysinger
2011-06-17  6:58   ` Yoshinori Sato

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=874o3rimbn.wl%ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-dev@uclinux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.