From: "J. Bruce Fields" <bfields@fieldses.org>
To: Ivan Romanov <drizt@land.ru>
Cc: steved@redhat.com, linux-nfs@vger.kernel.org
Subject: Re: exportfs crash with long path
Date: Wed, 10 Oct 2012 08:28:33 -0400 [thread overview]
Message-ID: <20121010122833.GD2935@fieldses.org> (raw)
In-Reply-To: <1349708828.1183.5.camel@lix>
On Mon, Oct 08, 2012 at 09:07:08PM +0600, Ivan Romanov wrote:
> Hello. I opened a bug with nfs-utils on Redhat Bugzilla. And got an
> advice to email upstream. So I just repeat my bug text with a patch.
>
> How reproducible:
> always
>
> Steps to Reproduce:
> # mkdir -p /home/kudinae/Общедоступные
> # echo '/home/kudinae/Общедоступные oek-1(rw,sync,no_wdelay,no_root_squash,no_subtree_check)' > /etc/exports
> # exportfs -a
> Segmentation fault
>
> I've obtained the sources. So a crush happens on export.c:293. variable
> pos has negative value. I think problem into strtoint and export_hash
> functions. strtoint has unsigned type and always returns positive value
> but export_hash impicity cast it to signed int. So it is possible to
> get negative value. I wrote patch to fix this.
The fix looks right to me, thanks.--b.
>
> Original Red Hat bug
> https://bugzilla.redhat.com/show_bug.cgi?id=863054
> diff --git a/support/export/export.c b/support/export/export.c
> index 4fda30a..0257903 100644
> --- a/support/export/export.c
> +++ b/support/export/export.c
> @@ -357,7 +357,7 @@ strtoint(char *str)
> static int
> export_hash(char *str)
> {
> - int num = strtoint(str);
> + unsigned int num = strtoint(str);
>
> return num % HASH_TABLE_SIZE;
> }
next prev parent reply other threads:[~2012-10-10 12:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 15:07 exportfs crash with long path Ivan Romanov
2012-10-10 12:28 ` J. Bruce Fields [this message]
2012-10-15 17:13 ` Steve Dickson
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=20121010122833.GD2935@fieldses.org \
--to=bfields@fieldses.org \
--cc=drizt@land.ru \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
/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.