eCryptfs: check readlink result was not an error before using it
authorDuane Griffin <[email protected]>
Fri, 19 Dec 2008 20:47:10 +0000 (20:47 +0000)
committerAl Viro <[email protected]>
Wed, 31 Dec 2008 23:07:38 +0000 (18:07 -0500)
commita17d5232de7b53d34229de79ec22f4bb04adb7e4
treed42a96bf5e0806e4a67404709a8fdf0ed4e551c0
parent5cc4a0341a1295ea56b2e62eb70d96d8fdb94ded
eCryptfs: check readlink result was not an error before using it

The result from readlink is being used to index into the link name
buffer without checking whether it is a valid length. If readlink
returns an error this will fault or cause memory corruption.

Cc: Tyler Hicks <[email protected]>
Cc: Dustin Kirkland <[email protected]>
Cc: [email protected]
Signed-off-by: Duane Griffin <[email protected]>
Acked-by: Michael Halcrow <[email protected]>
Acked-by: Tyler Hicks <[email protected]>
Signed-off-by: Al Viro <[email protected]>
fs/ecryptfs/inode.c