All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Olaf Kirch <okir@suse.de>
Cc: nfs@lists.sourceforge.net
Subject: Re: [PATCH] auth_domain_lookup in 2.6.8-rc2
Date: Fri, 8 Oct 2004 15:43:06 -0400	[thread overview]
Message-ID: <20041008194306.GH15184@fieldses.org> (raw)
In-Reply-To: <20041008100102.GA20142@suse.de>

On Fri, Oct 08, 2004 at 12:01:03PM +0200, Olaf Kirch wrote:
> 2.6.8-rc2 open-codes auth_domain_lookup, and introduces a flaw that
> may have security consequences. If we do not find any matching
> domain, the routine always returns the last item looked at, no
> matter what it was.

Argh, sorry, that was my fault.  Thanks for spotting it.--b.

> This patch makes sure that auth_domain_lookup returns NULL when
> it doesn't find a matching entry, rather than the last entry
> in the hash chain.
> 
> Signed-off-by: Olaf Kirch <okir@suse.de>
> 
> Index: linux-2.6.8/net/sunrpc/svcauth.c
> ===================================================================
> --- linux-2.6.8.orig/net/sunrpc/svcauth.c
> +++ linux-2.6.8/net/sunrpc/svcauth.c
> @@ -183,7 +183,7 @@ auth_domain_lookup(struct auth_domain *i
>  	}
>  	/* Didn't find anything */
>  	if (!set)
> -		goto out_noset;
> +		goto out_nada;
>  	auth_domain_cache.entries++;
>  out_set:
>  	set_bit(CACHE_HASHED, &item->h.flags);
> @@ -193,6 +193,8 @@ out_set:
>  	cache_fresh(&auth_domain_cache, &item->h, item->h.expiry_time);
>  	cache_get(&item->h);
>  	return item;
> +out_nada:
> +	tmp = NULL;
>  out_noset:
>  	read_unlock(&auth_domain_cache.hash_lock);
>  	return tmp;



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

      reply	other threads:[~2004-10-08 19:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-08 10:01 [PATCH] auth_domain_lookup in 2.6.8-rc2 Olaf Kirch
2004-10-08 19:43 ` J. Bruce Fields [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=20041008194306.GH15184@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=nfs@lists.sourceforge.net \
    --cc=okir@suse.de \
    /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.