All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn <snakebyte@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: chuck.lever@oracle.com
Subject: [Patch] Possible dereference in fs/nfsd/nfs4callback.c
Date: Tue, 26 Sep 2006 12:30:59 +0200	[thread overview]
Message-ID: <1159266659.5413.3.camel@alice> (raw)

hi,

the following commit introduced a possible NULL pointer dereference
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ae5c79476f36512d1100e162606bb5691f2cce5a

we set cb->cb_client to NULL and pass it to rpc_shutdown_client() which dereferences it.
The easy fix below.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.18-git5/fs/nfsd/nfs4callback.c.orig	2006-09-26 12:24:23.000000000 +0200
+++ linux-2.6.18-git5/fs/nfsd/nfs4callback.c	2006-09-26 12:24:40.000000000 +0200
@@ -450,7 +450,8 @@ out_rpciod:
 	rpciod_down();
 	cb->cb_client = NULL;
 out_clnt:
-	rpc_shutdown_client(cb->cb_client);
+	if (cb->cb_client)
+		rpc_shutdown_client(cb->cb_client);
 out_err:
 	dprintk("NFSD: warning: no callback path to client %.*s\n",
 		(int)clp->cl_name.len, clp->cl_name.data);



             reply	other threads:[~2006-09-26 10:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-26 10:30 Eric Sesterhenn [this message]
2006-09-26 12:58 ` [Patch] Possible dereference in fs/nfsd/nfs4callback.c Chuck Lever
2006-09-26 13:17 ` Valdis.Kletnieks

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=1159266659.5413.3.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.