linux-stable/sound
Stephen Lee 80ca762f1b ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw
[ Upstream commit fc563aa900 ]

In snd_soc_info_volsw(), mask is generated by figuring out the index of
the most significant bit set in max and converting the index to a
bitmask through bit shift 1. Unintended wraparound occurs when max is an
integer value with msb bit set. Since the bit shift value 1 is treated
as an integer type, the left shift operation will wraparound and set
mask to 0 instead of all 1's. In order to fix this, we type cast 1 as
`1ULL` to prevent the wraparound.

Fixes: 7077148fb5 ("ASoC: core: Split ops out of soc-core.c")
Signed-off-by: Stephen Lee <slee08177@gmail.com>
Link: https://msgid.link/r/20240326010131.6211-1-slee08177@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-10 16:35:59 +02:00
..
ac97
aoa
arm
atmel
core ALSA: seq: fix function cast warnings 2024-03-26 18:19:47 -04:00
drivers
firewire ALSA: firewire-lib: fix to check cycle continuity 2024-03-06 14:48:39 +00:00
hda ALSA: hda: intel-dspcfg: add filters for ARL-S and ARL 2024-02-05 20:14:27 +00:00
i2c
isa
mips
oss
parisc
pci ALSA: hda: cs35l56: Add ACPI device match tables 2024-04-10 16:35:58 +02:00
pcmcia
ppc
sh ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs 2024-04-03 15:28:59 +02:00
soc ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw 2024-04-10 16:35:59 +02:00
sparc
spi
synth
usb ALSA: usb-audio: Stop parsing channels bits when all channels are found. 2024-03-26 18:19:58 -04:00
virtio
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c