From: Greg Kroah-Hartman Date: Mon, 6 Sep 2021 08:07:11 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v5.10.63~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bfb46f7e82e6a5722232688b60ee87b29ba49798;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch --- diff --git a/queue-4.19/alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch b/queue-4.19/alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch new file mode 100644 index 00000000000..ea9cec91fb2 --- /dev/null +++ b/queue-4.19/alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch @@ -0,0 +1,35 @@ +From f3eef46f0518a2b32ca1244015820c35a22cfe4a Mon Sep 17 00:00:00 2001 +From: Zubin Mithra +Date: Fri, 27 Aug 2021 08:37:35 -0700 +Subject: ALSA: pcm: fix divide error in snd_pcm_lib_ioctl + +From: Zubin Mithra + +commit f3eef46f0518a2b32ca1244015820c35a22cfe4a upstream. + +Syzkaller reported a divide error in snd_pcm_lib_ioctl. fifo_size +is of type snd_pcm_uframes_t(unsigned long). If frame_size +is 0x100000000, the error occurs. + +Fixes: a9960e6a293e ("ALSA: pcm: fix fifo_size frame calculation") +Signed-off-by: Zubin Mithra +Reviewed-by: Guenter Roeck +Cc: +Link: https://lore.kernel.org/r/20210827153735.789452-1-zsm@chromium.org +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/pcm_lib.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/core/pcm_lib.c ++++ b/sound/core/pcm_lib.c +@@ -1751,7 +1751,7 @@ static int snd_pcm_lib_ioctl_fifo_size(s + channels = params_channels(params); + frame_size = snd_pcm_format_size(format, channels); + if (frame_size > 0) +- params->fifo_size /= (unsigned)frame_size; ++ params->fifo_size /= frame_size; + } + return 0; + } diff --git a/queue-4.19/series b/queue-4.19/series index 7afd332fd8e..4e6baa6d828 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -8,3 +8,4 @@ perf-x86-intel-pt-fix-mask-of-num_address_ranges.patch perf-x86-amd-ibs-work-around-erratum-1197.patch cryptoloop-add-a-deprecation-warning.patch arm-8918-2-only-build-return_address-if-needed.patch +alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch