]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
timer/debug: Change /proc/timer_stats from 0644 to 0600
authorBen Hutchings <ben@decadent.org.uk>
Tue, 7 May 2019 19:04:04 +0000 (20:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2019 07:17:21 +0000 (09:17 +0200)
commitb784e7a613d1df6f80ff229ec5d8ce45fb7222df
treea82c2a9e2248c8df53ef6a02cb896a996ff2cf68
parentb16a6c99f88c16c9b4f736226b736d0c53320614
timer/debug: Change /proc/timer_stats from 0644 to 0600

The timer_stats facility should filter and translate PIDs if opened
from a non-initial PID namespace, to avoid leaking information about
the wider system.  It should also not show kernel virtual addresses.
Unfortunately it has now been removed upstream (as redundant)
instead of being fixed.

For stable, fix the leak by restricting access to root only.  A
similar change was already made for the /proc/timer_list file.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/time/timer_stats.c