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]
Date:	Fri, 7 Jan 2011 02:47:57 +0300
From:	Dan Carpenter <error27@...il.com>
To:	Jesper Juhl <jj@...osbits.net>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH][rfc] xattr acl: Suspicious use of potentially null
 pointer.

On Thu, Jan 06, 2011 at 10:52:22PM +0100, Jesper Juhl wrote:
> 
> In posix_acl_from_xattr() we have this at the head of the function:
> 
>   		posix_acl_xattr_header *header = (posix_acl_xattr_header *)value;
>    		posix_acl_xattr_entry *entry = (posix_acl_xattr_entry *)(header+1), *end;
> 
> Since 'value' is passed in by the caller and may be NULL, the second line 
> looks suspicious to me - taking a potentially NULL pointer (at least 
> btrfs will pass something allocated with kmalloc() which may be NULL), 
> adding one to it and casting it does not seem like it would always be such 
> a hot idea.

The original code is fine.

regards,
dan carpenter

--
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