🇰🇷 한글 설명
Linux 커널의 IPv4 PMTU 업데이트 경로에서, nexthop 그룹이 검사와 사용 사이에 축소되면 널 포인터 역참조가 발생할 수 있습니다. 패치는 인덱스에 해당하는 경로가 없으면 순회를 중단하도록 수정합니다. 교체 작업에는 네트워크 네임스페이스에서 CAP_NET_ADMIN 권한이 필요합니다.
💡 쉬운 설명
네트워크 경로 정보를 갱신하는 과정에서 경로 목록이 동시에 줄어들면 커널이 존재하지 않는 항목을 읽으려다 충돌할 수 있습니다. 이 문제는 수정 코드로 존재하지 않는 항목에서 작업을 멈추도록 해결됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ipv4: stop PMTU walk when nexthop group shrinks
Commit 7d3f3b4367f3 ("net: ipv4: Cache pmtu for all packet paths if
multipath enabled") made __ip_rt_update_pmtu() update every path.
For nexthop objects, fib_info_num_path() and fib_info_nhc()
independently load nh->nh_grp. RCU protects each group's lifetime but
does not make the loads observe the same group. If replacement shrinks
the group after the loop accepts an index, fib_info_nhc() returns NULL
and update_or_create_fnhe() dereferences it.
A deterministic probe only widened the existing window between the real
operations. On v7.2, an RTM_NEWNEXTHOP replacement published a
one-member group after the PMTU reader accepted index 1 from a two-member
group, producing:
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
RIP: update_or_create_fnhe+0x45/0x15b0
Stop when the indexed path is absent. Groups are dense, so no later
index exists in that snapshot. The same real-writer window completed
114,423 PMTU iterations without an oops with this check. A reproducer
is available on request.
Replacement requires CAP_NET_ADMIN in the network namespace. Where
unprivileged user namespaces are permitted, a local user can obtain it
in a new user and network namespace.
📍 영향받는 시스템
패치가 적용되지 않은 Linux 커널 (CVSS 미정, 영향 버전 정확한 범위 확인 필요)
⚔️ 공격 벡터
네트워크 네임스페이스에서 CAP_NET_ADMIN 권한을 가진 로컬 사용자가 nexthop 그룹을 교체하며 PMTU 경로 갱신과 경합을 일으켜 커널 충돌(DoS)을 유발할 수 있으며, 비특권 사용자 네임스페이스가 허용된 환경에서는 일반 로컬 사용자도 이 권한을 얻을 수 있습니다.
🛡️ 대응 방법
배포판의 최신 커널 보안 업데이트를 적용하거나, 커널 소스에 해당 패치(ipv4: stop PMTU walk when nexthop group shrinks)를 반영한 뒤 재부팅합니다.
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지 또는 커널 패치 목록과 대조하여, 해당 수정이 포함된 버전 이상인지 확인합니다. 수정 이전 버전이면 취약할 수 있습니다.