🇰🇷 한글 설명
Linux 커널의 xprtrdma 모듈에서 메모리 할당 실패 시 수신 작업 카운터(re_receiving)를 감소시키지 않아 무한 대기가 발생하는 버그입니다. 높은 메모리 압박 상황에서 kworker 스레드가 행(hang) 상태에 빠질 수 있습니다.
💡 쉬운 설명
네트워크 통신 관리 코드의 정리 작업이 실패했을 때 제대로 정리되지 않는 버그입니다. 시스템이 응답 없이 멈춰 재부팅이 필요할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xprtrdma: Decrement re_receiving on the early exit paths
In the event that rpcrdma_post_recvs() fails to create a work request
(due to memory allocation failure, say) or otherwise exits early, we
should decrement ep->re_receiving before returning. Otherwise we will
hang in rpcrdma_xprt_drain() as re_receiving will never reach zero and
the completion will never be triggered.
On a system with high memory pressure, this can appear as the following
hung task:
INFO: task kworker/u385:17:8393 blocked for more than 122 seconds.
Tainted: G S E 6.19.0 #3
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u385:17 state:D stack:0 pid:8393 tgid:8393 ppid:2 task_flags:0x4248060 flags:0x00080000
Workqueue: xprtiod xprt_autoclose [sunrpc]
Call Trace:
<TASK>
__schedule+0x48b/0x18b0
? ib_post_send_mad+0x247/0xae0 [ib_core]
schedule+0x27/0xf0
schedule_timeout+0x104/0x110
__wait_for_common+0x98/0x180
? __pfx_schedule_timeout+0x10/0x10
wait_for_completion+0x24/0x40
rpcrdma_xprt_disconnect+0x444/0x460 [rpcrdma]
xprt_rdma_close+0x12/0x40 [rpcrdma]
xprt_autoclose+0x5f/0x120 [sunrpc]
process_one_work+0x191/0x3e0
worker_thread+0x2e3/0x420
? __pfx_worker_thread+0x10/0x10
kthread+0x10d/0x230
? __pfx_kthread+0x10/0x10
ret_from_fork+0x273/0x2b0
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1a/0x30
📍 영향받는 시스템
Linux kernel 6.19.0 이상 (패치 미적용)
⚔️ 공격 벡터
고의적인 메모리 할당 실패 유도 또는 RPC RDMA 작업 요청 생성 강제로 시스템 행(hang) 유발
🛡️ 대응 방법
Linux kernel 최신 버전으로 업데이트 및 보안 패치 적용
🔧 검증 코드
커널 버전이 6.19.0 이상 6.20 미만이면 취약할 가능성 높음, 최신 LTS 버전 확인 필요
uname -r | grep -E '6\.19\.|6\.[0-8]\.' && echo 'Vulnerable' || echo 'Check details'