From: Tyler Hicks Date: Fri, 20 Mar 2009 07:23:57 +0000 (-0500) Subject: eCryptfs: NULL crypt_stat dereference during lookup X-Git-Tag: v2.6.29~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aac0cf88681bfa092f731553bc7fbd23516be73;p=pandora-kernel.git eCryptfs: NULL crypt_stat dereference during lookup If ecryptfs_encrypted_view or ecryptfs_xattr_metadata were being specified as mount options, a NULL pointer dereference of crypt_stat was possible during lookup. This patch moves the crypt_stat assignment into ecryptfs_lookup_and_interpose_lower(), ensuring that crypt_stat will not be NULL before we attempt to dereference it. Thanks to Dan Carpenter and his static analysis tool, smatch, for finding this bug. Signed-off-by: Tyler Hicks Acked-by: Dustin Kirkland Cc: Dan Carpenter Cc: Serge Hallyn Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed