🇰🇷 한글 설명
Linux 커널의 sunrpc: xprtsock 구성 요소에서 공유 소켓 콜백 함수를 처리할 때 READ_ONCE/WRITE_ONCE를 사용하지 않아 발생하는 가시성 문제입니다. 이로 인해 다른 CPU에서 오래된 콜백 스냅샷을 참조하여 잘못된 함수를 호출할 수 있는 레이스 컨디션 취약점이 존재합니다.
💡 쉬운 설명
컴퓨터의 여러 뇌(CPU)가 소켓이라는 통로를 사용할 때, 한쪽에서 통로 규칙을 바꿨음에도 다른 쪽이 옛날 규칙을 그대로 사용하여 오류가 발생하는 문제입니다. 이로 인해 시스템이 예상치 못한 동작을 하거나 충돌이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
sunrpc: xprtsock: annotate shared socket callbacks with READ_ONCE/WRITE_ONCE
xprtsock replaces and restores sk->sk_data_ready and
sk->sk_write_space on live sockets with plain stores, and
xs_udp_do_set_buffer_size() invokes sk->sk_write_space via a plain
load. These callback pointers are shared with generic socket and
protocol paths that may read or invoke them concurrently, so xprtsock
needs the same READ_ONCE()/WRITE_ONCE() callback visibility contract
that the validated 4022 family applied elsewhere.
When SUNRPC takes over an AF_LOCAL, UDP, or TCP socket and later
restores the lower-socket callbacks during teardown, another CPU may
still hold an earlier callback snapshot. The plain replace/restore
pattern leaves the same visibility hole as the validated 4022 family,
so a stale snapshot can still invoke xs_data_ready() or
xs_udp_write_space() after the live callback fields have already been
restored to the lower-socket handlers.
Use WRITE_ONCE() for the shared sk_data_ready and sk_write_space
stores in xs_local_finish_connecting(), xs_udp_finish_connecting(),
xs_tcp_finish_connecting(), and xs_restore_old_callbacks(). Use
READ_ONCE() for the direct sk_write_space invocation in
xs_udp_do_set_buffer_size(). This matches the required callback
visibility contract while leaving adjacent sk_state_change and
sk_error_report handling unchanged.
📍 영향받는 시스템
Linux Kernel (sunrpc/xprtsock 모듈을 사용하는 시스템)
⚔️ 공격 벡터
멀티코어 환경에서 소켓 콜백 함수가 교체되는 시점에 발생하는 레이스 컨디션(Race Condition)
🛡️ 대응 방법
READ_ONCE 및 WRITE_ONCE 매크로가 적용된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.