🇰🇷 한글 설명
Linux 커널의 USB gadget f_fs 구성 요소에서 ffs_func_eps_enable()과 ffs_data_reset()이 동시에 실행될 때 발생하는 레이스 컨디션 취약점입니다. ffs_data_reset() 과정에서 epfiles 포인터가 NULL로 설정된 후, ffs_func_eps_enable()에서 이를 참조할 때 NULL 포인터 역참조가 발생하여 시스템 충돌을 유발할 수 있습니다.
💡 쉬운 설명
USB 장치를 연결하거나 설정하는 과정에서 두 가지 작업이 동시에 일어나 충돌이 발생하는 문제입니다. 이로 인해 컴퓨터 시스템이 갑자기 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_fs: Fix epfile null pointer access after ep enable.
A race condition occurs when ffs_func_eps_enable() runs concurrently
with ffs_data_reset(). The ffs_data_clear() called in ffs_data_reset()
sets ffs->epfiles to NULL before resetting ffs->eps_count to 0, leading
to a NULL pointer dereference when accessing epfile->ep in
ffs_func_eps_enable() after successful usb_ep_enable().
The ffs->epfiles pointer is set to NULL in both ffs_data_clear() and
ffs_data_close() functions, and its modification is protected by the
spinlock ffs->eps_lock. And the whole ffs_func_eps_enable() function
is also protected by ffs->eps_lock.
Thus, add NULL pointer handling for ffs->epfiles in the
ffs_func_eps_enable() function to fix issues
📍 영향받는 시스템
Linux kernel (USB gadget f_fs 구성 요소 사용 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 USB 장치 연결/해제 시나리오를 유도하여 레이스 컨디션 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ffs_func_eps_enable() 내 NULL 포인터 검사 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.