Skip to content

Control over userfaultfd kernel-fault handling

Daniel Colascione linux-doc linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 26 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Add UFFD_USER_MODE_ONLYfs/userfaultfd.c include/uapi/linux/userfaultfd.h+15 -13 replies
2/2Add a new sysctl knob: unprivileged_userfaultfd_user_mode_onlyDocumentation/admin-guide/sysctl/vm.rst fs/userfaultfd.c include/linux/userfaultfd_k.h +1 more+33 -121 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Control over userfaultfd kernel-fault handling

This small patch series adds a new flag to userfaultfd(2) that allows callers to give up the ability to handle user-mode faults with the resulting UFFD file object. In then add a new sysctl to require unprivileged callers to use this new flag.

The purpose of this new interface is to decrease the change of an unprivileged userfaultfd user taking advantage of userfaultfd to enhance security vulnerabilities by lengthening the race window in kernel code.

This patch series is split from [1].

[1] https://lore.kernel.org/lkml/[email protected]/

Daniel Colascione (2):
Add UFFD_USER_MODE_ONLY
Add a new sysctl knob: unprivileged_userfaultfd_user_mode_only

 Documentation/admin-guide/sysctl/vm.rst | 13 +++++++++++++
 fs/userfaultfd.c                        | 18 ++++++++++++++++--
 include/linux/userfaultfd_k.h           |  1 +
 include/uapi/linux/userfaultfd.h        |  9 +++++++++
 kernel/sysctl.c                         |  9 +++++++++
 5 files changed, 48 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2.303.gf8c07b1a785-goog