Re: [PATCH] timekeeping: Require permission to set auxiliary clocks

From: shaos

Date: Mon Oct 19 2026 - 22:08:52 EST


I tested this patch on x86_64 using QEMU TCG, with the reproduction
configuration and PoC from my report. The patch applied cleanly to
c03c1a14507dfaf8b856c2608f9ac216021fc222, and the kernel built and
booted successfully.

With the patch applied, an unprivileged process (uid 65534, with
CapEff=0) receives EPERM when calling clock_settime(CLOCK_AUX0) after
the clock has been enabled. An additional privileged control call
successfully set CLOCK_AUX0. The CLOCK_REALTIME settime and
CLOCK_AUX0 adjtime controls returned EPERM as expected.

For completeness, setting the disabled CLOCK_AUX1 as an unprivileged
caller also returned EPERM; the permission check runs before the
enabled-clock check.

Tested-by: shaos <shawnq1@xxxxxxx>