🇰🇷 한글 설명
Linux 커널의 TCP 스택에서 제로카피(zero-copy)를 사용하지 않는 devmem 전송을 적절히 차단하지 못하는 취약점이 발견되었습니다. 이로 인해 dma-buf 오프셋을 사용하는 데이터 복사 과정에서 불변성이 깨지거나 시스템 오류가 발생할 수 있습니다. 패치는 제로카피가 없는 devmem 전송을 거부하고 검증 로직을 강화하여 이를 해결합니다.
💡 쉬운 설명
데이터를 효율적으로 보내는 특수 기능(devmem)을 사용할 때, 보안 규칙을 어기고 잘못된 방식으로 데이터를 처리하여 시스템에 문제를 일으킬 수 있는 결함입니다. 이를 통해 데이터가 섞이거나 시스템이 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tcp: reject non zerocopy devmem tx
Devmem tcp tx doesn't work without zero-copy, however it's not currently
enforced if NETIF_F_SG isn't present. In this case, tcp_sendmsg_locked()
will try the copy path and try to copy data from an iovec which consists
of offsets into the dma-buf and would normally fail. Moreover,
d9c56501c72fd ("net: tcp: block mixing readable and unreadable frags")
relies on that and assumes that the devmem binding is present IFF we're
using the zero-copy path, which can be used to mix net-iov and pages in
a single skb, and break invariants. Let's reject devmem tx without
zero-copy.
Note, the parameter check the patch is modifying is too loose, we can
create an io_uring request with dmabuf_id and all ZC flags, but which
won't have the binding. We replace it with stricter validation.
📍 영향받는 시스템
Linux Kernel (devmem 및 zero-copy 관련 기능이 활성화된 버전)
⚔️ 공격 벡터
io_uring 등을 통해 제로카피 플래그를 설정한 후 유효하지 않은 devmem 바인딩을 이용한 데이터 전송 시도
🛡️ 대응 방법
최신 보안 패치가 적용된 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인