From: Roel Kluin <roel.kluin@gmail.com>
To: Jeff Dike <jdike@addtoit.com>,
user-mode-linux-devel@lists.sourceforge.net,
Andrew Morton <akpm@linux-foundation.org>
Subject: [uml-devel] [PATCH] uml: Read buffer overflow
Date: Tue, 11 Aug 2009 22:44:33 +0200 [thread overview]
Message-ID: <4A81D831.5090808@gmail.com> (raw)
Prevent write to write init->argw.argv[SLIRP_MAX_ARGS]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
If i becomes SLIRP_MAX_ARGS - 1 and `*str != ','` evaluates to
true, then we write init->argw.argv[SLIRP_MAX_ARGS].
Can this occur?
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c
index e376284..39bc9a7 100644
--- a/arch/um/drivers/slirp_kern.c
+++ b/arch/um/drivers/slirp_kern.c
@@ -97,6 +97,9 @@ static int slirp_setup(char *str, char **mac_out, void *data)
*str++ = '\0';
} while (1);
+ if (i == SLIRP_MAX_ARGS)
+ i--;
+
init->argw.argv[i] = NULL;
return 1;
}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
reply other threads:[~2009-08-11 20:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4A81D831.5090808@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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