🇰🇷 한글 설명
리눅스 커널의 netfilter ctnetlink 구성 요소에서 마스터 conntrack 객체에 대한 안전한 접근을 보장하지 못하는 취약점이 발견되었습니다. 기대값(expectation)이 참조하는 마스터 conntrack 객체가 예기치 않게 삭제될 경우, 잘못된 메모리 참조가 발생할 수 있습니다.
💡 쉬운 설명
네트워크 연결 정보를 관리하는 과정에서, 연결 정보의 주인(마스터)이 갑자기 사라져도 이를 제대로 확인하지 못해 시스템 오류가 발생할 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 예기치 않은 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: ctnetlink: ensure safe access to master conntrack
Holding reference on the expectation is not sufficient, the master
conntrack object can just go away, making exp->master invalid.
To access exp->master safely:
- Grab the nf_conntrack_expect_lock, this gets serialized with
clean_from_lists() which also holds this lock when the master
conntrack goes away.
- Hold reference on master conntrack via nf_conntrack_find_get().
Not so easy since the master tuple to look up for the master conntrack
is not available in the existing problematic paths.
This patch goes for extending the nf_conntrack_expect_lock section
to address this issue for simplicity, in the cases that are described
below this is just slightly extending the lock section.
The add expectation command already holds a reference to the master
conntrack from ctnetlink_create_expect().
However, the delete expectation command needs to grab the spinlock
before looking up for the expectation. Expand the existing spinlock
section to address this to cover the expectation lookup. Note that,
the nf_ct_expect_iterate_net() calls already grabs the spinlock while
iterating over the expectation table, which is correct.
The get expectation command needs to grab the spinlock to ensure master
conntrack does not go away. This also expands the existing spinlock
section to cover the expectation lookup too. I needed to move the
netlink skb allocation out of the spinlock to keep it GFP_KERNEL.
For the expectation events, the IPEXP_DESTROY event is already delivered
under the spinlock, just move the delivery of IPEXP_NEW under the
spinlock too because the master conntrack event cache is reached through
exp->master.
While at it, add lockdep notations to help identify what codepaths need
to grab the spinlock.
📍 영향받는 시스템
Linux Kernel (netfilter/ctnetlink 모듈 사용 버전)
⚔️ 공격 벡터
특수하게 조작된 netlink 메시지를 통해 conntrack 기대값을 생성, 삭제 또는 조회하여 Race Condition 유도
🛡️ 대응 방법
해당 취약점이 해결된 최신 리눅스 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 패치가 적용된 보안 업데이트 버전인지 확인
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux