]> git.baikalelectronics.ru Git - kernel.git/commit
eCryptfs: Prevent file create race condition
authorTyler Hicks <tyhicks@canonical.com>
Mon, 21 Nov 2011 23:31:02 +0000 (17:31 -0600)
committerTyler Hicks <tyhicks@canonical.com>
Wed, 23 Nov 2011 21:39:38 +0000 (15:39 -0600)
commit51660dd2700e96a7208a78a6bb9305f1a0e9cb41
treeee978cf1ab736b3fc104b46b2491e7742e663dcf
parentd5faecad5eb827bc8768ef2822647461084d566f
eCryptfs: Prevent file create race condition

The file creation path prematurely called d_instantiate() and
unlock_new_inode() before the eCryptfs inode info was fully
allocated and initialized and before the eCryptfs metadata was written
to the lower file.

This could result in race conditions in subsequent file and inode
operations leading to unexpected error conditions or a null pointer
dereference while attempting to use the unallocated memory.

https://launchpad.net/bugs/813146

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Cc: stable@kernel.org
fs/ecryptfs/crypto.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/inode.c