Commit 1f19180a authored by Erez Zadok's avatar Erez Zadok Committed by Greg Kroah-Hartman
Browse files

ecryptfs: initialize private persistent file before dereferencing pointer



commit e27759d7 upstream.

Ecryptfs_open dereferences a pointer to the private lower file (the one
stored in the ecryptfs inode), without checking if the pointer is NULL.
Right afterward, it initializes that pointer if it is NULL.  Swap order of
statements to first initialize.  Bug discovered by Duckjin Kang.

Signed-off-by: default avatarDuckjin Kang <fromdj2k@gmail.com>
Signed-off-by: default avatarErez Zadok <ezk@cs.sunysb.edu>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 954eec71
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment