CVE-2026-98860: HID: bpf: cast size to ssize_t when checking hid_bpf_hw_request

Published Oct 18, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

HID: bpf: cast size to ssizet when checking hidbpfhwrequest

As reported by Sashiko: If a transport driver encounters a hardware error and returns a negative error code such as -EPIPE, ret is implicitly promoted to sizet when compared against size. This causes the negative error code to evaluate as a large positive number, making the (ret > size) condition true.

This silently converts the hardware error into a success return value and copies the unmodified buffer back, which could leave BPF programs operating on uninitialized or stale data.

Fix this by casting size into ssizet to return the actual negative error code.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In the Linux kernel HID BPF handling, cast size to ssize_t when checking hid_bpf_hw_request so negative hardware error codes such as -EPIPE are returned instead of being implicitly converted to size_t.

Event History

Oct 18, 2026
CVE Published
via MITRE·03:51 PM
Data Sourced
via MITRE·03:51 PM
Description
Data Sourced
via NVD·04:17 PM
Description

Frequently Asked Questions

1

What conditions are required for this issue to occur?

A HID BPF hardware request must encounter a transport-driver hardware error that returns a negative error code, such as -EPIPE. The flawed comparison can then treat that error as success and copy an unmodified buffer back to the BPF program.

2

What is the practical impact of the incorrect success result?

BPF programs may operate on uninitialized or stale data because the hardware error is silently converted into a successful return value. The corrected code returns the original negative error code instead.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203