lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Apr 2018 14:12:22 +0300
From:   "Kirill A. Shutemov" <kirill@...temov.name>
To:     "Huang, Ying" <ying.huang@...el.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Michal Hocko <mhocko@...e.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Andrei Vagin <avagin@...nvz.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Jerome Glisse <jglisse@...hat.com>,
        Daniel Colascione <dancol@...gle.com>,
        Zi Yan <zi.yan@...rutgers.edu>,
        Naoya Horiguchi <n-horiguchi@...jp.nec.com>
Subject: Re: [PATCH -mm] mm, pagemap: Fix swap offset value for PMD migration
 entry

On Tue, Apr 10, 2018 at 08:57:19AM +0800, Huang, Ying wrote:
> >> the swap offset reported doesn't
> >> reflect this.  And in the loop to report information of each sub-page,
> >> the swap offset isn't increased accordingly as that for PFN.
> >> 
> >> BTW: migration swap entries have PFN information, do we need to
> >> restrict whether to show them?
> >
> > For what reason?  Address obfuscation?
> 
> This is an existing feature for PFN report of /proc/<pid>/pagemap,
> reason is in following commit log.  I am wondering whether that is
> necessary for migration swap entries too.
> 
> ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce
> Author:     Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> AuthorDate: Mon Mar 9 23:11:12 2015 +0200
> Commit:     Linus Torvalds <torvalds@...ux-foundation.org>
> CommitDate: Tue Mar 17 09:31:30 2015 -0700
> 
> pagemap: do not leak physical addresses to non-privileged userspace
> 
> 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 ]

Note that there's follow up to the commit: 

1c90308e7a77 ("pagemap: hide physical addresses from non-privileged users")

It introduces pm->show_pfn and it should be applied to swap entries too.

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ