🇰🇷 한글 설명
Linux 커널의 usb gadget f_tcm 드라이버에서 usbg_make_tpg() 함수 호출 시 데드락(교착 상태)이 발생하는 취약점이 발견되었습니다. 이 문제는 특정 락(lock)을 보유한 상태에서 다른 서브시스템의 락을 호출하여 순환 의존성이 발생하기 때문에 나타납니다. 이를 해결하기 위해 기존의 락 대신 READ_ONCE/WRITE_ONCE를 사용하는 방식으로 수정되었습니다.
💡 쉬운 설명
컴퓨터의 USB 기능을 제어하는 프로그램 내부에서 두 가지 작업이 서로의 작업이 끝나기만을 기다리며 멈춰버리는 현상이 있었습니다. 이로 인해 시스템이 응답하지 않는 상태가 될 수 있었으나, 작업 순서를 효율적으로 바꾸어 해결했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_tcm: fix deadlock in usbg_make_tpg()
usbg_make_tpg() held dep_lock while calling
configfs_depend_item_unlocked(), which acquires the configfs root
inode lock when operating across subsystems. This creates a circular
lock dependency with configfs_rmdir():
dep_lock -> configfs root inode lock -> su_mutex -> dep_lock
In usbg_make_tpg(), dep_lock only serialized the read of opts->ready,
which is a monotonic flag that transitions from false to true exactly
once (in tcm_set_name()) and never reverts. Remove dep_lock from
usbg_make_tpg() entirely and use READ_ONCE/WRITE_ONCE to access
opts->ready locklessly instead.
📍 영향받는 시스템
Linux Kernel (usb gadget f_tcm 드라이버를 사용하는 버전)
⚔️ 공격 벡터
로컬 사용자가 특정 USB 구성(configfs)을 조작하여 시스템 데드락을 유도할 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.