From: Takashi Iwai <tiwai@suse.de>
To: shyckless@gmail.com
Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: emu10k1: Require CAP_SYS_ADMIN for SNDRV_EMU10K1_IOCTL_PCM_POKE
Date: Mon, 23 Nov 2026 10:49:30 +0100 [thread overview]
Message-ID: <87h5h7dgid.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261123-emu10k1-pcm-poke-v1-1-097b8cb8daaf@gmail.com>
On Mon, 23 Nov 2026 01:36:20 +0100,
Suyuan Wang via B4 Relay wrote:
>
> From: Suyuan Wang <stevewong@hust.edu.cn>
>
> snd_emu10k1_fx8010_ioctl() requires CAP_SYS_ADMIN for the commands that
> change the FX8010 DSP state: CODE_POKE, TRAM_SETUP, STOP, CONTINUE,
> ZERO_TRAM_COUNTER and SINGLE_STEP. PCM_POKE has no such check, although
> it changes the card's FX8010 PCM configuration. snd_emu10k1_ipcm_poke()
> stores the GPR and TRAM indices given by the caller without checking
> them, and the FX8010 PCM code in emupcm.c later uses them as register
> offsets:
>
> snd_emu10k1_ptr_write(emu,
> TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], ...);
> snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1);
>
> So a process that can open the hwdep device can change this card-wide
> configuration, including which registers the PCM code writes, while the
> other DSP configuration commands are limited to CAP_SYS_ADMIN.
>
> Require CAP_SYS_ADMIN for PCM_POKE too, like the other FX8010
> configuration commands.
>
> Found with a static analysis tool and checked by hand.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Co-developed-by: Kaixuan Li <kaixuan.li@ntu.edu.sg>
> Signed-off-by: Kaixuan Li <kaixuan.li@ntu.edu.sg>
> Signed-off-by: Suyuan Wang <stevewong@hust.edu.cn>
Applied to for-next branch. Thanks.
Takashi
prev parent reply other threads:[~2026-11-23 9:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 0:36 [PATCH] ALSA: emu10k1: Require CAP_SYS_ADMIN for SNDRV_EMU10K1_IOCTL_PCM_POKE Suyuan Wang via B4 Relay
2026-11-23 0:36 ` Suyuan Wang
2026-11-23 9:49 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h5h7dgid.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shyckless@gmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.