🇰🇷 한글 설명
Linux 커널의 strparser 모듈에서 strp_done() 호출 전에 __strp_recv가 실행 중인지 보장하지 않아 경쟁 조건(race condition)이 발생합니다. 이로 인해 해제된 메모리 접근(UAF)이 가능하며, 공개된 재현 코드가 이를 익스플로잇으로 변환했습니다. 영향은 주로 espintcp 사용 환경에 국한됩니다.
💡 쉬운 설명
리눅스 커널 내부의 데이터 처리 도구가 종료되기 전에 작업이 끝나지 않을 수 있는 결함입니다. 이를 악용하면 이미 해제된 메모리를 건드려 시스템 권한을 얻거나 시스템을 멈추게 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
strparser: make sure __strp_recv isn't running before tearing down the parser
The comment above strp_done() claims that if strp is stopped,
strp_recv will no longer be called. That's only true if the caller has
a mechanism (eg locking) to guarantee that strp_recv() calls that
started before strp_stop() have completed by the time we call
strp_done().
This adds a dummy lock_sock/release_sock pair to guarantee that any
in-flight strp_recv() (which runs under either bh_lock_sock or
lock_sock, depending if it's called from ->sk_data_ready or strp_work)
has completed.
Only espintcp can be affected by this race condition, but this patch
makes sure no future user of strp can have the bug.
This could crash on strp->sk ("general mode" of strp), but this mode
has been here for 9 years and has never been used. It'll be gone soon,
no point worrying about it.
Switch the stopped/paused/etc bits to u8's to avoid races between
strp_stop() and strp_pause/unpause().
A reproducer has been published and turns the possible UAF into an
exploit [1].
📍 영향받는 시스템
패치 이전의 Linux 커널 (strparser 모듈 사용 환경, 특히 espintcp 사용 시) - 정확한 영향 버전은 커널 changelog 확인 필요
⚔️ 공격 벡터
로컬 사용자가 espintcp 등 strparser를 사용하는 소켓을 조작하는 재현 코드를 실행하여 경쟁 조건을 유발
🛡️ 대응 방법
배포판의 최신 커널 보안 업데이트를 적용하고 재부팅
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지 또는 커널 changelog의 패치 버전과 비교하여, 해당 수정이 포함된 버전 이상이면 패치된 것입니다.