🇰🇷 한글 설명
리눅스 커널의 IPv4 UDP 경로에서, ICMP Fragmentation Needed 및 Redirect 메시지가 로컬 전달되고 UDP 패킷을 인용할 때 소켓 매칭에 성공해야만 FIB nexthop 예외(FNHE)가 생성되던 문제입니다. 이로 인해 외부의 공격자가 FNHE 캐시에 대한 부채널 공격으로 연결된 UDP 소켓의 임시 포트를 알아낼 수 있었으며, 소켓 매칭 이전에 FNHE를 항상 생성하도록 수정되었습니다.
💡 쉬운 설명
네트워크 오류 메시지를 이용해 컴퓨터가 사용 중인 통신 포트 번호를 외부에서 몰래 알아낼 수 있는 문제입니다. 커널이 이 정보를 캐시에 남기는 방식을 바꿔서 공격자가 결과를 관찰할 수 없도록 막았습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ipv4: udp: Create exceptions before socket matching
Currently, when ICMP Fragmentation Needed and Redirect Message packets
are locally delivered and quote a UDP packet, a FIB nexthop exception
(FNHE) is only created if the kernel can match the UDP packet to an
existing socket.
This behavior allows off-path attackers to conduct a side-channel attack
on the FNHE cache in order to discover the ephemeral port used by a
connected UDP socket.
Commit 6457378fe796 ("ipv4: use siphash instead of Jenkins in
fnhe_hashfun()") and commit 67d6d681e15b ("ipv4: make exception cache
less predictible") tried to mitigate such attacks by making it harder
for attackers to discover hash collisions in the FNHE cache and by
randomizing the number of exceptions a hash bucket can hold,
respectively. Unfortunately, both of the mitigations can be bypassed.
Instead, mitigate such attacks by always creating a FNHE, even before
trying to find a matching socket. Do that by calling ipv4_update_pmtu()
and ipv4_redirect(), the helpers used when the quoted packet did not
originate from a socket.
This means that guesses (right or wrong) from an off-path attacker will
always result in a FNHE being created or updated in the cache that the
attacker can observe.
Pass an oif of 0, in a similar fashion to icmp_err(). This is also the
oif used by the socket path for sockets that are not bound to a device.
Note that this does not allow attackers to create FNHEs that they could
not create before, as both helpers can already be reached with little to
no validation. For example, by sending an ICMP error that quotes an ICMP
Echo Reply or one that quotes a UDP source port that matches a wildcard
socket.
Also note that in the good case (matched socket) the above scheme comes
at the cost of an extra route lookup, as the no socket helpers perform
their own lookup before the one performed by ipv4_sk_update_pmtu() /
ipv4_sk_redirect(). When the two resolve to different nexthops, it also
results in two exceptions being created for the same destination IP. One
in the FNHE cache of the nexthop resolved by the no socket helpers and
another in the FNHE cache of the nexthop used by the socket.
📍 영향받는 시스템
패치 이전의 Linux 커널 버전 (CVE 정보상 구체적 영향 버전 미확인, 커널 배포판 보안 공지 확인 필요)
⚔️ 공격 벡터
네트워크 경로 외부의 공격자가 위조된 ICMP 오류/리다이렉트 메시지를 보내 FNHE 캐시 변화를 관찰하여 UDP 소켓의 에페메럴 포트를 추론
🛡️ 대응 방법
해당 수정이 포함된 Linux 커널 보안 업데이트를 배포판 공지에 따라 설치 후 재부팅
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지의 패치된 버전과 비교하여 수정 포함 여부를 확인하고, 낮은 버전이면 업데이트 필요