CVE-2026-98764

Status: ReceivedUnscored—
Severity—Unscored
Exploitation probability0.17 %higher than 6% of CVEs
Active exploitationNonot in the CISA catalog
Public exploitNot knownno public code found

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

usb: gadget: f_fs: Fix NULL pointer dereference in FUNCTIONFS_ENDPOINT_DESC

When user space sets up FunctionFS with only full-speed descriptors (e.g., flags = FUNCTIONFS_HAS_FS_DESC) and the gadget operates at a higher speed (such as USB_SPEED_HIGH or USB_SPEED_SUPER), config_ep_by_speed() detects that the function lacks descriptors for the current speed, logs a warning, and falls back to full-speed descriptors. The endpoint is then successfully enabled via usb_ep_enable(), and epfile->ep becomes valid.

However, when user space subsequently issues the FUNCTIONFS_ENDPOINT_DESC ioctl to query the endpoint descriptor, ffs_epfile_ioctl() selects the descriptor index solely based on gadget->speed:

Read full descriptionShow less

Because user space only supplied full-speed descriptors, epfile->ep->descs[1] is NULL. Dereferencing desc->bLength triggers an immediate kernel NULL pointer dereference panic.

Fix this by falling back through lower speed descriptors if the current speed descriptor was not supplied, matching the fallback logic in config_ep_by_speed() and historical f_fs behavior. If still missing, fall back to epfile->ep->ep->desc (the active descriptor), and return -EINVAL safely if no valid descriptor is found. In addition, mark desc as const to match struct usb_ep::desc and avoid discarding qualifiers.

Technical details traces, logs and code from the original report
	switch (epfile->ffs->gadget->speed) {
	case USB_SPEED_SUPER:
	case USB_SPEED_SUPER_PLUS:
		desc_idx = 2;
		break;
	case USB_SPEED_HIGH:
		desc_idx = 1;
		break;
	default:
		desc_idx = 0;
	}
	desc = epfile->ep->descs[desc_idx];
	memcpy(&desc1, desc, desc->bLength);

CVSS

NVD hasn't assigned a CVSS score to this CVE (common since the April 2026 policy change).

Exploitation probability (EPSS)

Probability of exploitation in the next 30 days
0.17 %
Percentile among all scored CVEs
6
Score date
10/20/2026

EPSS (Exploit Prediction Scoring System, FIRST) estimates how likely a vulnerability is to be exploited in the wild within 30 days. It complements CVSS (impact) and CISA KEV (confirmed exploitation).

Affected technologies (1)

⚠ AI-inferred from the description — NVD hasn't analyzed this CVE yet, these aren't verified CPEs.

References

Show 4 references

Raw JSON (NVD)

Show
{
  "id": "CVE-2026-98764",
  "cveTags": [],
  "metrics": {},
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "c559a353410939c0884e83bdb0e2420a986ac53b",
              "lessThan": "9d8761b3c133f6c6a6d3486839dac60e2cf4bfe3",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "c559a353410939c0884e83bdb0e2420a986ac53b",
              "lessThan": "7811d8e26c77f8eea79e22d0d14c67ec0658b348",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "c559a353410939c0884e83bdb0e2420a986ac53b",
              "lessThan": "35ab269602e1f7c4c0fe6ea3477264bea77eced3",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "c559a353410939c0884e83bdb0e2420a986ac53b",
              "lessThan": "9cd072788c76595529eb38f42bf94d23852f8534",
              "versionType": "git"
            }
          ],
          "programFiles": [
            "drivers/usb/gadget/function/f_fs.c"
          ],
          "defaultStatus": "unaffected"
        },
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.18"
            },
            {
              "status": "unaffected",
              "version": "0",
              "lessThan": "3.18",
              "versionType": "semver"
            },
            {
              "status": "unaffected",
              "version": "6.12.113",
              "versionType": "semver",
              "lessThanOrEqual": "6.12.*"
            },
            {
              "status": "unaffected",
              "version": "6.18.56",
              "versionType": "semver",
              "lessThanOrEqual": "6.18.*"
            },
            {
              "status": "unaffected",
              "version": "7.2.10",
              "versionType": "semver",
              "lessThanOrEqual": "7.2.*"
            },
            {
              "status": "unaffected",
              "version": "7.3",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ],
          "programFiles": [
            "drivers/usb/gadget/function/f_fs.c"
          ],
          "defaultStatus": "affected"
        }
      ]
    }
  ],
  "published": "2026-10-18T16:17:30.217",
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/35ab269602e1f7c4c0fe6ea3477264bea77eced3",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/7811d8e26c77f8eea79e22d0d14c67ec0658b348",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/9cd072788c76595529eb38f42bf94d23852f8534",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/9d8761b3c133f6c6a6d3486839dac60e2cf4bfe3",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "vulnStatus": "Received",
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_fs: Fix NULL pointer dereference in FUNCTIONFS_ENDPOINT_DESC\n\nWhen user space sets up FunctionFS with only full-speed descriptors\n(e.g., flags = FUNCTIONFS_HAS_FS_DESC) and the gadget operates at a\nhigher speed (such as USB_SPEED_HIGH or USB_SPEED_SUPER),\nconfig_ep_by_speed() detects that the function lacks descriptors for\nthe current speed, logs a warning, and falls back to full-speed\ndescriptors. The endpoint is then successfully enabled via\nusb_ep_enable(), and epfile->ep becomes valid.\n\nHowever, when user space subsequently issues the FUNCTIONFS_ENDPOINT_DESC\nioctl to query the endpoint descriptor, ffs_epfile_ioctl() selects the\ndescriptor index solely based on gadget->speed:\n\n\tswitch (epfile->ffs->gadget->speed) {\n\tcase USB_SPEED_SUPER:\n\tcase USB_SPEED_SUPER_PLUS:\n\t\tdesc_idx = 2;\n\t\tbreak;\n\tcase USB_SPEED_HIGH:\n\t\tdesc_idx = 1;\n\t\tbreak;\n\tdefault:\n\t\tdesc_idx = 0;\n\t}\n\tdesc = epfile->ep->descs[desc_idx];\n\tmemcpy(&desc1, desc, desc->bLength);\n\nBecause user space only supplied full-speed descriptors,\nepfile->ep->descs[1] is NULL. Dereferencing desc->bLength triggers an\nimmediate kernel NULL pointer dereference panic.\n\nFix this by falling back through lower speed descriptors if the current\nspeed descriptor was not supplied, matching the fallback logic in\nconfig_ep_by_speed() and historical f_fs behavior. If still missing,\nfall back to epfile->ep->ep->desc (the active descriptor), and return\n-EINVAL safely if no valid descriptor is found. In addition, mark desc\nas const to match struct usb_ep::desc and avoid discarding qualifiers."
    }
  ],
  "lastModified": "2026-10-19T10:19:40.513",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}