LP #345766 - NULL crypt_stat dereference during lookup
apw at canonical.com
Mon Mar 23 08:52:50 UTC 2009
On Sun, Mar 22, 2009 at 07:10:19PM -0600, Tim Gardner wrote:
> From ddc873efd85138c99b34be4ab9552c1d72b10e94 Mon Sep 17 00:00:00 2001
> From: Tyler Hicks <tyhicks at linux.vnet.ibm.com>
> Date: Fri, 20 Mar 2009 02:23:57 -0500
> Subject: [PATCH] eCryptfs: NULL crypt_stat dereference during lookup
> Bug: #345766
> 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 <tyhicks at linux.vnet.ibm.com>
> Acked-by: Dustin Kirkland <kirkland at canonical.com>
> Cc: Dan Carpenter <error27 at gmail.com>
> Cc: Serge Hallyn <serue at us.ibm.com>
> Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
> (cherry picked from commit 2aac0cf88681bfa092f731553bc7fbd23516be73)
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
Looks good to me.
Acked-by: Andy Whitcroft <apw at canonical.com>
More information about the kernel-team