aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorTyler Hicks <[email protected]>2009-09-22 12:52:17 -0500
committerTyler Hicks <[email protected]>2009-09-23 09:10:34 -0500
commit9c2d2056647790c5034d722bd24e9d913ebca73c (patch)
tree38db96956ac0167b2a277429746c500b522bc5aa /net/lapb/lapb_iface.c
parent96a7b9c2f5df899f302ade45cf17ad753fe130fd (diff)
eCryptfs: Prevent lower dentry from going negative during unlink
When calling vfs_unlink() on the lower dentry, d_delete() turns the dentry into a negative dentry when the d_count is 1. This eventually caused a NULL pointer deref when a read() or write() was done and the negative dentry's d_inode was dereferenced in ecryptfs_read_update_atime() or ecryptfs_getxattr(). Placing mutt's tmpdir in an eCryptfs mount is what initially triggered the oops and I was able to reproduce it with the following sequence: open("/tmp/upper/foo", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 3 link("/tmp/upper/foo", "/tmp/upper/bar") = 0 unlink("/tmp/upper/foo") = 0 open("/tmp/upper/bar", O_RDWR|O_CREAT|O_NOFOLLOW, 0600) = 4 unlink("/tmp/upper/bar") = 0 write(4, "eCryptfs test\n"..., 14 <unfinished ...> +++ killed by SIGKILL +++ https://bugs.launchpad.net/ecryptfs/+bug/387073 Reported-by: Loïc Minier <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: Dave Kleikamp <[email protected]> Cc: [email protected] Cc: stable <[email protected]> Signed-off-by: Tyler Hicks <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions