]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: compress_offload: tighten ioctl command number checks
authorArnd Bergmann <arnd@arndb.de>
Thu, 10 Jul 2025 06:30:49 +0000 (08:30 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 10 Jul 2025 08:10:08 +0000 (10:10 +0200)
commit19c4096ccdd809c6213e2e62b0d4f57c880138cd
tree1f75bee8ede367405e0934d445ffce91a11c7c08
parentd78f76457d70d30e80b5d2e067d45de7a0505fc0
ALSA: compress_offload: tighten ioctl command number checks

The snd_compr_ioctl() ignores the upper 24 bits of the ioctl command
number and only compares the number of the ioctl command, which can
cause unintended behavior if an application tries to use an unsupprted
command that happens to have the same _IOC_NR() value.

Remove the truncation to the low bits and compare the entire ioctl
command code like every other driver does.

Fixes: b21c60a4edd2 ("ALSA: core: add support for compress_offload")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://patch.msgid.link/20250710063059.2683476-1-arnd@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/compress_offload.c