lkml.org 
[lkml]   [2022]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 22/39] mm: Don't allow write GUPs to shadow stack memory
From
On 10/3/22 11:39, Kees Cook wrote:
> On Thu, Sep 29, 2022 at 03:29:19PM -0700, Rick Edgecombe wrote:
>> [...]
>> Still allow FOLL_FORCE to write through shadow stack protections, as it
>> does for read-only protections.
>
> As I asked in the cover letter: why do we need to add this for shstk? It
> was a mistake for general memory. :P

For debuggers, which use FOLL_FORCE, quite intentionally, to modify
text. And once a debugger has ptrace write access to a target, shadow
stacks provide exactly no protection -- ptrace can modify text and all
registers.

But /proc/.../mem may be a different story, and I'd be okay with having
FOLL_PROC_MEM for legacy compatibility via /proc/.../mem and not
allowing that to access shadow stacks. This does seem like it may not
be very useful, though.

\
 
 \ /
  Last update: 2022-10-04 00:50    [W:0.374 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site