lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Sep 2018 19:37:14 -0400
From:   TongZhang <>
To:     Cyrill Gorcunov <>
Cc:     Greg KH <>,,,,,,,,,
        LKML <>,
Subject: Re: different capability from different namespace required for

I can see there are two problems,

First: In kernel/sys.c:2117  capable(CAP_SYS_RESOURCE), seems that ns_capable should be used to check capability against user namespace, instead of init_user_ns. Because a  process in a user namespace may call prctl system call and this should be checked against their user namespace capability instead of init_user_ns capability.

Second: They should both require CAP_SYS_RESOURCE or CAP_SYS_ADMIN, is there any particular reasons for requiring different privilege?

> On Sep 25, 2018, at 2:34 PM, Cyrill Gorcunov <> wrote:
> On Tue, Sep 25, 2018 at 07:37:45PM +0200, Greg KH wrote:
>> On Tue, Sep 25, 2018 at 01:26:55PM -0400, Tong Zhang wrote:
>>> Kernel Version: 4.18.5
>>> Problem Description:
>>> We discovered inconsistent check when using prctl_set_mm_exe_file(), which is used to setup exe file link.
>>> It is required to have capable(CAP_SYS_RESOURCE) in prctl_set_mm().
>>> while ns_capable(CAP_SYS_ADMIN) in prctl_set_mm_map().
>>> There are two differences:
>>> 1)requiring capability from: user namespace, init namespace.
>>> 2)capability bit required is different
>> Can you submit a patch showing what you think is the correct fix here?
> It is done this way on purpose. The prctl_set_mm_map is a complex call
> which carries a bunch of parameters and allowed if you're inside user-ns admin,
> in turn prctl_set_mm allows to modify settings one by one. So no, it is not
> an error but rather call specifics.

Powered by blists - more mailing lists