UBUNTU-CVE-2026-90023: Null Pointer Dereference
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
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Configuration
Add a check in fsg_common_set_num_buffers() that rejects n values of 0 or 1 by returning -EINVAL, restoring the Kconfig limits of 2 to 256.
Linux kernel usb gadget f_mass_storage fsg_common_set_num_buffers() validation for n = return -EINVAL when n < 2 (n is 0 or 1)
Event History
Frequently Asked Questions
Which Ubuntu kernel packages are listed as affected?
The listed packages are ubuntu/linux, ubuntu/linux-azure, ubuntu/linux-aws-fips, ubuntu/linux-azure-fips, ubuntu/linux-fips, ubuntu/linux-gcp-fips, ubuntu/linux-gcp, and ubuntu/linux-oracle.
What would be required to trigger the fault?
An attacker would need to control page content used to set the mass-storage function's buffer count so that kstrtou8() produces a value of 0 or 1. A value of 0 can lead to a null pointer dereference.
Does the configured default buffer count prevent this issue?
The Kconfig default is 2, and Kconfig constrains the normal value range to 2 through 256. However, specially constructed page content can bypass those restrictions by causing the parsed value to be 0 or 1.
What can be done before applying a fixed kernel?
Prevent untrusted or invalid page content from setting the mass-storage buffer count to 0 or 1. The resolved code rejects both values with -EINVAL, consistent with the Kconfig limits.