clocksource/drivers/timer-sun4i: Advertise a real minimum delta
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 12e1480bcb4920c1b02b3793cb48756497919a60 · < bf38be01d43c4e4ca903aff7236d8486a950a252| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
clocksource/drivers/timer-sun4i: Advertise a real minimum delta
sun4i_clkevt_next_event() compensates for the timer stop/start synchronization delay by programming evt - TIMER_SYNC_TICKS into the hardware interval register. The clockevent device currently advertises TIMER_SYNC_TICKS as min_delta_ticks, so the clockevents core is allowed to call set_next_event() with evt == TIMER_SYNC_TICKS.
That programs a zero-tick interval. With oneshot/highres/nohz timer operation this can leave the next event stuck, which was observed as a boot hang on Allwinner D1 after the clockevents core started reusing forced minimum-delta events.
Advertise one extra tick instead, so the smallest event accepted by the core still programs at least one hardware tick after the synchronization compensation.
From the CVE record · Linux
The Linux kernel’s timer-sun4i driver can program a zero-tick timer interval when the clockevents core requests the advertised minimum delta. Under oneshot, high-resolution, or nohz timer operation, the next event can become stuck; this was observed as a boot hang on Allwinner D1. No attacker-triggered path is described.
Engineers running the Linux kernel with the timer-sun4i driver should check their deployments; affected versions are not specified.