🇰🇷 한글 설명
Linux 커널의 netfilter nft_ct 모듈에서 커스텀 기대값(expectation) 지원 시 발생하는 취약점입니다. 커넥션 트래킹(conntrack) 확장 영역 재할당 과정에서 잘못된 hlist_head를 참조하여 메모리 오류를 유발할 수 있는 문제가 발견되었습니다.
💡 쉬운 설명
네트워크 연결 정보를 관리하는 리눅스 시스템의 특정 기능에서 데이터가 저장되는 위치를 잘못 찾아가 오류가 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 예기치 않은 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nft_ct: move custom expectation support to helper
Originally, the ct expectation support called nf_ct_helper_ext_add() for
confirmed conntracks, which is invalid, triggering a splat. This was
fixed by commit 1710eb913bdc ("netfilter: nft_ct: skip expectations for
confirmed conntrack") which restricted it to unconfirmed conntracks.
However, early insertion of expectations into the expectations list when
the conntrack is unconfirmed leads to stale entries pointing to the
wrong hlist_head through .pprev due to ct extension reallocation.
Commit 7c9664351980 ("netfilter: move nat hlist_head to nf_conn") moved
the nat hlist_head to nf_conn for this reason:
1. ...
2. When reallocation of extension area occurs we need to fixup the
bysource hash head via hlist_replace_rcu.
I'd rather not increase the size of the struct nf_conn for this feature
has very limited scope: only one expectation can be created at a time
given expect_clash() will make nf_ct_expect_related() reports EBUSY.
For this reason, relax nf_ct_expect_related() not to drop packets in
case expectation creation fails, therefore, expectation creation becomes
best effort.
To address this issue, add an internal ct helper and attach it to the
conntrack entry to streamline the custom ct expectation support with
existing ct helpers.
Expose a new nf_conntrack_helper_release() function to release the
internal helper that is allocated and attached to the conntrack entry to
create the custom expectations. The nft_ct module removal always waits
for rcu grace period, then the NULL helper callback is observed after
this.
This patch also restricts the creation of expectations to different
helpers other than this custom helper that is created for this type of
expectations.
📍 영향받는 시스템
Linux Kernel (netfilter/nft_ct 모듈 사용 버전)
⚔️ 공격 벡터
조작된 네트워크 패킷을 통해 커스텀 expectation 생성을 유도하여 메모리 참조 오류 유발
🛡️ 대응 방법
커스텀 expectation 지원을 내부 ct helper로 이동시킨 최신 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.