🇰🇷 한글 설명
Linux 커널의 TCP 재전송 큐에서, 장치 암호화 전환 이후 큐잉된 skb가 이전 skb와 병합될 수 있는 문제가 수정되었습니다. 이로 인해 PSP 암호화 데이터가 평문으로 재전송되거나, TLS 장치 오프로드 연결이 재전송 반복으로 멈출 수 있었습니다. 수정은 tcp_write_collapse_fence() 대체 경로와 tcp_skb_can_collapse()의 decrypted 상태 검사를 추가하는 것입니다.
💡 쉬운 설명
네트워크 데이터를 나눠 보내는 과정에서 암호화해야 할 데이터와 평문 데이터가 잘못 합쳐질 수 있었습니다. 이 때문에 일부 데이터가 암호화되지 않은 채 다시 전송되거나 연결이 멈출 수 있었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tcp: prevent collapsing skbs across boundary in rtx queue
tcp_write_collapse_fence() sets TCP_SKB_CB(skb)->eor = 1 on
tcp_write_queue_tail(sk) to prevent skbs queued after a switch to
device encryption from being collapsed into earlier skbs.
The fence is a no-op if all earlier data has already been transmitted
when the switch happens: sk->sk_write_queue is empty. The not yet
acknowledged earlier skbs wait in sk->tcp_rtx_queue with eor 0.
On a subsequent retransmit or SACK shift, tcp_retrans_try_collapse() or
tcp_shift_skb_data() can then merge an skb queued after the switch into
one queued before it.
Both users of the fence are affected:
- psp: devices only encrypt skbs with skb->decrypted set. The merged skb
keeps decrypted = 0 from the earlier skb, so merged data sent after
psp_sock_assoc_set_tx() is retransmitted in cleartext.
- tls device offload: the merged skb straddles the start marker set in
tls_set_device_offload(). The software fallback (fill_sg_in() returns
-EINVAL) and the mlx5, nfp and funeth drivers cannot handle such an
skb and drop it. Every retransmit rebuilds the same skb, so the
connection stalls.
Fix this in two places, for defense in depth:
1. Fall back to tcp_rtx_queue_tail(sk) in tcp_write_collapse_fence()
when tcp_write_queue_tail(sk) is NULL.
2. Check !skb_cmp_decrypted(to, from) in tcp_skb_can_collapse(), as
tcp_skb_can_collapse_rx() does on receive. skb_shift(), which both
collapse paths call, already has a DEBUG_NET_WARN_ON_ONCE() for this
condition.
📍 영향받는 시스템
패치 이전의 Linux 커널 (PSP 또는 TLS 장치 오프로드를 사용하는 mlx5, nfp, funeth 드라이버 환경)
⚔️ 공격 벡터
네트워크 경로상의 공격자가 재전송 및 SACK 처리 시점을 유도해 암호화되지 않은 데이터 노출 또는 연결 서비스 거부를 일으킬 수 있습니다.
🛡️ 대응 방법
배포판이 제공하는 해당 CVE 수정이 포함된 Linux 커널 업데이트를 설치하고 재부팅합니다.
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지의 수정된 커널 버전과 비교하여, 같거나 높으면 패치가 적용된 것으로 판단합니다.