🇰🇷 한글 설명
Linux 커널의 netfilter 구성 요소에서 connlimit 기능을 사용할 때, TIME_WAIT 상태의 소켓을 재사용하는 유효한 연결이 비정상적으로 차단되는 회귀 결함이 발견되었습니다. 기존에는 연결이 이미 확인된 것으로 간주될 경우 카운트 추가를 건너뛰어 가비지 컬렉션이 발생하고, 이로 인해 연결 수가 0으로 처리되어 정상적인 연결이 거부되었습니다.
💡 쉬운 설명
인터넷 연결을 제한하는 보안 기능이 작동할 때, 이미 종료된 연결을 다시 사용하는 정상적인 접속을 오류로 인식하여 차단하는 문제입니다. 이로 인해 사용자가 웹사이트 등에 접속하려 할 때 이유 없이 연결이 끊길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_conncount: prevent connlimit drops for early confirmed ct
Commit 69894e5b4c5e ("netfilter: nft_connlimit: update the count if add
was skipped") introduced a regression where packets for valid
connections are dropped when using connlimit for soft-limiting
scenarios.
The issue occurs when a new connection reuses a socket currently in
the TIME_WAIT state. In this scenario, the connection tracking entry
is evaluated as already confirmed. Previously, __nf_conncount_add()
assumed that if a connection was confirmed and did not originate from
the loopback interface, it should skip the addition and return -EEXIST.
Skipping the addition triggers a garbage collection run that cleans up
the TIME_WAIT connection. Consequently, the active connection count
drops to 0, which xt_connlimit mishandles, leading to the false rejection
of the perfectly valid new connection.
Fix this by replacing the interface check with protocol-agnostic state
checks. We now skip the tree insertion and preserve the lockless garbage
collection optimization only if the connection is IPS_ASSURED. This
allows early-confirmed setup packets (such as reused TIME_WAIT sockets
or locally generated SYN-ACKs) to be properly evaluated and counted
without falsely dropping. The goto check_connections path is maintained
to ensure these setup packets are deduplicated correctly.
This has been tested with slowhttptest and HTTP server configured
locally to ensure we are not breaking soft-limiting scenarios for local
or external connections. In addition, it was tested with a OVS zone
limit too.
📍 영향받는 시스템
Linux Kernel (netfilter/nft_connlimit 관련 모듈 사용 시스템)
⚔️ 공격 벡터
직접적인 공격보다는 TIME_WAIT 상태의 소켓을 재사용하는 네트워크 트래픽 패턴에 의해 서비스 거부(DoS)와 유사한 연결 차단 발생 가능
🛡️ 대응 방법
커널 패치(Commit 69894e5b4c5e 포함 버전)를 적용하여 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인