linux-stable/sound
Takashi Iwai ceab795a67 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-12 11:03:59 +02:00
..
ac97
aoa ALSA: aoa: Fix I2S device accounting 2022-10-27 08:53:08 +02:00
arm ALSA: arm: pxa: pxa2xx-ac97-lib: fix return value check of platform_get_irq() 2022-10-29 10:45:27 +02:00
atmel
core ALSA: timer: Set lower bound of start tick time 2024-06-12 11:03:59 +02:00
drivers ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt 2022-12-31 13:32:22 +01:00
firewire ALSA: firewire-lib: handle quirk to calculate payload quadlets as data block counter 2024-04-13 13:05:09 +02:00
hda ALSA: hda: intel-dsp-config: harden I2C/I2S codec detection 2024-06-12 11:03:02 +02:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-04-20 12:35:05 +02:00
isa ALSA: gus: Fix kctl->id initialization 2023-06-14 11:15:24 +02:00
mips
oss
parisc
pci ALSA: hda/realtek: Adjust G814JZR to use SPI init for amp 2024-06-12 11:03:56 +02:00
pcmcia
ppc sound updates for 6.1-rc1 2022-10-05 12:02:07 -07:00
sh ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs 2024-04-03 15:19:50 +02:00
soc ASoC: tas2552: Add TX path for capturing AUDIO-OUT data 2024-06-12 11:03:50 +02:00
sparc
spi
synth ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control() 2023-02-14 19:11:41 +01:00
usb ALSA: line6: Zero-initialize message buffers 2024-05-17 11:56:05 +02:00
virtio
x86
xen
ac97_bus.c
Kconfig um: Fix hostaudio build errors 2023-09-13 09:42:58 +02:00
last.c
Makefile
sound_core.c