Skip to content
Commit 4352d9d4 authored by Richard Cochran's avatar Richard Cochran Committed by Linus Torvalds
Browse files

ntp: fix non privileged system time shifting



The ADJ_SETOFFSET bit added in commit 094aa188 ("ntp: Add ADJ_SETOFFSET
mode bit") also introduced a way for any user to change the system time.
Sneaky or buggy calls to adjtimex() could set

    ADJ_OFFSET_SS_READ | ADJ_SETOFFSET

which would result in a successful call to timekeeping_inject_offset().
This patch fixes the issue by adding the capability check.

Signed-off-by: default avatarRichard Cochran <richard.cochran@omicron.at>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b3b896c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment