eCryptfs: Fix oops when printing debug info in extent crypto functions
authorTyler Hicks <tyhicks@canonical.com>
Tue, 24 Jan 2012 16:02:22 +0000 (10:02 -0600)
committerSimone Willett <swillett@nvidia.com>
Fri, 10 Feb 2012 02:20:10 +0000 (18:20 -0800)
commit704157b7ceb50c8d5154ccb5d53813235455b692
tree2a6c859e8a054421ac727d580f99a261fdcc62d6
parent58e263a27fb52705dbf7ba9840b129db801d30e9
eCryptfs: Fix oops when printing debug info in extent crypto functions

commit 58ded24f0fcb85bddb665baba75892f6ad0f4b8a upstream.

If pages passed to the eCryptfs extent-based crypto functions are not
mapped and the module parameter ecryptfs_verbosity=1 was specified at
loading time, a NULL pointer dereference will occur.

Note that this wouldn't happen on a production system, as you wouldn't
pass ecryptfs_verbosity=1 on a production system. It leaks private
information to the system logs and is for debugging only.

The debugging info printed in these messages is no longer very useful
and rather than doing a kmap() in these debugging paths, it will be
better to simply remove the debugging paths completely.

https://launchpad.net/bugs/913651

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Icbb95db933d5fa76938982fcf69cacea85ecbecc
Reviewed-on: http://git-master/r/79652
Reviewed-by: Automatic_Commit_Validation_User
fs/ecryptfs/crypto.c