pagemap: do not leak physical addresses to non-privileged userspace
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Mon, 7 Dec 2015 23:24:08 +0000 (15:24 -0800)
committermobile promotions <svcmobile_promotions@nvidia.com>
Fri, 11 Dec 2015 11:10:34 +0000 (03:10 -0800)
commita9c8cefcd3bdfa9f4d1ae9ce80b9384e85045a79
tree45ccf86d13fe8721b74b31402e5011da3992da57
parent8a5c7762f7493c7986b5a24f1dd46c8523b15f76
pagemap: do not leak physical addresses to non-privileged userspace

[ Upstream commit ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce ]

As pointed by recent post[1] on exploiting DRAM physical imperfection,
/proc/PID/pagemap exposes sensitive information which can be used to do
attacks.

This disallows anybody without CAP_SYS_ADMIN to read the pagemap.

[1] http://googleprojectzero.blogspot.com/2015/03/exploiting-dram-rowhammer-bug-to-gain.html

[ Eventually we might want to do anything more finegrained, but for now
  this is the simple model.   - Linus ]

bug 200160374

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mark Seaborn <mseaborn@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Change-Id: I85acefa5c77fcd26d4fde436c37870d41bb8062e
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/842648
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
fs/proc/task_mmu.c