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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220128133147.GL1978@kadam>
Date:   Fri, 28 Jan 2022 16:31:47 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/2] ASoC: ops: fix signedness bug in snd_soc_put_volsw()

On Fri, Jan 28, 2022 at 12:42:04PM +0000, Mark Brown wrote:
> On Fri, Jan 28, 2022 at 02:20:07PM +0300, Dan Carpenter wrote:
> > The "val" and "val2" variables need to signed for the checking to work
> > as intended.
> 
> This means that the helpers won't support controls that use the top bit
> of a 32 bit register.

Fine, I can delete the checks for negative instead (I'm surprised you
haven't already received a dozen bot emails about this).

I haven't been able to figure out where mc->min/max are set.  In
snd_soc_get_xr_sx() it checks whether "mc->min" is negative.

	if (min < 0 && val > max)
		val |= ~mask;

Is that a bug?  If mc->min is negative the math gets tricky.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ