mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Kees Cook <keescook@google.com>
Cc: Xing Gao <xgao01@email.wm.edu>,
	LKML <linux-kernel@vger.kernel.org>,
	"kernel-hardening@lists.openwall.com" 
	<kernel-hardening@lists.openwall.com>,
	Jessica Frazelle <me@jessfraz.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: /proc/timer_list leaks the real pids of the associated processes
Date: Tue, 7 Feb 2017 23:48:45 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1702072344520.8117@nanos> (raw)
In-Reply-To: <CAGXu5j+qgNMP1jt1-cssuY5qNkSPDde5MzH9YQUcuLepbHX0jg@mail.gmail.com>

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.

Thanks,

	tglx
.

  reply	other threads:[~2017-02-07 22:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJwLwmYQt2ae_Y-TDXhPGsX5im29ATwwKmg3FtUC=6HjrzH4HA@mail.gmail.com>
2017-02-03 23:44 ` Kees Cook
2017-02-07 22:48   ` Thomas Gleixner [this message]
2017-02-07 22:56     ` Jessica Frazelle
2017-02-08  9:47       ` Thomas Gleixner
2017-02-07 23:24     ` Kees Cook
2017-02-07 23:34       ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1702072344520.8117@nanos \
    --to=tglx@linutronix.de \
    --cc=ebiederm@xmission.com \
    --cc=keescook@google.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@jessfraz.com \
    --cc=xgao01@email.wm.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®