Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-10 Thread Mike Rapoport
On Thu, May 06, 2021 at 11:47:47AM -0700, James Bottomley wrote: > On Thu, 2021-05-06 at 10:33 -0700, Kees Cook wrote: > > On Thu, May 06, 2021 at 08:26:41AM -0700, James Bottomley wrote: > > > What's happening with O_CLOEXEC in this code? I don't see that > > mentioned in the cover letter

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-07 Thread Kees Cook
On Thu, May 06, 2021 at 11:47:47AM -0700, James Bottomley wrote: > On Thu, 2021-05-06 at 10:33 -0700, Kees Cook wrote: > > On Thu, May 06, 2021 at 08:26:41AM -0700, James Bottomley wrote: > [...] > > > > I think that a very complete description of the threats which > > > > this feature addresses

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-07 Thread David Hildenbrand
On 07.05.21 01:16, Nick Kossifidis wrote: Στις 2021-05-06 20:05, James Bottomley έγραψε: On Thu, 2021-05-06 at 18:45 +0200, David Hildenbrand wrote: Also, there is a way to still read that memory when root by 1. Having kdump active (which would often be the case, but maybe not to dump user

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-06 Thread Nick Kossifidis
Στις 2021-05-06 20:05, James Bottomley έγραψε: On Thu, 2021-05-06 at 18:45 +0200, David Hildenbrand wrote: Also, there is a way to still read that memory when root by 1. Having kdump active (which would often be the case, but maybe not to dump user pages ) 2. Triggering a kernel crash (easy

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-06 Thread James Bottomley
On Thu, 2021-05-06 at 10:33 -0700, Kees Cook wrote: > On Thu, May 06, 2021 at 08:26:41AM -0700, James Bottomley wrote: [...] > >1. Memory safety for user space code. Once the secret memory is > > allocated, the user can't accidentally pass it into the > > kernel to be > >

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-06 Thread Kees Cook
On Thu, May 06, 2021 at 08:26:41AM -0700, James Bottomley wrote: > On Wed, 2021-05-05 at 12:08 -0700, Andrew Morton wrote: > > On Wed, 3 Mar 2021 18:22:00 +0200 Mike Rapoport > > wrote: > > > > > This is an implementation of "secret" mappings backed by a file > > > descriptor. tl;dr: I like

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-06 Thread David Hildenbrand
Is this intended to protect keys/etc after the attacker has gained the ability to run arbitrary kernel-mode code? If so, that seems optimistic, doesn't it? Not exactly: there are many types of kernel attack, but mostly the attacker either manages to effect a privilege escalation to root or

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-06 Thread James Bottomley
On Thu, 2021-05-06 at 18:45 +0200, David Hildenbrand wrote: > On 06.05.21 17:26, James Bottomley wrote: > > On Wed, 2021-05-05 at 12:08 -0700, Andrew Morton wrote: > > > On Wed, 3 Mar 2021 18:22:00 +0200 Mike Rapoport > > > > > > wrote: > > > > > > > This is an implementation of "secret"

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-06 Thread David Hildenbrand
On 06.05.21 17:26, James Bottomley wrote: On Wed, 2021-05-05 at 12:08 -0700, Andrew Morton wrote: On Wed, 3 Mar 2021 18:22:00 +0200 Mike Rapoport wrote: This is an implementation of "secret" mappings backed by a file descriptor. The file descriptor backing secret memory mappings is created

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-06 Thread James Bottomley
On Wed, 2021-05-05 at 12:08 -0700, Andrew Morton wrote: > On Wed, 3 Mar 2021 18:22:00 +0200 Mike Rapoport > wrote: > > > This is an implementation of "secret" mappings backed by a file > > descriptor. > > > > The file descriptor backing secret memory mappings is created using > > a dedicated

Re: [PATCH v18 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2021-05-05 Thread Andrew Morton
On Wed, 3 Mar 2021 18:22:00 +0200 Mike Rapoport wrote: > This is an implementation of "secret" mappings backed by a file descriptor. > > The file descriptor backing secret memory mappings is created using a > dedicated memfd_secret system call The desired protection mode for the > memory is