]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
timerfd: Reject ALARM timerfds without CAP_WAKE_ALARM
authorEric Caruso <ejcaruso@google.com>
Wed, 8 Jun 2016 23:08:59 +0000 (16:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:38:16 +0000 (10:38 +0200)
commitc520dfc66f8bad5cd8534aeb3cf60178d3bb525d
treed935dd18fe717350146c9e6a5b37758185f40e92
parent47127fcd287c91397d11bcf697d12c79169528f2
timerfd: Reject ALARM timerfds without CAP_WAKE_ALARM

commit 2895a5e5b3ae78d9923a91fce405d4a2f32c4309 upstream.

timerfd gives processes a way to set wake alarms, but unlike timers made using
timer_create, timerfds don't check whether the process has CAP_WAKE_ALARM
before setting alarm-time timers. CAP_WAKE_ALARM is supposed to gate this
behavior and so it makes sense that we should deny permission to create such
timerfds if the process doesn't have this capability.

Signed-off-by: Eric Caruso <ejcaruso@google.com>
Cc: Todd Poynor <toddpoynor@google.com>
Link: http://lkml.kernel.org/r/1465427339-96209-1-git-send-email-ejcaruso@chromium.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kasper Zwijsen <Kasper.Zwijsen@UGent.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/timerfd.c