🇰🇷 한글 설명
Linux 커널의 net: shaper 구성 요소에서 XArray의 VALID 플래그가 원자적으로 저장되지 않아 발생하는 레이스 컨디션 취약점입니다. 이로 인해 읽기 작업 중 데이터가 교체될 경우 잘못된 포인터를 참조하게 되어 Use-After-Free(UAF) 오류가 발생할 수 있습니다.
💡 쉬운 설명
데이터를 읽고 쓰는 과정에서 순서가 어긋나 컴퓨터가 이미 삭제된 메모리 주소를 다시 사용하려고 시도하는 문제입니다. 이로 인해 시스템이 충돌하거나 보안 공격에 노출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: shaper: rework the VALID marking (again)
Recent commit changed the semantics from NOT_VALID to VALID.
I didn't realize that the flags are not stored atomically
with the entry in XArray. There's still a race of reader
observing a VALID mark for a slot, getting interrupted,
writer replacing the entry with a different one, reader
continuing, fetching the entry which is now a different
pointer than the pointer for which VALID was meant.
The biggest consequence of this is that we may see a UAF
since net_shaper_rollback() assumed that entries without
VALID can be freed without observing RCU.
Looks like the XArray marks are buying us nothing at this
point. Let's convert the code to an explicit valid field.
The smp_load_acquire() / smp_store_release() barriers are
marginally cleaner.
📍 영향받는 시스템
Linux Kernel (net: shaper 관련 모듈을 사용하는 버전)
⚔️ 공격 벡터
네트워크 트래픽 제어(shaper) 관련 설정 변경 시 발생하는 레이스 컨디션을 이용한 메모리 오염
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인