From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932354AbdBGWtX (ORCPT ); Tue, 7 Feb 2017 17:49:23 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:52471 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752108AbdBGWtV (ORCPT ); Tue, 7 Feb 2017 17:49:21 -0500 Date: Tue, 7 Feb 2017 23:48:45 +0100 (CET) From: Thomas Gleixner To: Kees Cook cc: Xing Gao , LKML , "kernel-hardening@lists.openwall.com" , Jessica Frazelle , "Eric W. Biederman" Subject: Re: /proc/timer_list leaks the real pids of the associated processes In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 3 Feb 2017, Kees Cook wrote: > On Fri, Feb 3, 2017 at 2:29 PM, Xing Gao 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 .