From: Vinod Koul <vkoul@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Arnd Bergmann <arnd@arndb.de>,
Shengjiu Wang <shengjiu.wang@gmail.com>,
Yu Jiaoliang <yujiaoliang@vivo.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: compress_offload: tighten ioctl command number checks
Date: Thu, 10 Jul 2025 13:15:50 +0530 [thread overview]
Message-ID: <aG9vrq8kRqfigzgm@vaman> (raw)
In-Reply-To: <20250710063059.2683476-1-arnd@kernel.org>
On 10-07-25, 08:30, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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>
> ---
> I could not find any indication on why this driver did this in
> the first place, it already was this way in the original commit
> back in 2011.
I guess I would have started from a bad template back then!
Thanks for fixing this
Acked-by: Vinod Koul <vkoul@kernel.org>
--
~Vinod
next prev parent reply other threads:[~2025-07-10 7:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 6:30 [PATCH] ALSA: compress_offload: tighten ioctl command number checks Arnd Bergmann
2025-07-10 7:45 ` Vinod Koul [this message]
2025-07-10 8:10 ` Takashi Iwai
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=aG9vrq8kRqfigzgm@vaman \
--to=vkoul@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=shengjiu.wang@gmail.com \
--cc=tiwai@suse.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yujiaoliang@vivo.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.