From mboxrd@z Thu Jan 1 00:00:00 1970 From: AL-KERNEL To: kernel-cve@kernelcve.org Subject: [CVE-2026-98764][MODERATE REGULAR] usb: gadget: f_fs: Fix NULL pointer dereference in FUNCTIONFS_ENDPOINT_DESC Date: Sun, 18 Oct 2026 23:31:02 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AL-KERNEL-CVE: CVE-2026-98764 X-AL-KERNEL-Priority: MODERATE REGULAR X-AL-KERNEL-Severity: MODERATE REGULAR X-AL-KERNEL-Base-Severity: MODERATE X-AL-KERNEL-KPANIC: NO X-AL-KERNEL-ActionableScore: 1 X-AL-KERNEL-ActionableScore-Lower: unknown X-AL-KERNEL-Commit: 9d8761b3c133f6c6a6d3486839dac60e2cf4bfe3 List-Id: CVE: CVE-2026-98764 Priority: MODERATE REGULAR AL-KERNEL base severity: MODERATE KPANIC flag: NO Patch: usb: gadget: f_fs: Fix NULL pointer dereference in FUNCTIONFS_ENDPOINT_DESC Commit: 9d8761b3c133f6c6a6d3486839dac60e2cf4bfe3 Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9d8761b3c133f6c6a6d3486839dac60e2cf4bfe3 Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-98764 Analysis date: Sun, 18 Oct 2026 23:31:02 -0400 ActionableScore: 1 ActionableScore lower bound: unknown Actionable bucket: Ordinary Moderate Manual review required: NO Summary: A local process with access to a configured FunctionFS endpoint can query a missing speed-specific descriptor and trigger a NULL pointer dereference, causing a kernel Oops or panic without an established memory-corruption or privilege-escalation primitive. ====================================================================== ABOUT THIS REPORT ====================================================================== The original Linux kernel CVE announcement for CVE-2026-98764 is available here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-98764 The original announcement does not normally provide a security severity estimate, CVSS assessment, or enough information to determine whether the reported kernel bug represents a practically relevant security issue. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. It combines an autonomous classifier with LLM-assisted technical analysis and a separate ActionableScore mechanism. The purpose of this report is to prioritize Linux kernel CVEs before manual review, identify cases that require prompt investigation, and support automatic closure of issues that are unlikely to have meaningful security impact. Published priority for this report: MODERATE REGULAR Manual review required: NO A detailed explanation of the methodology and priority rules is included at the end of this message. ====================================================================== AL-KERNEL CLASSIFICATION RESULT ====================================================================== CVE-2026-98764 MODERATE https://www.kernelcve.org/list/?q=CVE-2026-98764 CHECK WITH IMPACT FROM ORIG NN MODERATE | AEGIS IMPACT MODERATE_KPANIC AEGIS_AS=1 LEGACY=MODERATE RESULT=DIFF (final Legacy and Aegis differ; FINAL: MODERATE, Aegis: MODERATE_KPANIC) Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H';**CWE-476;*CWE-20;CWE-754;BEST CVSS score: '5.5';DESCR 'A NULL pointer dereference in the FunctionFS endpoint descriptor ioctl occurs when user space supplies only full speed descriptors while the USB gadget operates at high speed or super speed. Endpoint activation can succeed by falling back to the full speed descriptor, but FUNCTIONFS_ENDPOINT_DESC selects a descriptor only from the current gadget speed and can dereference a missing entry through desc bLength. A local process controlling the FunctionFS endpoint can trigger an immediate kernel Oops or panic by issuing the ioctl after this configuration is active. For the CVSS the PR:L value reflects that the attacker needs access to the FunctionFS endpoint or its delegated file descriptor, but does not necessarily need unrestricted root access after the gadget has been configured. The issue is not network reachable and requires local interaction with the FunctionFS device interface. Impact is denial of service through a kernel crash. No UAF, OOB access, information disclosure, arbitrary write, or supported privilege escalation path is identified. Automated impact decision path. The original SimpleNet classifier selected MODERATE_KPANIC. The primary LLM estimated paranoid CVSS 5.5 and the production ActionableScore returned 1 with recommendation Ordinary Moderate. The production rules then evaluated CVSS thresholds and ActionableScore thresholds. Recorded rule transitions were CVSS and initial triage stage MODERATE_KPANIC to MODERATE because the CVSS score, vector or bug class threshold rule was applied. The legacy KP specialist has no review artifact for this run. The legacy FD or DH downgrade specialist has no review artifact for this run. Exact triggered rule markers were DECREASED_TO_MODERATE_REGULAR_FROM_MODERATE7_BASED_ON_GUESSCVSS_AND_CIANNH and V41_INHERITED_KPANIC_PROMOTION_BLOCKED and MANUAL_REVIEW_REQUIRED. The independent weaker Aegis shadow evaluated CVSS 5.5 and ActionableScore 1 with primitive class CLASS_C and manual review RECOMMENDED. Its independently reconciled impact was MODERATE_KPANIC. The models disagreed but the aggregation rules retained the production result. The final reported impact is MODERATE.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Ordinary Moderate (with actual score 1) MAYBE NULLPTR USB LINUS DECREASED_TO_MODERATE_REGULAR_FROM_MODERATE7_BASED_ON_GUESSCVSS_AND_CIANNH V41_INHERITED_KPANIC_PROMOTION_BLOCKED MANUAL_REVIEW_REQUIRED - - checked ====================================================================== ACTIONABLESCORE ANALYSIS ====================================================================== ActionableScore=1 PrimitiveClass=CLASS_C RealUAF=NO HostAdminRequired=UNKNOWN NamespaceScopedPrivilege=UNKNOWN ImportantCandidate=NO ManualReview=RECOMMENDED AutoDowngradeAllowed=YES RequiresHostUID0=UNKNOWN AuthorizationDecisionBypass=NO ProtectedResourceImpact=NONE B4PendingReview=NO B4PendingConfirmed=NO 1. ActionableScore * Raw conservative score: 1 * Conservative score: 1 * Raw paranoid score: 1 * Paranoid score: 1 * No floor or cap applied. * Final recommended bucket: **Ordinary Moderate**:: 2. Signal breakdown * +1 Reliable kernel crash / strong DoS. A missing speed-specific descriptor is NULL, and reading `desc->bLength` can cause an immediate kernel Oops or panic. * +0 Local unprivileged trigger. A process holding the relevant FunctionFS endpoint can issue the ioctl, but the supplied evidence does not establish that an ordinary user can complete FunctionFS gadget setup or obtain the required descriptor without prior delegation. * No privilege penalty. Host-admin-equivalent privilege is not positively established, so no speculative negative points are applied. * No UAF, OOB access, heap overwrite, shared-backing write, repeated release, authorization bypass, active-state corruption, or security-boundary primitive is established. * No extra availability point. It would duplicate the same kernel crash. * No confidentiality, integrity, LPE, controlled-reclaim, arbitrary-write, or remote-reachability signal is supported. * B5-R does not apply because there is no heap OOB write or retry-accumulated offset. * B3-PENDING does not apply because no shared or file-backed storage is modified. * V33 and V32 do not apply because no attacker-influenced active structured-state write or checksum metadata corruption exists. * B4-PENDING does not apply because no DENY-to-ALLOW authorization decision is changed. 3. Reachability analysis The trigger requires a FunctionFS gadget configured with only full-speed descriptors while operating at a higher USB speed, followed by `FUNCTIONFS_ENDPOINT_DESC` on the associated endpoint file. A delegated gadget service could plausibly execute this sequence below unrestricted host root, but the supplied patch does not establish how the endpoint file is provisioned or which credentials control the complete setup. Therefore `HostAdminRequired` and `RequiresHostUID0` remain `UNKNOWN`. No namespace-scoped capability path is shown. Prior gadget configuration and compatible USB gadget controller hardware are prerequisites. The trigger is deterministic and does not require a race, retry accumulation, physical malicious peripheral, or network access. 4. Primitive and severity interpretation The exact primitive is a NULL pointer dereference caused by selecting an absent high-speed or super-speed descriptor and reading `desc->bLength`. This is an invalid-read crash path, not a lifetime violation or attacker-controlled overwrite. The descriptor is active endpoint state, but no corrupted active state is written or subsequently consumed. There is no first release, dangling reference, second refcount mutation, UAF, or stale-object reuse. The appropriate classification is `CLASS_C`. The demonstrated consequence is local kernel Oops or panic. Stronger consequences such as disclosure, privilege escalation, persistent integrity modification, or cross-boundary corruption are unsupported. `ImportantCandidate=NO` because there is no independent Important-preserving primitive. `AutoDowngradeAllowed=YES` because the established behavior is constrained to a deterministic NULL-dereference DoS. 5. One-sentence report phrase A local process with access to a configured FunctionFS endpoint can query a missing speed-specific descriptor and trigger a NULL pointer dereference, causing a kernel Oops or panic without an established memory-corruption or privilege-escalation primitive. 6. Manual review recommendation MANUAL CHECK RECOMMENDED Confirm whether the product delegates FunctionFS endpoint descriptors to non-administrative services, but no Important-class primitive is established by the supplied evidence. 7. Call-site confidence Call-site confidence: high ====================================================================== UPSTREAM PATCH SUMMARY ====================================================================== Patch: usb: gadget: f_fs: Fix NULL pointer dereference in FUNCTIONFS_ENDPOINT_DESC Commit: 9d8761b3c133f6c6a6d3486839dac60e2cf4bfe3 Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9d8761b3c133f6c6a6d3486839dac60e2cf4bfe3 Commit description: 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: 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); 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. Fixes: c559a35 ("usb: gadget: f_fs: add ioctl returning ep descriptor") Cc: stable@kernel.org Signed-off-by: Yuchao Zhang Acked-by: MichaƂ Nazarewicz Link: https://patch.msgid.link/20260918005438.81263-2-ndaugoing@gmail.com Signed-off-by: Greg Kroah-Hartman Changed files: drivers/usb/gadget/function/f_fs.c Diff excerpt: Not included in this email. See the upstream URL for the full patch. Full patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9d8761b3c133f6c6a6d3486839dac60e2cf4bfe3 ====================================================================== DETAILED REPORT METHODOLOGY ====================================================================== The original Linux kernel CVE announcement for CVE-2026-98764 can be found here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-98764 The original CVE announcement normally does not include a security-level estimate. In particular, it may not contain a CVSS assessment, an impact level, or enough information to determine whether the reported bug is a practically relevant security issue. One purpose of this parallel CVE list is to provide that missing technical and prioritization information. The original goal of the AL-KERNEL project was to prioritize Linux kernel CVE analysis automatically before manual review. The system can also help identify non-security issues that may be suitable for automatic closure. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. The first analysis stage combines an autonomous classifier with additional LLM-based analysis. The autonomous classifier runs locally on a CPU and is based on a backpropagation neural network. Together, these mechanisms produce a technical vulnerability description, identify likely weakness types, estimate CVSS severity, and provide input for ActionableScore. Two CVSS estimates are retained because incomplete kernel vulnerability information often permits more than one defensible interpretation: Conservative CVSS vector: Not available The Best / paranoid CVSS vector: AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H The Best / paranoid CVSS score: 5.5 The conservative vector represents a lower-impact interpretation. The Best/paranoid vector intentionally represents a plausible upper-bound interpretation and should not automatically be treated as demonstrated real-world impact. CVSS may also need to be adjusted for a particular Linux deployment, because actual reachability, privileges, enabled kernel configuration, hardware, namespaces, exposed device nodes, and other environmental conditions can differ significantly between systems. A separate ActionableScore mechanism evaluates practical remediation urgency. Its analysis may include reachability, attack prerequisites, subsystem exposure, memory-corruption characteristics, denial-of-service reliability, and possible confidentiality, integrity, or privilege-escalation impact. Conservative ActionableScore: unknown Paranoid ActionableScore: 1 The final base severity is taken directly from the second tab-separated field of the AL-KERNEL classification result. ActionableScore does not replace or independently override that final AL-KERNEL decision, and if ActionableScore adjusted impact level of ALKERNEL, then you would see self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7. For an AL-KERNEL result of MODERATE, this report uses the following additional presentation split: ActionableScore below 5 -> MODERATE REGULAR ActionableScore 5 or more -> MODERATE 7.0 The distinction between MODERATE REGULAR and MODERATE 7.0 makes it possible to identify Moderate issues that should receive manual analysis and fixes before lower-priority MODERATE REGULAR issues. In many cases, MODERATE REGULAR fixes may wait for a later rebase or routine update. There is one override in which MODERATE REGULAR becomes MODERATE 7.0 even when the ActionableScore is below 5. When the AL-KERNEL result contains the KPANIC flag, a MODERATE result is always presented as MODERATE 7.0. The KPANIC flag selected with few regexps without usage of AI at all, so it helps to detect cases when Kernel Crash happens and similar (to filter False-Negative results from the LLM usage). KPANIC indicates that a reliable kernel crash, kernel panic, or similarly serious kernel availability impact was identified by the classification workflow. AL-KERNEL base severity for this report: MODERATE KPANIC detected for this report: NO Published priority for this report (same as in Subject): MODERATE REGULAR These results are intended to support engineering triage. They are machine-generated estimates, and cases marked for manual review should be validated by a human security engineer before final disposition. For more info read docs linked from here: https://kernelcve.org/ (and you can submit you own patch there to generate such a report for non-existant CVE-id yet). Note that in many cases this AI tool selects higher severity, than real is (means you can expect Importants instead of Moderate 7.0 or Moderates 7.0 instead of regular Moderates). If you see such cases, please use reply email interface to add additional manual analyses info to this particular CVE. And please, please, let me know when you see Lows instead of Importants or Important instead of Low (because particular for such cases I need to tune this AI tool to make it better for this one and next similar). My contact email for such notifications is alexanjelausa@gmail.com (and both send reply to CVE record itself too and see "reply" button below for howto reply).