mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/8] ALSA: check snd_ctl_new1() return before dereferencing
@ 2026-06-07  2:56 Ruoyu Wang
  2026-06-07  2:56 ` [PATCH] ALSA: es18xx: check control allocation before private data setup Ruoyu Wang
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Ruoyu Wang @ 2026-06-07  2:56 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel, linux-kernel, Ruoyu Wang

Several ALSA drivers dereference the pointer returned by snd_ctl_new1()
to adjust id.device, id.index, or store bookkeeping pointers before
calling snd_ctl_add().  snd_ctl_new1() can return NULL on allocation
failure, making these writes a NULL pointer dereference.

This series adds NULL checks to all affected call sites found by static
analysis.

Ruoyu Wang (8):
  ALSA: es18xx: check control allocation before private data setup
  ALSA: gus: check PCM volume control allocation
  ALSA: cmipci: check S/PDIF control allocations
  ALSA: es1938: check control allocation before private data setup
  ALSA: ice1712: aureon: check CS8415 control allocation
  ALSA: ice1712: check pro S/PDIF control allocations
  ALSA: ice1724: check S/PDIF control allocations
  ALSA: ymfpci: check S/PDIF control allocations

 sound/isa/es18xx.c              | 4 ++++
 sound/isa/gus/gus_pcm.c        | 2 ++
 sound/pci/cmipci.c             | 6 ++++++
 sound/pci/es1938.c             | 2 ++
 sound/pci/ice1712/aureon.c     | 2 ++
 sound/pci/ice1712/ice1712.c    | 8 ++++++++
 sound/pci/ice1712/ice1724.c    | 6 ++++++
 sound/pci/ymfpci/ymfpci_main.c | 6 ++++++
 8 files changed, 36 insertions(+)

--
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-06-07  7:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-07  2:56 [PATCH 0/8] ALSA: check snd_ctl_new1() return before dereferencing Ruoyu Wang
2026-06-07  2:56 ` [PATCH] ALSA: es18xx: check control allocation before private data setup Ruoyu Wang
2026-06-07  2:56 ` [PATCH] ALSA: gus: check PCM volume control allocation Ruoyu Wang
2026-06-07  2:56 ` [PATCH] ALSA: cmipci: check S/PDIF control allocations Ruoyu Wang
2026-06-07  2:56 ` [PATCH] ALSA: es1938: check control allocation before private data setup Ruoyu Wang
2026-06-07  2:56 ` [PATCH] ALSA: ice1712: aureon: check CS8415 control allocation Ruoyu Wang
2026-06-07  2:56 ` [PATCH] ALSA: ice1712: check pro S/PDIF control allocations Ruoyu Wang
2026-06-07  2:56 ` [PATCH] ALSA: ice1724: check " Ruoyu Wang
2026-06-07  2:56 ` [PATCH] ALSA: ymfpci: " Ruoyu Wang
2026-06-07  7:27 ` [PATCH 0/8] ALSA: check snd_ctl_new1() return before dereferencing Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®