Skip to content

Unprivileged chroot

Mickaël Salaün kernel-hardening linux-fsdevel linux-security-module lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest1 patch 9 repliesIn review
  2. v41 patch 7 repliesSuperseded
  3. v31 patch 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v21 patch4 repliesSuperseded
v11 patch6 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1fs: Allow no_new_privs tasks to call chroot(2)fs/open.c+21 -29 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchKees Cook
1/1R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/1] Unprivileged chroot

Hi,

This new patch fix a race (spotted by Jann Horn) when reading current->fs->users .

The chroot system call is currently limited to be used by processes with the CAP_SYS_CHROOT capability. This protects against malicious procesess willing to trick SUID-like binaries. The following patch allows unprivileged users to safely use chroot(2), which may be complementary to the use of user namespaces.

This patch is a follow-up of a previous one sent by Andy Lutomirski some time ago:
https://lore.kernel.org/lkml/0e2f0f54e19bff53a3739ecfddb4ffa9a6dbde4d.1327858005.git.luto@amacapital.net/

This patch can be applied on top of v5.12-rc3 . I would really appreciate constructive reviews.

Previous versions:
v4: https://lore.kernel.org/r/[email protected]
v3: https://lore.kernel.org/r/[email protected]
v2: https://lore.kernel.org/r/[email protected]
v1: https://lore.kernel.org/r/[email protected]

Regards,

Mickaël Salaün (1):
fs: Allow no_new_privs tasks to call chroot(2)

 fs/open.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

base-commit: 1e28eed17697bcf343c6743f0028cc3b5dd88bf0

Signature · 1 line
2.30.2