From: "Arnd Bergmann" <arnd@arndb.de>
To: "Benjamin Tissoires" <bentiss@kernel.org>,
"Arnd Bergmann" <arnd@kernel.org>
Cc: "Jiri Kosina" <jikos@kernel.org>,
"Peter Hutterer" <peter.hutterer@who-t.net>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: tighten ioctl command parsing
Date: Fri, 22 Aug 2025 23:08:25 +0200 [thread overview]
Message-ID: <e0557372-b029-4831-8d32-c1eb512ac736@app.fastmail.com> (raw)
In-Reply-To: <tsvy2y4x7xaut6y7fykuc7ltdf777rt2g32zt2biagts6hgjub@iidwntp527og>
On Thu, Aug 21, 2025, at 08:56, Benjamin Tissoires wrote:
> On Jul 11 2025, Arnd Bergmann wrote:
>>
>> + break;
>> + }
>>
>> + hid = dev->hid;
>> + switch (cmd & ~IOCSIZE_MASK) {
>
> Jiri pinged me about this one, and I gave it a go with the existing
> tests I have in selftests... and turns out that this changes the logic
> of the ioctl processing.
>
> The removed block was in the default section of the switch/case
> statement. Now it's added *after*, meaning that any ioctl that was
> normally processed before are now caught in the default of the switch
> statement below and return -ENOTTY.
>
> Running tools/testing/selftests/hid/hid_bpf showed that.
Ah, of course, thanks for checking and describing the issue.
Did you already come up with a fixed patch? I'm currently
travelling and won't be able to send a v2 quickly, so if you
have a version that works for you, let's use that instead.
Arnd
next prev parent reply other threads:[~2025-08-22 21:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 7:28 [PATCH] HID: tighten ioctl command parsing Arnd Bergmann
2025-07-11 9:40 ` Benjamin Tissoires
2025-07-11 10:01 ` Arnd Bergmann
2025-08-21 8:16 ` Benjamin Tissoires
2025-08-21 6:56 ` Benjamin Tissoires
2025-08-22 21:08 ` Arnd Bergmann [this message]
2025-08-26 10:13 ` Benjamin Tissoires
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=e0557372-b029-4831-8d32-c1eb512ac736@app.fastmail.com \
--to=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.hutterer@who-t.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox