mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Budnik <abud...@mesosphere.com>
Subject Re: Review Request 70757: Added a privs isolator.
Date Fri, 31 May 2019 10:31:40 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70757/#review215611
-----------------------------------------------------------




src/slave/containerizer/mesos/launch.cpp
Lines 1098 (patched)
<https://reviews.apache.org/r/70757/#comment302360>

    Can this condition ever be `false`, given the isolator assigns `true` in any case?
    
    What is the semantics of `ContainerLaunchInfo::no_new_privileges` flag? How does it work
in pair with the new isolator?



src/slave/containerizer/mesos/launch.cpp
Lines 1099 (patched)
<https://reviews.apache.org/r/70757/#comment302359>

    `PR_SET_NO_NEW_PRIVS` requires Linux kernel 3.5 (according to `man 2 prctl`).
    
    Minimum supported kernel version by Mesos is 2.6.28 - see http://mesos.apache.org/documentation/latest/building/#system-requirements
    
    There are at least 2 options to fix this problem:
    1) bump the minimum kernel version to 3.5, if no one is against it on the dev/user list
    2) remove `include <sys/prctl.h>` and define `PR_SET_NO_NEW_PRIVS` in the `containerizer/mesos/launch.cpp`.
See https://github.com/apache/mesos/blob/fa410f2fb8efb988590f4da2d4cfffbb2ce70637/src/slave/containerizer/mesos/isolators/linux/seccomp.cpp#L35-L41
and https://github.com/seccomp/libseccomp/blob/78497a5d1da200ab0356e1189f5efb8724ad70a1/src/system.h#L94-L97


- Andrei Budnik


On May 31, 2019, 4:02 a.m., Jacob Janco wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70757/
> -----------------------------------------------------------
> 
> (Updated May 31, 2019, 4:02 a.m.)
> 
> 
> Review request for mesos, Andrei Budnik, Gilbert Song, Jie Yu, and James Peach.
> 
> 
> Bugs: MESOS-9770
>     https://issues.apache.org/jira/browse/MESOS-9770
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds the isolation capability of flipping the
> NO_NEW_PRIVILEGES bit for process control.
> 
> 
> Diffs
> -----
> 
>   include/mesos/slave/containerizer.proto b2e35cbf01caea6c1e4f45c7b7d833bc7f065099 
>   src/CMakeLists.txt 1d4f541b73c07a307a8b61f217e0cfad5dc095e4 
>   src/Makefile.am 5f97523fbe2d80733fbdcc7706f2761f5a071f9f 
>   src/slave/containerizer/mesos/containerizer.cpp 043244841a73fa3f5f7119bc38f6d3a04be8990b

>   src/slave/containerizer/mesos/isolators/linux/privs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/linux/privs.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/launch.cpp 0c482f46a97063133edfe29ae3c6a2721d29f6c6 
> 
> 
> Diff: https://reviews.apache.org/r/70757/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jacob Janco
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message