CVE-2026-90023: usb: gadget: f_mass_storage: fix null pointer dereference in fsg_common_set_num_buffers()

Published Sep 16, 2026
·
Updated

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

usb: gadget: fmassstorage: fix null pointer dereference in fsgcommonsetnumbuffers()

Previously fsgnumbuffersvalidate() was removed as it was not necessary due to Kconfig setting the limits for n from 2 to 256 with default as 2. However, setting the page content in such a way that kstrtou8() reflects n value as either 0 or 1 bypasses these restrictions leading to a null pointer dereference if n is 0. Fix this by adding a check for n < 2 and returning -EINVAL if n is either 0 or 1 consistent with Kconfig logic.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Apply the fix in fsg_common_set_num_buffers() for usb: gadget: f_mass_storage: add a check so that if n is less than 2, the function returns -EINVAL to prevent the null pointer dereference.

    Linux kernel (usb: gadget: f_mass_storage) fsg_common_set_num_buffers() parameter n = Return -EINVAL when n < 2

Event History

Sep 16, 2026
CVE Published
via MITRE·10:33 AM
Data Sourced
via MITRE·10:33 AM
Description

Frequently Asked Questions

1

Is the default buffer-count configuration affected?

No. Kconfig restricts the buffer count to 2 through 256, with a default of 2. The issue occurs when page content causes kstrtou8() to interpret the value as 0 or 1, bypassing those expected limits.

2

What input is needed to trigger the crash?

An actor must be able to set the relevant page content so that the parsed buffer-count value becomes 0 or 1. A value of 0 can lead to a null pointer dereference; the fix rejects both 0 and 1 with -EINVAL.

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