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] [day] [month] [year] [list]
Message-ID: <4FA345DA4F4AE44899BD2B03EEEC2FA91198A9EC@SACEXCMBX04-PRD.hq.netapp.com>
Date:	Fri, 4 Jan 2013 15:55:09 +0000
From:	"Myklebust, Trond" <Trond.Myklebust@...app.com>
To:	Xi Wang <xi.wang@...il.com>
CC:	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] nfs: fix null checking in nfs_get_option_str()

On Fri, 2013-01-04 at 03:22 -0500, Xi Wang wrote:
> The following null pointer check is broken.
> 
> 	*option = match_strdup(args);
> 	return !option;
> 
> The pointer `option' must be non-null, and thus `!option' is always false.
> Use `!*option' instead.
> 
> The bug was introduced in commit c5cb09b6f8 ("Cleanup: Factor out some
> cut-and-paste code.").
> 
> Signed-off-by: Xi Wang <xi.wang@...il.com>
> Cc: stable@...r.kernel.org
> ---
>  fs/nfs/super.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index c25cadf8..2e7e8c8 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -1152,7 +1152,7 @@ static int nfs_get_option_str(substring_t args[], char **option)
>  {
>  	kfree(*option);
>  	*option = match_strdup(args);
> -	return !option;
> +	return !*option;
>  }
>  
>  static int nfs_get_option_ul(substring_t args[], unsigned long *option)

Thank you! Applied to the bugfixes branch.

-- 
Trond Myklebust
Linux NFS client maintainer

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ