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]
Message-ID: <CAAF6GDc2hsj-XJj=Rx2ZF6Sh3Ke6nKewABXfqQxQjfDd5QN7Ug@mail.gmail.com>
Date:   Thu, 10 Aug 2017 15:23:05 +0200
From:   Colm MacCárthaigh <colm@...costs.net>
To:     Michal Hocko <mhocko@...nel.org>
Cc:     Rik van Riel <riel@...hat.com>, linux-kernel@...r.kernel.org,
        Mike Kravetz <mike.kravetz@...cle.com>, linux-mm@...ck.org,
        Florian Weimer <fweimer@...hat.com>, akpm@...ux-foundation.org,
        Kees Cook <keescook@...omium.org>, luto@...capital.net,
        Will Drewry <wad@...omium.org>, mingo@...nel.org,
        kirill@...temov.name, dave.hansen@...el.com,
        linux-api@...r.kernel.org
Subject: Re: [PATCH v2 0/2] mm,fork,security: introduce MADV_WIPEONFORK

On Thu, Aug 10, 2017 at 3:05 PM, Michal Hocko <mhocko@...nel.org> wrote:
>> Too late for that. VM_DONTFORK is already implemented
>> through MADV_DONTFORK & MADV_DOFORK, in a way that is
>> very similar to the MADV_WIPEONFORK from these patches.
>
> Yeah, those two seem to be breaking the "madvise as an advise" semantic as
> well but that doesn't mean we should follow that pattern any further.

I would imagine that many of the crypto applications using
MADV_WIPEONFORK will also be using MADV_DONTDUMP. In cases where it's
for protecting secret keys, I'd like to use both in my code, for
example. Though that doesn't really help decide this.

There is also at least one case for being able to turn WIPEONFORK
on/off with an existing page; a process that uses privilege separation
often goes through the following flow:

1. [ Access privileged keys as a power user and initialize memory ]
2. [ Fork a child process that actually does the work ]
3. [ Child drops privileges and uses the memory to do work ]
4. [ Parent hangs around to re-spawn a child if it crashes ]

In that mode it would be convenient to be able to mark the memory as
WIPEONFORK in the child, but not the parent.

-- 
Colm

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ