alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH] ASoC: compress: fix unsigned integer overflow check
@ 2019-10-21  9:54 Srinivas Kandagatla
  2019-10-21 10:45 ` Vinod Koul
  2019-10-21 18:00 ` [alsa-devel] Applied "ASoC: compress: fix unsigned integer overflow check" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2019-10-21  9:54 UTC (permalink / raw)
  To: broonie, vkoul, tiwai
  Cc: Srinivas Kandagatla, alsa-devel, bgoswami, Xiaojun Sang, spapothi

From: Xiaojun Sang <xsang@codeaurora.org>

Parameter fragments and fragment_size are type of u32. U32_MAX is
the correct check.

Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/core/compress_offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 41905afada63..f34ce564d92c 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -528,7 +528,7 @@ static int snd_compress_check_input(struct snd_compr_params *params)
 {
 	/* first let's check the buffer parameter's */
 	if (params->buffer.fragment_size == 0 ||
-	    params->buffer.fragments > INT_MAX / params->buffer.fragment_size ||
+	    params->buffer.fragments > U32_MAX / params->buffer.fragment_size ||
 	    params->buffer.fragments == 0)
 		return -EINVAL;
 
-- 
2.21.0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: compress: fix unsigned integer overflow check
  2019-10-21  9:54 [alsa-devel] [PATCH] ASoC: compress: fix unsigned integer overflow check Srinivas Kandagatla
@ 2019-10-21 10:45 ` Vinod Koul
  2019-10-21 18:00 ` [alsa-devel] Applied "ASoC: compress: fix unsigned integer overflow check" to the asoc tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2019-10-21 10:45 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: alsa-devel, bgoswami, spapothi, tiwai, broonie, Xiaojun Sang

On 21-10-19, 10:54, Srinivas Kandagatla wrote:
> From: Xiaojun Sang <xsang@codeaurora.org>
> 
> Parameter fragments and fragment_size are type of u32. U32_MAX is
> the correct check.

Acked-by: Vinod Koul <vkoul@kernel.org>

> Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/core/compress_offload.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
> index 41905afada63..f34ce564d92c 100644
> --- a/sound/core/compress_offload.c
> +++ b/sound/core/compress_offload.c
> @@ -528,7 +528,7 @@ static int snd_compress_check_input(struct snd_compr_params *params)
>  {
>  	/* first let's check the buffer parameter's */
>  	if (params->buffer.fragment_size == 0 ||
> -	    params->buffer.fragments > INT_MAX / params->buffer.fragment_size ||
> +	    params->buffer.fragments > U32_MAX / params->buffer.fragment_size ||
>  	    params->buffer.fragments == 0)
>  		return -EINVAL;
>  
> -- 
> 2.21.0

-- 
~Vinod
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [alsa-devel] Applied "ASoC: compress: fix unsigned integer overflow check" to the asoc tree
  2019-10-21  9:54 [alsa-devel] [PATCH] ASoC: compress: fix unsigned integer overflow check Srinivas Kandagatla
  2019-10-21 10:45 ` Vinod Koul
@ 2019-10-21 18:00 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-10-21 18:00 UTC (permalink / raw)
  To: Xiaojun Sang
  Cc: alsa-devel, bgoswami, spapothi, tiwai, vkoul, Mark Brown,
	Srinivas Kandagatla

The patch

   ASoC: compress: fix unsigned integer overflow check

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From d3645b055399538415586ebaacaedebc1e5899b0 Mon Sep 17 00:00:00 2001
From: Xiaojun Sang <xsang@codeaurora.org>
Date: Mon, 21 Oct 2019 10:54:32 +0100
Subject: [PATCH] ASoC: compress: fix unsigned integer overflow check

Parameter fragments and fragment_size are type of u32. U32_MAX is
the correct check.

Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20191021095432.5639-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/core/compress_offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 99b882158705..942af8c29b79 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -528,7 +528,7 @@ static int snd_compress_check_input(struct snd_compr_params *params)
 {
 	/* first let's check the buffer parameter's */
 	if (params->buffer.fragment_size == 0 ||
-	    params->buffer.fragments > INT_MAX / params->buffer.fragment_size ||
+	    params->buffer.fragments > U32_MAX / params->buffer.fragment_size ||
 	    params->buffer.fragments == 0)
 		return -EINVAL;
 
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-21 18:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21  9:54 [alsa-devel] [PATCH] ASoC: compress: fix unsigned integer overflow check Srinivas Kandagatla
2019-10-21 10:45 ` Vinod Koul
2019-10-21 18:00 ` [alsa-devel] Applied "ASoC: compress: fix unsigned integer overflow check" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).