lists.openwall.net   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  linux-hardening  linux-cve-announce  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:   Mon, 7 Aug 2017 11:18:18 -0400
From:   Jessie Frazelle <jessfraz@...gle.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Aleksa Sarai <asarai@...e.com>, Ingo Molnar <mingo@...hat.com>,
        "Eric W. Biederman" <ebiederm@...ssion.com>, cyphar@...har.com,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

Thanks for patching this :) Guess I will find a different rabbit in a
hat to detect if running in a pid namespace ;)

On Mon, Aug 7, 2017 at 4:44 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Sun, Aug 06, 2017 at 02:41:41PM +1000, Aleksa Sarai wrote:
>> It appears as though the addition of the PID namespace did not update
>> the output code for /proc/*/sched, which resulted in it providing PIDs
>> that were not self-consistent with the /proc mount. This additionally
>> made it trivial to detect whether a process was inside &init_pid_ns from
>> userspace (making container detection trivial[1]). This lead to
>> situations such as:
>>
>>   % unshare -pmf
>>   % mount -t proc proc /proc
>>   % head -n1 /proc/1/sched
>>   head (10047, #threads: 1)
>>
>> Fix this by just using task_pid_nr_ns for the output of /proc/*/sched.
>> All of the other uses of task_pid_nr in kernel/sched/debug.c are from a
>> sysctl context and thus don't need to be namespaced.
>>
>> [1]: https://github.com/jessfraz/amicontained
>>
>> Cc: <stable@...r.kernel.org>
>> Cc: Jess Frazelle <acidburn@...gle.com>
>> Signed-off-by: Aleksa Sarai <asarai@...e.com>
>
> Thanks!

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4847 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ