🇰🇷 한글 설명
리눅스 커널의 io-wq 서브시스템에서 해시되지 않은 작업이 선행 작업으로 존재할 때, 해시 꼬리 포인터를 부적절하게 업데이트하는 결함이 있습니다. 이로 인해 해제된 메모리를 가리키는 덩글링 포인터가 생성되어 이후 해시된 작업 삽입 시 메모리 무결성 문제가 발생합니다.
💡 쉬운 설명
시스템 내부 작업 처리 과정에서 잘못된 메모리 참조가 발생하는 버그입니다. 이 결함을 이용하면 시스템의 안정성을 해치거나 메모리 손상 공격을 시도할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
io-wq: check that the predecessor is hashed in io_wq_remove_pending()
io_wq_remove_pending() needs to fix up wq->hash_tail[] if the cancelled
work was the tail of its hash bucket. When doing this, it checks whether
the preceding entry in acct->work_list has the same hash value, but
never checks that the predecessor is hashed at all. io_get_work_hash()
is simply atomic_read(&work->flags) >> IO_WQ_HASH_SHIFT, and the hash
bits are never set for non-hashed work, so it returns 0. Thus, when a
hashed bucket-0 work is cancelled while a non-hashed work is its list
predecessor, the check spuriously passes and a pointer to the non-hashed
io_kiocb is stored in wq->hash_tail[0].
Because non-hashed work is dequeued via the fast path in
io_get_next_work(), which never touches hash_tail[], the stale pointer
is never cleared. Therefore, after the non-hashed io_kiocb completes and
is freed back to req_cachep, wq->hash_tail[0] is a dangling pointer. The
io_wq is per-task (tctx->io_wq) and survives ring open/close, so the
dangling pointer persists for the lifetime of the task; the next hashed
bucket-0 enqueue dereferences it in io_wq_insert_work() and
wq_list_add_after() writes through freed memory.
Add the missing io_wq_is_hashed() check so a non-hashed predecessor
never inherits a hash_tail[] slot.
📍 영향받는 시스템
Linux kernel (io-wq 서브시스템 포함)
⚔️ 공격 벡터
로컬에서 io-wq 작업을 생성 및 취소하여 덩글링 포인터를 유도하고 메모리 무결성 위반을 발생시킴
🛡️ 대응 방법
리눅스 커널을 최신 안정 버전으로 업데이트하여 io_wq_is_hashed() 검증 로직이 포함된 패치를 적용하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 CVE가 패치된 최신 버전인지 공식 보안 advisories를 통해 확인하십시오.