🇰🇷 한글 설명
Linux 커널의 net/rds 모듈에서 발생한 동기화 오류로, release_in_xmit() 함수가 비트 해제 후 대기 큐를 확인하는 과정에서 메모리 배리어 누락으로 인해 발생합니다. 이로 인해 대기 중인 프로세스가 깨어나지 못하는 'Lost Wake-up' 현상이 발생하여 시스템 리소스가 고립될 수 있습니다.
💡 쉬운 설명
데이터를 주고받는 과정에서 신호를 보내는 쪽과 받는 쪽의 타이밍이 맞지 않아, 잠자고 있는 프로세스를 깨우지 못하고 영원히 멈추게 만드는 버그입니다. 이로 인해 특정 작업이 종료되지 않고 시스템 자원을 계속 점유하게 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/rds: use wq_has_sleeper() in release_in_xmit()
release_in_xmit() clears RDS_IN_XMIT with clear_bit_unlock() and then
checks waitqueue_active() to decide whether anyone needs waking.
clear_bit_unlock() is only a release operation: it orders the
critical section before the bit clear, but does not order the
subsequent plain load of the wait queue head after it. The waiter
side does the mirror image - it adds itself to the wait queue and
then tests the bit. That is the classic store-buffering pattern: the
releasing CPU can read the wait queue as empty while the waiting CPU
still reads the bit as set, so the sleeper is never woken.
The waiters are rds_conn_shutdown() and rds_tcp_reset_callbacks(),
both in uninterruptible wait_event() with no timeout. A lost wake-up
strands the shutdown worker on its single-threaded workqueue until
some other sender releases the bit again - and on a connection that
is being torn down precisely because it failed, there may never be
another sender.
The barrier used to be there: release_in_xmit() did clear_bit()
followed by smp_mb__after_atomic() until commit 1422f28826d2 ("rds:
introduce acquire/release ordering in acquire/release_in_xmit()")
folded both into clear_bit_unlock(), which strengthened the lock
hand-off but silently dropped the full barrier the wake-up check
depends on. The refill counterpart, release_refill() in
net/rds/ib_recv.c, still carries its smp_mb__after_atomic() for
exactly this reason.
Use wq_has_sleeper(), which is waitqueue_active() preceded by the
required full barrier.
📍 영향받는 시스템
Linux kernel (net/rds 모듈을 사용하는 시스템)
⚔️ 공격 벡터
로컬 또는 네트워크를 통한 RDS 프로토콜 연결 종료/재설정 유도 (DoS 가능성)
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.