🔍 CVE-2026-98764

0.0
CVSS Score
UNKNOWN
2026-10-18
2026-10-21 13:21
✅ 완료

🇰🇷 한글 설명

Linux 커널의 FunctionFS 구현에서 USB 속도 설정과 관련하여 NULL 포인터 역참조 취약점이 발견되었습니다. 사용자가 고속(High-speed) 이상의 속도를 지원하는 장치에서 저속(Full-speed) 디스크립터만 설정할 경우, 특정 ioctl 호출 시 커널 패닉이 발생할 수 있습니다.

💡 쉬운 설명

USB 장치를 연결할 때 속도 정보가 제대로 맞지 않으면 컴퓨터의 핵심 시스템인 커널이 갑자기 멈추거나 꺼질 수 있는 오류입니다. 사용자가 잘못된 정보를 입력했을 때 시스템이 이를 안전하게 처리하지 못해 발생합니다.

🇺🇸 원문 (English)

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: 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.

📍 영향받는 시스템

Linux kernel (FunctionFS를 사용하는 환경)

⚔️ 공격 벡터

로컬 사용자가 조작된 FunctionFS 디스크립터를 설정한 후 특정 ioctl 명령을 호출하여 커널 패닉 유도

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 디스크립터 확인 로직을 수정해야 합니다.

🔧 검증 코드

출력된 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel