🇰🇷 한글 설명
Linux 커널의 sunrpc 구성 요소에서 RCU grace period가 완료되기 전에 rq_argp 및 rq_resp 메모리가 해제되어 발생하는 Use-After-Free 취약점입니다. svc_rqst_free()가 구조체는 지연 해제하면서 내부 데이터는 즉시 해제하기 때문에, RCU 리더가 해제된 메모리에 접근할 수 있는 보안 허점이 존재합니다.
💡 쉬운 설명
컴퓨터가 데이터를 사용 중인데 그 데이터가 담긴 메모리 공간을 미리 비워버려서 발생하는 문제입니다. 이로 인해 시스템이 예기치 않게 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
sunrpc: defer rq_argp and rq_resp free until after RCU grace period
svc_rqst_free() frees rqstp->rq_argp and rqstp->rq_resp synchronously
via kfree(), but defers the rqstp struct free via kfree_rcu(). After
svc_exit_thread() calls list_del_rcu() and svc_rqst_free(), there is
a window where RCU readers that started before list_del_rcu() can still
traverse the thread list and find the rqstp. These readers (e.g.
nfsd_nl_rpc_status_get_dumpit()) dereference rqstp->rq_argp, which has
already been freed — a use-after-free.
Fix this by moving the kfree of rq_argp and rq_resp into an explicit
call_rcu() callback alongside the struct free. Resources not accessed
by RCU readers (bvec, buffer pages, scratch folio, auth_data) remain
synchronously freed.
📍 영향받는 시스템
Linux kernel (sunrpc 구성 요소가 포함된 버전)
⚔️ 공격 벡터
특수하게 조작된 RPC 요청을 통해 RCU 리더가 해제된 메모리 영역을 참조하도록 유도
🛡️ 대응 방법
rq_argp 및 rq_resp의 해제 시점을 RCU 콜백 함수 내부로 이동시킨 최신 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인