🇰🇷 한글 설명
Linux 커널의 rseq 등록 시 rseq_cs 필드 검증이 부족하여, 유효하지 않은 메모리 주소가 rseq_cs에 남아있으면 커널이 사용자 공간으로 반환할 때 세그멘테이션 폴트를 발생시키는 취약점입니다. 특히 이전 스레드의 rseq 영역을 재사용하는 구형 glibc 버전에서 문제가 발생합니다. 커널은 등록 시 non-zero rseq_cs를 자동으로 초기화하여 이 문제를 해결합니다.
💡 쉬운 설명
Linux 운영체제의 한 부분인 rseq 기능이 정보 검증을 제대로 하지 않아 프로그램이 충돌할 수 있습니다. 이를 수정하기 위해 커널이 잘못된 데이터를 자동으로 초기화합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
rseq: Fix segfault on registration when rseq_cs is non-zero
The rseq_cs field is documented as being set to 0 by user-space prior to
registration, however this is not currently enforced by the kernel. This
can result in a segfault on return to user-space if the value stored in
the rseq_cs field doesn't point to a valid struct rseq_cs.
The correct solution to this would be to fail the rseq registration when
the rseq_cs field is non-zero. However, some older versions of glibc
will reuse the rseq area of previous threads without clearing the
rseq_cs field and will also terminate the process if the rseq
registration fails in a secondary thread. This wasn't caught in testing
because in this case the leftover rseq_cs does point to a valid struct
rseq_cs.
What we can do is clear the rseq_cs field on registration when it's
non-zero which will prevent segfaults on registration and won't break
the glibc versions that reuse rseq areas on thread creation.
📍 영향받는 시스템
Linux kernel의 rseq 기능을 사용하는 모든 버전 (특히 멀티스레드 애플리케이션)
⚔️ 공격 벡터
로컬: 잘못된 rseq_cs 값으로 새 스레드를 생성하거나 rseq 영역 재사용 시 세그멘테이션 폴트 유발
🛡️ 대응 방법
Linux 커널을 CVE-2025-38067 패치가 포함된 최신 버전으로 업데이트
🔧 검증 코드
커널 버전 확인 후 배포판별 패치 적용 버전과 비교하고, rseq 활성화 여부를 확인하여 업데이트 필요성 판단
uname -r && grep -i rseq /proc/self/maps 2>/dev/null || echo 'rseq not enabled'