[PATCH] ASoC: rt1011: fix KASAN out-of-bounds bug in find_next_bit()

Mark Brown broonie at kernel.org
Tue Jun 23 14:39:09 CEST 2020


On Mon, 22 Jun 2020 10:13:48 -0500, Pierre-Louis Bossart wrote:
> KASAN throws the following warning in rt1011.c:
> [ 170.777603] BUG: KASAN: stack-out-of-bounds in _find_next_bit.constprop.0+0x3e/0xf0
> 
> find_next_bit() relies on unsigned long pointer arguments, but this driver
> uses a type cast that generates the KASAN warning. Replace find_next_bit()
> and find_last_bit() with __ffs() and __fls() to pass the value and avoid
> casting pointers to make the warning go away.

Applied to

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

Thanks!

[1/1] ASoC: rt1011: fix KASAN out-of-bounds bug in find_next_bit()
      commit: ee8a41cd30a99b39bd5d46280cc778e275cd2390

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


More information about the Alsa-devel mailing list