From: Neil Brown <neilb@suse.de>
To: Steve Dickson <SteveD@redhat.com>
Cc: Karel Zak <kzak@redhat.com>,
nfs@lists.sourceforge.net, Cory Olmo <colmo@TrustedCS.com>
Subject: Re: [PATCH 11/11] nfs-utils: mount: Fixed collision between commas in options
Date: Tue, 27 Feb 2007 17:35:58 +1100 [thread overview]
Message-ID: <17891.53582.325117.716540@notabene.brown> (raw)
In-Reply-To: message from Steve Dickson on Monday February 26
On Monday February 26, SteveD@redhat.com wrote:
> commit 96a3ceb3d35bf5edcb9446aded8375d3b98b4f5b
> Author: Cory Olmo <colmo@TrustedCS.com>
> Date: Sat Feb 24 16:20:40 2007 -0500
>
> This patch avoid the collision between commas in security contexts and the
> delimiter betweeen mount options.
>
> Signed-off-by: Karel Zak <kzak@redhat.com>
> Signed-off-by: Cory Olmo <colmo@TrustedCS.com>
>
> diff --git a/utils/mount/mount.c b/utils/mount/mount.c
> index b3d3696..f22747b 100644
> --- a/utils/mount/mount.c
> +++ b/utils/mount/mount.c
> @@ -285,18 +285,30 @@ static void parse_opts (const char *options, int *flags, char **extra_opts)
> {
> if (options != NULL) {
> char *opts = xstrdup(options);
> - char *opt;
> - int len = strlen(opts) + 20;
> -
> + char *opt, *p;
> + int len = strlen(opts) + 256;
This is a worry. If 20 isn't big enough, why do you thing 256 will
be? and where do we check that the buffer doesn't overflow (in this
setuid program).
What are we making space for here?
Would strlen(opts)*2 or *3 be sure to be sufficient?
NeilBrown
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2007-02-27 6:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-26 11:20 [PATCH 11/11] nfs-utils: mount: Fixed collision between commas in options Steve Dickson
2007-02-27 6:35 ` Neil Brown [this message]
2007-02-27 9:34 ` Karel Zak
2007-02-27 11:45 ` Karel Zak
2007-02-28 23:33 ` Neil Brown
2007-03-01 9:02 ` Karel Zak
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=17891.53582.325117.716540@notabene.brown \
--to=neilb@suse.de \
--cc=SteveD@redhat.com \
--cc=colmo@TrustedCS.com \
--cc=kzak@redhat.com \
--cc=nfs@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