* CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID
@ 2025-07-28 11:22 Greg Kroah-Hartman
2025-09-30 10:42 ` Siddh Raman Pant
0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2025-07-28 11:22 UTC (permalink / raw)
To: linux-cve-announce; +Cc: Greg Kroah-Hartman
From: Greg Kroah-Hartman <gregkh@kernel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
HID: core: ensure the allocated report buffer can contain the reserved report ID
When the report ID is not used, the low level transport drivers expect
the first byte to be 0. However, currently the allocated buffer not
account for that extra byte, meaning that instead of having 8 guaranteed
bytes for implement to be working, we only have 7.
The Linux kernel CVE team has assigned CVE-2025-38495 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.147 with commit d3ed1d84a84538a39b3eb2055d6a97a936c108f2
Fixed in 6.6.100 with commit fcda39a9c5b834346088c14b1374336b079466c1
Fixed in 6.12.40 with commit a262370f385e53ff7470efdcdaf40468e5756717
Fixed in 6.15.8 with commit a47d9d9895bad9ce0e840a39836f19ca0b2a343a
Fixed in 6.16 with commit 4f15ee98304b96e164ff2340e1dfd6181c3f42aa
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-38495
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/hid/hid-core.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/d3ed1d84a84538a39b3eb2055d6a97a936c108f2
https://git.kernel.org/stable/c/fcda39a9c5b834346088c14b1374336b079466c1
https://git.kernel.org/stable/c/a262370f385e53ff7470efdcdaf40468e5756717
https://git.kernel.org/stable/c/a47d9d9895bad9ce0e840a39836f19ca0b2a343a
https://git.kernel.org/stable/c/4f15ee98304b96e164ff2340e1dfd6181c3f42aa
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID
2025-07-28 11:22 CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID Greg Kroah-Hartman
@ 2025-09-30 10:42 ` Siddh Raman Pant
2025-09-30 10:49 ` gregkh
0 siblings, 1 reply; 9+ messages in thread
From: Siddh Raman Pant @ 2025-09-30 10:42 UTC (permalink / raw)
To: gregkh@linuxfoundation.org
Cc: cve@kernel.org, linux-kernel@vger.kernel.org, gregkh@kernel.org
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
On Mon, 28 Jul 2025 13:22:37 +0200, Greg Kroah-Hartman wrote:
> In the Linux kernel, the following vulnerability has been resolved:
>
> HID: core: ensure the allocated report buffer can contain the reserved report ID
>
> When the report ID is not used, the low level transport drivers expect
> the first byte to be 0. However, currently the allocated buffer not
> account for that extra byte, meaning that instead of having 8 guaranteed
> bytes for implement to be working, we only have 7.
>
> The Linux kernel CVE team has assigned CVE-2025-38495 to this issue.
This commit prepares for the next commit in the patch series. See
https://lore.kernel.org/all/20250710-report-size-null-v2-0-ccf922b7c4e5@kernel.org/
The patch series has 3 commits, with the main fix being the middle
commit "HID: core: ensure __hid_request reserves the report ID as the
first byte".
Unfortunately, the 1st and 3rd commit has CVE numbers assigned to them
but not the actual fix.
Please assign CVE number to the middle commit.
Segue: Can we not have same CVE number for a patch series fixing a
vuln?
Thanks,
Siddh
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID
2025-09-30 10:42 ` Siddh Raman Pant
@ 2025-09-30 10:49 ` gregkh
2025-09-30 10:54 ` Siddh Raman Pant
0 siblings, 1 reply; 9+ messages in thread
From: gregkh @ 2025-09-30 10:49 UTC (permalink / raw)
To: Siddh Raman Pant; +Cc: cve@kernel.org, linux-kernel@vger.kernel.org
On Tue, Sep 30, 2025 at 10:42:31AM +0000, Siddh Raman Pant wrote:
> On Mon, 28 Jul 2025 13:22:37 +0200, Greg Kroah-Hartman wrote:
> > In the Linux kernel, the following vulnerability has been resolved:
> >
> > HID: core: ensure the allocated report buffer can contain the reserved report ID
> >
> > When the report ID is not used, the low level transport drivers expect
> > the first byte to be 0. However, currently the allocated buffer not
> > account for that extra byte, meaning that instead of having 8 guaranteed
> > bytes for implement to be working, we only have 7.
> >
> > The Linux kernel CVE team has assigned CVE-2025-38495 to this issue.
>
> This commit prepares for the next commit in the patch series. See
> https://lore.kernel.org/all/20250710-report-size-null-v2-0-ccf922b7c4e5@kernel.org/
>
> The patch series has 3 commits, with the main fix being the middle
> commit "HID: core: ensure __hid_request reserves the report ID as the
> first byte".
>
> Unfortunately, the 1st and 3rd commit has CVE numbers assigned to them
> but not the actual fix.
>
> Please assign CVE number to the middle commit.
What git id is that?
And this commit on its own fixes a problem, so it should be a separate
CVE, right?
> Segue: Can we not have same CVE number for a patch series fixing a
> vuln?
We can, but generally it's just one-fix-per-cve.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID
2025-09-30 10:49 ` gregkh
@ 2025-09-30 10:54 ` Siddh Raman Pant
2025-09-30 10:59 ` gregkh
0 siblings, 1 reply; 9+ messages in thread
From: Siddh Raman Pant @ 2025-09-30 10:54 UTC (permalink / raw)
To: gregkh@linuxfoundation.org; +Cc: cve@kernel.org, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
On Tue, Sep 30 2025 at 16:19:44 +0530, gregkh@linuxfoundation.org
wrote:
> What git id is that?
0d0777ccaa2d46609d05b66ba0096802a2746193
> And this commit on its own fixes a problem, so it should be a separate
> CVE, right?
The reservation of 1st byte happens in the next commit.
Not sure why the change was broken up into two.
Thanks,
Siddh
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID
2025-09-30 10:54 ` Siddh Raman Pant
@ 2025-09-30 10:59 ` gregkh
2025-09-30 11:09 ` Siddh Raman Pant
0 siblings, 1 reply; 9+ messages in thread
From: gregkh @ 2025-09-30 10:59 UTC (permalink / raw)
To: Siddh Raman Pant; +Cc: cve@kernel.org, linux-kernel@vger.kernel.org
On Tue, Sep 30, 2025 at 10:54:06AM +0000, Siddh Raman Pant wrote:
> On Tue, Sep 30 2025 at 16:19:44 +0530, gregkh@linuxfoundation.org
> wrote:
> > What git id is that?
>
> 0d0777ccaa2d46609d05b66ba0096802a2746193
That commit id on its own does not "fix" anything that we can see, which
is why it was not given a CVE.
> > And this commit on its own fixes a problem, so it should be a separate
> > CVE, right?
>
> The reservation of 1st byte happens in the next commit.
>
> Not sure why the change was broken up into two.
Then the second change is the one that gets the CVE. Any "previous"
commits in a series that were preparing for the real fix are not called
out. As each CVE entry says, do NOT cherry-pick, but rather always take
all of the commits in the stable release.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID
2025-09-30 10:59 ` gregkh
@ 2025-09-30 11:09 ` Siddh Raman Pant
2025-09-30 11:22 ` gregkh
0 siblings, 1 reply; 9+ messages in thread
From: Siddh Raman Pant @ 2025-09-30 11:09 UTC (permalink / raw)
To: gregkh@linuxfoundation.org; +Cc: cve@kernel.org, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
On Tue, Sep 30 2025 at 16:29:03 +0530, gregkh@linuxfoundation.org
wrote:
> Then the second change is the one that gets the CVE. Any "previous"
> commits in a series that were preparing for the real fix are not called
> out. As each CVE entry says, do NOT cherry-pick, but rather always take
> all of the commits in the stable release.
IMO it won't be nice to change an identifier now and a new ID should be
assigned instead.
Thanks,
Siddh
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID
2025-09-30 11:09 ` Siddh Raman Pant
@ 2025-09-30 11:22 ` gregkh
2025-09-30 11:32 ` Siddh Raman Pant
0 siblings, 1 reply; 9+ messages in thread
From: gregkh @ 2025-09-30 11:22 UTC (permalink / raw)
To: Siddh Raman Pant; +Cc: cve@kernel.org, linux-kernel@vger.kernel.org
On Tue, Sep 30, 2025 at 11:09:50AM +0000, Siddh Raman Pant wrote:
> On Tue, Sep 30 2025 at 16:29:03 +0530, gregkh@linuxfoundation.org
> wrote:
> > Then the second change is the one that gets the CVE. Any "previous"
> > commits in a series that were preparing for the real fix are not called
> > out. As each CVE entry says, do NOT cherry-pick, but rather always take
> > all of the commits in the stable release.
>
> IMO it won't be nice to change an identifier now and a new ID should be
> assigned instead.
I do not understand. We are not going to change anything here...
Let's start over. Is the CVE referenced here in the Subject line, and
the git id it references not valid? Does it not fix a vulnerability as
described? Is there some other commit that also fixes a vulnerability
that should also be assigned to a new CVE? Or is something else wrong
here?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID
2025-09-30 11:22 ` gregkh
@ 2025-09-30 11:32 ` Siddh Raman Pant
2025-09-30 11:41 ` gregkh
0 siblings, 1 reply; 9+ messages in thread
From: Siddh Raman Pant @ 2025-09-30 11:32 UTC (permalink / raw)
To: gregkh@linuxfoundation.org; +Cc: cve@kernel.org, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 744 bytes --]
On Tue, Sep 30 2025 at 16:52:30 +0530, gregkh@linuxfoundation.org
wrote:
> Is the CVE referenced here in the Subject line, and the git id it
> references not valid?
It is valid.
> Is there some other commit that also fixes a vulnerability
> that should also be assigned to a new CVE?
Yes: 0d0777ccaa2d46609d05b66ba0096802a2746193 which is immediately
after the commit in title, and fixes the underflow reported by
syzkaller (see [1] and the commit message for the tested-by), which is
the main bug, for which there is also a public exploit (see [2]).
[1] https://lore.kernel.org/all/686bb229.a00a0220.c7b3.0081.GAE@google.com/t/#u
[2] https://github.com/xairy/kernel-exploits/tree/master/CVE-2025-38494
Thanks,
Siddh
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID
2025-09-30 11:32 ` Siddh Raman Pant
@ 2025-09-30 11:41 ` gregkh
0 siblings, 0 replies; 9+ messages in thread
From: gregkh @ 2025-09-30 11:41 UTC (permalink / raw)
To: Siddh Raman Pant; +Cc: cve@kernel.org, linux-kernel@vger.kernel.org
On Tue, Sep 30, 2025 at 11:32:25AM +0000, Siddh Raman Pant wrote:
> On Tue, Sep 30 2025 at 16:52:30 +0530, gregkh@linuxfoundation.org
> wrote:
> > Is the CVE referenced here in the Subject line, and the git id it
> > references not valid?
>
> It is valid.
Great!
> > Is there some other commit that also fixes a vulnerability
> > that should also be assigned to a new CVE?
>
> Yes: 0d0777ccaa2d46609d05b66ba0096802a2746193 which is immediately
> after the commit in title, and fixes the underflow reported by
> syzkaller (see [1] and the commit message for the tested-by), which is
> the main bug, for which there is also a public exploit (see [2]).
>
> [1] https://lore.kernel.org/all/686bb229.a00a0220.c7b3.0081.GAE@google.com/t/#u
>
> [2] https://github.com/xairy/kernel-exploits/tree/master/CVE-2025-38494
That is assigned to, and stopped by commit c2ca42f190b6 ("HID: core: do
not bypass hid_hw_raw_request"), so that should be fine. And yes, you
do need to have commit 0d0777ccaa2d ("HID: core: ensure __hid_request
reserves the report ID as the first byte") applied in order to be able
to apply c2ca42f190b6 ("HID: core: do not bypass hid_hw_raw_request"),
but that's the case for MANY CVE ids that we call out, right?
Again, never cherry-pick :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-09-30 11:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-28 11:22 CVE-2025-38495: HID: core: ensure the allocated report buffer can contain the reserved report ID Greg Kroah-Hartman
2025-09-30 10:42 ` Siddh Raman Pant
2025-09-30 10:49 ` gregkh
2025-09-30 10:54 ` Siddh Raman Pant
2025-09-30 10:59 ` gregkh
2025-09-30 11:09 ` Siddh Raman Pant
2025-09-30 11:22 ` gregkh
2025-09-30 11:32 ` Siddh Raman Pant
2025-09-30 11:41 ` gregkh
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.