lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zs3F4Xp/2WfTJjli@duo.ucw.cz>
Date: Tue, 27 Aug 2024 14:26:09 +0200
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Takashi Iwai <tiwai@...e.de>, Paul Menzel <pmenzel@...gen.mpg.de>,
	Jaroslav Kysela <perex@...ex.cz>, tiwai@...e.com,
	linux-sound@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 5.10 26/38] ALSA: vmaster: Return error for
 invalid input values

Hi!

> From: Takashi Iwai <tiwai@...e.de>
> 
> [ Upstream commit 10457f5042b4890a667e2f15a2e783490dda44d2 ]
> 
> So far the vmaster code has been tolerant about the input values and
> accepts any values by correcting internally.  But now our own selftest
> starts complaining about this behavior, so let's be picky and change
> the behavior to return -EINVAL for invalid input values instead.

Does it fix a bug serious enough for -stable?

Best regards,
								Pavel

> +++ b/sound/core/vmaster.c
> @@ -204,6 +204,12 @@ static int follower_put(struct snd_kcontrol *kcontrol,
>  	err = follower_init(follower);
>  	if (err < 0)
>  		return err;
> +	for (ch = 0; ch < follower->info.count; ch++) {
> +		if (ucontrol->value.integer.value[ch] < follower->info.min_val ||
> +		    ucontrol->value.integer.value[ch] > follower->info.max_val)
> +			return -EINVAL;
> +	}
> +
>  	for (ch = 0; ch < follower->info.count; ch++) {
>  		if (follower->vals[ch] != ucontrol->value.integer.value[ch]) {
>  			changed = 1;
> @@ -344,6 +350,8 @@ static int master_put(struct snd_kcontrol *kcontrol,
>  	new_val = ucontrol->value.integer.value[0];
>  	if (new_val == old_val)
>  		return 0;
> +	if (new_val < master->info.min_val || new_val > master->info.max_val)
> +		return -EINVAL;
>  
>  	err = sync_followers(master, old_val, new_val);
>  	if (err < 0)

-- 
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ