{"id":41236,"date":"2026-10-19T00:32:44","date_gmt":"2026-10-18T16:32:44","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98764"},"modified":"2026-10-19T00:32:44","modified_gmt":"2026-10-18T16:32:44","slug":"cve-2026-98764","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98764","title":{"rendered":"CVE-2026-98764 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_fs: Fi"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>usb: gadget: f_fs: Fix NULL pointer dereference in FUNCTIONFS_ENDPOINT_DESC<\/p>\n<p>When user space sets up FunctionFS with only full-speed descriptors<br \/>\n(e.g., flags = FUNCTIONFS_HAS_FS_DESC) and the gadget operates at a<br \/>\nhigher speed (such as USB_SPEED_HIGH or USB_SPEED_SUPER),<br \/>\nconfig_ep_by_speed() detects that the function lacks descriptors for<br \/>\nthe current speed, logs a warning, and falls back to full-speed<br \/>\ndescriptors. The endpoint is then successfully enabled via<br \/>\nusb_ep_enable(), and epfile-&gt;ep becomes valid.<\/p>\n<p>However, when user space subsequently issues the FUNCTIONFS_ENDPOINT_DESC<br \/>\nioctl to query the endpoint descriptor, ffs_epfile_ioctl() selects the<br \/>\ndescriptor index solely based on gadget-&gt;speed:<\/p>\n<p>\tswitch (epfile-&gt;ffs-&gt;gadget-&gt;speed) {<br \/>\n\tcase USB_SPEED_SUPER:<br \/>\n\tcase USB_SPEED_SUPER_PLUS:<br \/>\n\t\tdesc_idx = 2;<br \/>\n\t\tbreak;<br \/>\n\tcase USB_SPEED_HIGH:<br \/>\n\t\tdesc_idx = 1;<br \/>\n\t\tbreak;<br \/>\n\tdefault:<br \/>\n\t\tdesc_idx = 0;<br \/>\n\t}<br \/>\n\tdesc = epfile-&gt;ep-&gt;descs[desc_idx];<br \/>\n\tmemcpy(&amp;desc1, desc, desc-&gt;bLength);<\/p>\n<p>Because user space only supplied full-speed descriptors,<br \/>\nepfile-&gt;ep-&gt;descs[1] is NULL. Dereferencing desc-&gt;bLength triggers an<br \/>\nimmediate kernel NULL pointer dereference panic.<\/p>\n<p>Fix this by falling back through lower speed descriptors if the current<br \/>\nspeed descriptor was not supplied, matching the fallback logic in<br \/>\nconfig_ep_by_speed() and historical f_fs behavior. If still missing,<br \/>\nfall back to epfile-&gt;ep-&gt;ep-&gt;desc (the active descriptor), and return<br \/>\n-EINVAL safely if no valid descriptor is found. In addition, mark desc<br \/>\nas const to match struct usb_ep::desc and avoid discarding qualifiers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>usb: gadget: f_fs: Fix NULL pointer dereference in FUNCTIONFS_ENDPOINT_DESC<\/p>\n<p>When user space sets up FunctionFS with only full-spee<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-41236","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/41236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=41236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=41236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=41236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}