From: Greg KH <gregkh@linuxfoundation.org>
To: Kasper Zwijsen <Kasper.Zwijsen@ugent.be>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"security@kernel.org" <security@kernel.org>,
stable@vger.kernel.org
Subject: Re: Semantic Bug: Privilege Bypass in timerfd for 4.4.y
Date: Fri, 30 Apr 2021 13:40:05 +0200 [thread overview]
Message-ID: <YIvslbdvfnwANjge@kroah.com> (raw)
In-Reply-To: <PR2PR09MB3180C560FF0F6CAEE9654A47F85E9@PR2PR09MB3180.eurprd09.prod.outlook.com>
On Fri, Apr 30, 2021 at 10:57:59AM +0000, Kasper Zwijsen wrote:
> Dear Thomas Gleixner,
>
>
> I believe I have found a semantic security bug in the form of a missing capability check in the timerfd_create and timerfd_settime system calls for the 4.4.y LTS kernel.
>
> In this commit: https://github.com/torvalds/linux/commit/2895a5e5b3ae78d9923a91fce405d4a2f32c4309,
> capability checks for CAP_WAKE_ALARM were added for creating and setting a CLOCK_BOOTTIME_ALARM and CLOCK_REALTIME_ALARM.
> This security patch was applied to all but one LTS kernel, namely 4.4.y.
That is because it showed up in the 4.8 release, there was nothing to
"apply" to any newer kernels :)
> It is therefore still possible for a user process without any privileges to create and set such a timer, resulting in the process being able to wake up the system.
>
> The man pages state that creating or setting such a timer requires privileges. Similarly, the timer_create system call does check the correct permissions.
> I therefore believe this is unintended and a semantic bug.
> I have tested the original patch and found that it can simply be applied to the latest 4.4.y kernel (4.4.268 as of right now) without any issues.
> The patch: https://lore.kernel.org/patchwork/patch/686888/
I've now queued this up for the next 4.4.y release. In the future, you
should just email the stable@vger.kernel.org address any git commit ids
that you feel need to be backported.
thanks!
greg k-h
parent reply other threads:[~2021-04-30 11:40 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <PR2PR09MB3180C560FF0F6CAEE9654A47F85E9@PR2PR09MB3180.eurprd09.prod.outlook.com>]
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=YIvslbdvfnwANjge@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Kasper.Zwijsen@ugent.be \
--cc=linux-kernel@vger.kernel.org \
--cc=security@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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