Ubuntu-focal-kernel/kernel/time
Phil Chang 08f93c7aaa hrtimer: Prevent queuing of hrtimer without a function callback
BugLink: https://bugs.launchpad.net/bugs/2080595

[ Upstream commit 5a830bbce3af16833fe0092dec47b6dd30279825 ]

The hrtimer function callback must not be NULL. It has to be specified by
the call side but it is not validated by the hrtimer code. When a hrtimer
is queued without a function callback, the kernel crashes with a null
pointer dereference when trying to execute the callback in __run_hrtimer().

Introduce a validation before queuing the hrtimer in
hrtimer_start_range_ns().

[anna-maria: Rephrase commit message]

Signed-off-by: Phil Chang <phil.chang@mediatek.com>
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2024-09-27 10:50:25 +02:00
..
Kconfig
Makefile
alarmtimer.c alarmtimer: Prevent starvation by small intervals and SIG_IGN 2023-04-18 17:21:05 +02:00
clockevents.c
clocksource.c
hrtimer.c hrtimer: Prevent queuing of hrtimer without a function callback 2024-09-27 10:50:25 +02:00
itimer.c
jiffies.c timekeeping: Split jiffies seqlock 2023-08-09 12:25:16 +02:00
ntp.c ntp: Safeguard against time_constant overflow 2024-09-27 10:50:20 +02:00
ntp_internal.h
posix-clock.c
posix-cpu-timers.c
posix-stubs.c timers: Prevent union confusion from unexpected restart_syscall() 2023-05-12 17:15:06 +02:00
posix-timers.c posix-timers: Ensure timer ID search-loop limit is valid 2023-10-02 12:12:15 +02:00
posix-timers.h
sched_clock.c
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c tick/broadcast: Move per CPU pointer access into the atomic section 2024-09-27 10:50:20 +02:00
tick-common.c tick/nohz_full: Don't abuse smp_call_function_single() in tick_setup_device() 2024-08-02 16:16:17 +02:00
tick-internal.h tick: Get rid of tick_period 2023-08-09 12:25:16 +02:00
tick-oneshot.c
tick-sched.c tick/sched: Preserve number of idle sleeps across CPU hotplug events 2024-03-28 15:18:33 +01:00
tick-sched.h
time.c
timeconst.bc
timeconv.c
timecounter.c
timekeeping.c timekeeping: Fix cross-timestamp interpolation for non-x86 2024-06-07 15:01:24 +02:00
timekeeping.h timekeeping: Split jiffies seqlock 2023-08-09 12:25:16 +02:00
timekeeping_debug.c
timekeeping_internal.h
timer.c timers: Rename del_timer_sync() to timer_delete_sync() 2024-06-07 15:01:32 +02:00
timer_list.c
vsyscall.c