linux/sound
Dan Carpenter 71e60c1701 ASoC: max9759: fix underflow in speaker_gain_control_put()
commit 4c907bcd9dcd233da6707059d777ab389dcbd964 upstream.

Check for negative values of "priv->gain" to prevent an out of bounds
access.  The concern is that these might come from the user via:
  -> snd_ctl_elem_write_user()
    -> snd_ctl_elem_write()
      -> kctl->put()

Fixes: fa8d915172 ("ASoC: max9759: Add Amplifier Driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220119123101.GA9509@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 18:24:33 +01:00
..
ac97 ALSA: ac97: fix PM reference leak in ac97_bus_remove() 2021-07-20 16:10:42 +02:00
aoa ALSA: aoa: onyx: always initialize register read value 2019-07-29 09:21:39 +02:00
arm
atmel
core ALSA: seq: Set upper limit of processed events 2022-01-27 09:19:48 +01:00
drivers ALSA: drivers: opl3: Fix incorrect use of vp->state 2021-12-29 12:23:36 +01:00
firewire ALSA: bebob: add support for ToneWeal FW66 2021-07-20 16:10:45 +02:00
hda ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign() 2021-11-26 10:47:23 +01:00
i2c ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls() 2019-07-26 14:25:37 +02:00
isa ALSA: gus: fix null pointer dereference on pointer block 2021-11-26 10:47:16 +01:00
mips
oss sound: dmasound_atari: Mark expected switch fall-through 2019-07-30 09:36:13 +02:00
parisc
pci ALSA: hda/realtek: Fix silent output on Gigabyte X570 Aorus Xtreme after reboot from Windows 2022-02-08 18:24:27 +01:00
pcmcia
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-07-20 16:10:44 +02:00
sh ALSA: sh: Fix compile warning wrt const 2020-02-24 08:36:42 +01:00
soc ASoC: max9759: fix underflow in speaker_gain_control_put() 2022-02-08 18:24:33 +01:00
sparc ALSA: sparc: Mark expected switch fall-throughs 2019-07-30 09:37:01 +02:00
spi
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-17 09:48:19 +01:00
usb ALSA: usb-audio: Simplify quirk entries with a macro 2022-02-08 18:24:27 +01:00
x86
xen
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c sound: fix a memory leak bug 2019-08-08 08:18:32 +02:00