lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FA345DA4F4AE44899BD2B03EEEC2FA9235DE4C7@SACEXCMBX04-PRD.hq.netapp.com>
Date:	Sun, 24 Feb 2013 22:35:08 +0000
From:	"Myklebust, Trond" <Trond.Myklebust@...app.com>
To:	Syam Sidhardhan <syamsidhardh@...il.com>
CC:	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH] SUNRPC: Fix possible NULL pointer dereference

On Mon, 2013-02-25 at 03:53 +0530, Syam Sidhardhan wrote:
> Check for cred == NULL has to be done before accessing cred.
> 
> Signed-off-by: Syam Sidhardhan <s.syam@...sung.com>
> ---
>  net/sunrpc/auth.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
> index f529404..18678a6 100644
> --- a/net/sunrpc/auth.c
> +++ b/net/sunrpc/auth.c
> @@ -695,10 +695,13 @@ rpcauth_invalcred(struct rpc_task *task)
>  {
>  	struct rpc_cred *cred = task->tk_rqstp->rq_cred;
>  
> +	if (cred == NULL)
> +		return;
> +
>  	dprintk("RPC: %5u invalidating %s cred %p\n",
>  		task->tk_pid, cred->cr_auth->au_ops->au_name, cred);
> -	if (cred)
> -		clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
> +
> +	clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
>  }
>  
>  int

Do we need that check at all?

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@...app.com
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ