android_kernel_xiaomi_sm8450/sound
Takashi Iwai bdd0aa055b ALSA: timer: Set lower bound of start tick time
commit 4a63bd179fa8d3fcc44a0d9d71d941ddd62f0c4e 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 beb45974dd49
  -- tiwai ]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:32:30 +02:00
..
ac97 ALSA: ac97: fix PM reference leak in ac97_bus_remove() 2021-07-20 16:05:40 +02:00
aoa ALSA: aoa: Fix I2S device accounting 2022-11-03 23:57:53 +09:00
arm amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
atmel ALSA: atmel: ac97: clarify operator precedence 2020-09-03 09:27:34 +02:00
core ALSA: timer: Set lower bound of start tick time 2024-06-16 13:32:30 +02:00
drivers ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt 2023-01-14 10:15:38 +01:00
firewire ALSA: firewire-digi00x: prevent potential use after free 2023-05-30 12:57:51 +01:00
hda ALSA: hda: intel-dspcfg: add filters for ARL-S and ARL 2024-02-23 08:42:12 +01:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-04-20 12:10:24 +02:00
isa ALSA: wavefront: Proper check of get_user() error 2022-05-25 09:17:55 +02:00
mips hal2: convert to dma_alloc_noncoherent 2020-09-25 06:20:44 +02:00
oss sound/oss/dmasound: fix 'dmasound_setup' defined but not used 2023-05-17 11:48:08 +02:00
parisc sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
pci ALSA: hda/realtek: Fix mute led of HP Laptop 15-da3001TU 2024-05-17 11:48:09 +02:00
pcmcia ALSA: Use fallthrough pseudo-keyword 2020-07-09 13:01:29 +02:00
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-07-20 16:05:43 +02:00
sh ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs 2024-04-13 12:59:06 +02:00
soc ASoC: tas2552: Add TX path for capturing AUDIO-OUT data 2024-06-16 13:32:26 +02:00
sparc ALSA: sparc: dbri: fix repeated word 'the' 2020-10-17 09:58:35 +02:00
spi ALSA: spi: Add check for clk_enable() 2022-04-08 14:40:08 +02:00
synth ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control() 2023-02-15 17:22:22 +01:00
usb ALSA: line6: Zero-initialize message buffers 2024-05-17 11:48:03 +02:00
x86 ALSA: intel_hdmi: Fix reference to PCM buffer address 2022-03-08 19:09:31 +01:00
xen ALSA: xen: Remove superfluous fall through comments 2020-07-09 19:10:37 +02:00
ac97_bus.c
Kconfig um: Fix hostaudio build errors 2023-09-19 12:20:20 +02:00
last.c
Makefile
sound_core.c