🇰🇷 한글 설명
리눅스 커널의 UBI(Unsorted Block Images) 서브시스템에서 웨어 레벨링(wear-leveling) 작업이 실패할 경우 ubi_wl_put_peb() 함수 내에서 무한 루프가 발생하는 취약점입니다. 이로 인해 시스템의 CPU 사용량이 100%로 치솟으며 시스템 성능 저하 또는 서비스 불능 상태가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 저장 장치를 관리하는 소프트웨어에서 오류가 발생했을 때, 이를 처리하는 과정에서 빠져나오지 못하고 계속 맴도는 문제가 있습니다. 이로 인해 컴퓨터가 매우 느려지거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed
Following process will trigger an infinite loop in ubi_wl_put_peb():
ubifs_bgt ubi_bgt
ubifs_leb_unmap
ubi_leb_unmap
ubi_eba_unmap_leb
ubi_wl_put_peb wear_leveling_worker
e1 = rb_entry(rb_first(&ubi->used)
e2 = get_peb_for_wl(ubi)
ubi_io_read_vid_hdr // return err (flash fault)
out_error:
ubi->move_from = ubi->move_to = NULL
wl_entry_destroy(ubi, e1)
ubi->lookuptbl[e->pnum] = NULL
retry:
e = ubi->lookuptbl[pnum]; // return NULL
if (e == ubi->move_from) { // NULL == NULL gets true
goto retry; // infinite loop !!!
$ top
PID USER PR NI VIRT RES SHR S %CPU %MEM COMMAND
7676 root 20 0 0 0 0 R 100.0 0.0 ubifs_bgt0_0
Fix it by:
1) Letting ubi_wl_put_peb() returns directly if wearl leveling entry has
been removed from 'ubi->lookuptbl'.
2) Using 'ubi->wl_lock' protecting wl entry deletion to preventing an
use-after-free problem for wl entry in ubi_wl_put_peb().
Fetch a reproducer in [Link].
📍 영향받는 시스템
UBI(Unsorted Block Images)를 사용하는 리눅스 커널 시스템
⚔️ 공격 벡터
플래시 메모리 결함(flash fault)을 유도하여 웨어 레벨링 작업 실패를 일으킴으로써 발생
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ubi_wl_put_peb() 함수의 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인