🇰🇷 한글 설명
Linux 커널의 RDS(Reliable Datagram Sockets) 프로토콜에서 rds_conn_path_reset() 함수가 cp_flags 비트를 개별적으로 초기화하지 않고 전체를 0으로 덮어쓰는 취약점이 발견되었습니다. 이로 인해 원자적 연산(atomic bitops)을 사용하는 다른 프로세스와의 데이터 경합(data race)이 발생하여 특정 플래그 업데이트가 유실될 수 있습니다.
💡 쉬운 설명
시스템의 중요한 상태를 기록하는 메모리 공간을 한꺼번에 지워버리는 과정에서, 동시에 다른 작업이 기록한 중요한 정보가 사라질 수 있는 문제입니다. 이로 인해 네트워크 연결 상태가 꼬이거나 시스템 동작이 불안정해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/rds: clear cp_flags bits individually in rds_conn_path_reset()
rds_conn_path_reset() wipes the whole flag word with a plain
cp->cp_flags = 0 store. Every other accessor of that word uses
atomic bitops, and some of them can run concurrently with the reset:
RDS_LL_SEND_FULL is set from rds_send_xmit() and cleared from the
transport completion paths, neither of which holds anything that
excludes the shutdown worker. A plain store racing an atomic
read-modify-write on the same word is a data race, and whichever
side loses has its update silently discarded.
Clear the two bits the reset is actually responsible for instead.
RDS_IN_XMIT and RDS_RECV_REFILL need no store at all here: they
belong to the caller, rds_conn_shutdown(), which waits for both to be
clear before calling the transport shutdown and this reset.
This also gives every bit in cp_flags a single well-defined writer
discipline, which the following patches rely on when they turn
RDS_IN_XMIT and RDS_RECV_REFILL into bit locks held across the
teardown: a blanket store mid-teardown would destroy lock ownership
that an atomic clear preserves.
Oracle UEK carries the same conversion ("net/rds: Preserve essential
connection state flags"), motivated by its asynchronous shutdown
state machine, whose progress and destroy flags must survive the
reset. UEK's variant also clears RDS_IN_XMIT and RDS_RECV_REFILL
because there the reset runs as the final step of a teardown that
owns both bits, making those clears its unlock. Upstream that
release belongs in rds_conn_shutdown(): once a later patch in this
series turns the two bits into locks held across the teardown, ending
ownership needs release semantics and a wake-up that a plain clear
inside the reset would not provide.
Based on Oracle UEK commit "net/rds: Preserve essential connection
state flags" by Gerd Rausch.
📍 영향받는 시스템
Linux Kernel (RDS 프로토콜을 사용하는 버전)
⚔️ 공격 벡터
로컬 또는 네트워크를 통한 RDS 연결 해제 과정에서의 데이터 경합 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 rds_conn_path_reset()의 비트 초기화 방식을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.