linux-stable/sound
Takashi Iwai 83f0ba8592 ALSA: timer: Set lower bound of start tick time
commit 4a63bd179f upstream.

Currently ALSA timer doesn't have the lower limit of the start tick
time, and it allows a very small size, e.g. 1 tick with 1ns resolution
for hrtimer.  Such a situation may lead to an unexpected RCU stall,
where  the callback repeatedly queuing the expire update, as reported
by fuzzer.

This patch introduces a sanity check of the timer start tick time, so
that the system returns an error when a too small start size is set.
As of this patch, the lower limit is hard-coded to 100us, which is
small enough but can still work somehow.

Reported-by: syzbot+43120c2af6ca2938cc38@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/000000000000fa00a1061740ab6d@google.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240514182745.4015-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[ backport note: the error handling is changed, as the original commit
  is based on the recent cleanup with guard() in commit beb45974dd
  -- tiwai ]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:39:52 +02:00
..
ac97
aoa ALSA: aoa: Fix I2S device accounting 2022-11-03 23:59:18 +09:00
arm
atmel
core ALSA: timer: Set lower bound of start tick time 2024-06-16 13:39:52 +02:00
drivers ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt 2022-12-31 13:14:16 +01:00
firewire ALSA: firewire-lib: handle quirk to calculate payload quadlets as data block counter 2024-04-13 13:01:45 +02:00
hda ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node() 2024-05-17 11:50:49 +02:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-04-20 12:13:51 +02:00
isa
mips
oss sound/oss/dmasound: fix 'dmasound_setup' defined but not used 2023-05-11 23:00:40 +09:00
parisc
pci ALSA: hda/realtek: Fix mute led of HP Laptop 15-da3001TU 2024-05-17 11:51:03 +02:00
pcmcia
ppc
sh ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs 2024-04-10 16:19:32 +02:00
soc ASoC: tas2552: Add TX path for capturing AUDIO-OUT data 2024-06-16 13:39:46 +02:00
sparc
spi
synth ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control() 2023-02-14 19:17:56 +01:00
usb ALSA: line6: Zero-initialize message buffers 2024-05-17 11:50:53 +02:00
virtio
x86
xen
ac97_bus.c
Kconfig um: Fix hostaudio build errors 2023-09-19 12:22:49 +02:00
last.c
Makefile
sound_core.c