]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Sep 2021 08:06:55 +0000 (10:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Sep 2021 08:06:55 +0000 (10:06 +0200)
added patches:
alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch

queue-4.14/alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch b/queue-4.14/alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch
new file mode 100644 (file)
index 0000000..0f18126
--- /dev/null
@@ -0,0 +1,35 @@
+From f3eef46f0518a2b32ca1244015820c35a22cfe4a Mon Sep 17 00:00:00 2001
+From: Zubin Mithra <zsm@chromium.org>
+Date: Fri, 27 Aug 2021 08:37:35 -0700
+Subject: ALSA: pcm: fix divide error in snd_pcm_lib_ioctl
+
+From: Zubin Mithra <zsm@chromium.org>
+
+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 <zsm@chromium.org>
+Reviewed-by: Guenter Roeck <groeck@chromium.org>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20210827153735.789452-1-zsm@chromium.org
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -1757,7 +1757,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;
+ }
index 7ed35100365e1587e23aa4aa28a0c1011eae3ab0..e7c924bc6ae21d47a048f88859c2f667626166e1 100644 (file)
@@ -7,3 +7,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