Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576168

Re: /proc/timer_list leaks the real pids of the associated processes

From Kees Cook <keescook@google.com>
Newsgroups linux.kernel
Subject Re: /proc/timer_list leaks the real pids of the associated processes
Date 2017-02-08 00:30 +0100
Message-ID <t8nmW-ST-23@gated-at.bofh.it> (permalink)
References <t6VM5-g9-11@gated-at.bofh.it> <t6VM5-g9-9@gated-at.bofh.it> <t8mKf-q3-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Feb 7, 2017 at 2:48 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Fri, 3 Feb 2017, Kees Cook wrote:
>
>> On Fri, Feb 3, 2017 at 2:29 PM, Xing Gao <xgao01@email.wm.edu> wrote:
>> > Dear Thomas and Kees,
>> >
>> > I posted a bug report on bugzilla, and John asked me to send it the lkml.
>> >
>> > Here is the link, https://bugzilla.kernel.org/show_bug.cgi?id=193921
>> >
>> > Please cc to me when you reply this email.
>> >
>> > And please check the information below.
>> >
>> > The pseudo file /proc/timer_list leaks the real pids of the associated
>> > processes.
>> >
>> > The function print_timer(kernel/time/timer_list.c) displays
>> > timer->start_pid, which is set inside the function
>> > __timer_stats_timer_set_start_info (kernel/time/timer.c). This is the real
>> > pid, rather than the pid in the pid namespace. If the user within a
>> > container retrieves the content of /proc/timer_list, this file will leak the
>> > real pid of the associated process.
>>
>> I feel like this has been pointed out before, but I can't find the
>> email about it. Regardless, yeah, this looks true:
>>
>>         SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
>>
>>  #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
>>
>> Seems like this should be made namespace aware... (and why is this
>> file needed at all? Seems like it should live in debugfs not proc).
>
> I'm fine with that.
>
> The TIMER_STATS stuff should go away completely. If people are interested
> in that information they can use the tracer which gives way better
> data than that file.

As in, entirely remote CONFIG_TIMER_STATS?

-Kees

-- 
Kees Cook
Pixel Security

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: /proc/timer_list leaks the real pids of the associated processes Kees Cook <keescook@google.com> - 2017-02-04 00:50 +0100
  Re: /proc/timer_list leaks the real pids of the associated  processes Thomas Gleixner <tglx@linutronix.de> - 2017-02-07 23:50 +0100
    Re: /proc/timer_list leaks the real pids of the associated processes Jessica Frazelle <me@jessfraz.com> - 2017-02-08 00:00 +0100
      Re: /proc/timer_list leaks the real pids of the associated  processes Thomas Gleixner <tglx@linutronix.de> - 2017-02-08 10:50 +0100
    Re: /proc/timer_list leaks the real pids of the associated processes Kees Cook <keescook@google.com> - 2017-02-08 00:30 +0100
      Re: /proc/timer_list leaks the real pids of the associated processes Kees Cook <keescook@google.com> - 2017-02-08 00:40 +0100

csiph-web