🇰🇷 한글 설명
리눅스 커널의 ring-buffer에서 subbuf 크기 조정 시 발생하는 레이스 컨디션 취약점입니다. ring_buffer_read_page()와 ring_buffer_read_start() 함수가 잠금 없이 subbuf_size를 읽는 동안 다른 프로세스가 이를 변경할 수 있어 데이터 무결성이 깨질 수 있습니다.
💡 쉬운 설명
데이터를 기록하는 저장 공간의 크기가 바뀌는 순간에 데이터를 읽으려고 하면 충돌이 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 잘못된 데이터를 읽을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ring-buffer: Fix subbuf resize race with ring buffer readers
trace_buffer subbuf_size is read lockless in ring_buffer_read_page() and
ring_buffer_read_start(), while it can simultaneously be resized with
ring_buffer_subbuf_order_set().
Instead of trace_buffer::subbuf_size, use bpage::order in
ring_buffer_read_start() and ring_buffer_read_page().
In ring_buffer_read_start(), even with resize_disabled, there is still a
possibility of a race with a buffer modification. Hold the trace_buffer
mutex to synchronise with any pending ring buffer order modification.
trace_buffer::subbuf_size is now actually useless, remove it. Also,
create accessors rb_subbuf_capacity() and rb_page_capacity() which
return the actual size available for storing events, while
rb_subbuf_size() returns the actual subbuf page-size.
📍 영향받는 시스템
Linux Kernel (ring-buffer 관련 모듈 사용 버전)
⚔️ 공격 벡터
커널 내 ring-buffer의 크기 조정과 읽기 작업 간의 타이밍을 이용한 레이스 컨디션 공격
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 subbuf_size 접근 방식을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.