🇰🇷 한글 설명
Linux 커널의 net/tls 구성 요소에서 TLS 오프로드 장치가 재시작될 때 발생하는 Use-After-Free 취약점입니다. 네트워크 장치가 다운되었다가 다시 활성화될 때, 이미 해제된 TLS 컨텍스트를 소켓이 참조하여 메모리 오류를 유발할 수 있습니다.
💡 쉬운 설명
네트워크 카드가 잠시 꺼졌다가 다시 켜질 때, 컴퓨터가 이미 지워버린 데이터를 다시 사용하려고 시도하면서 시스템 오류가 발생하는 문제입니다. 이로 인해 시스템이 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/tls: Fix use-after-free after the TLS device goes down and up
When a netdev with active TLS offload goes down, tls_device_down is
called to stop the offload and tear down the TLS context. However, the
socket stays alive, and it still points to the TLS context, which is now
deallocated. If a netdev goes up, while the connection is still active,
and the data flow resumes after a number of TCP retransmissions, it will
lead to a use-after-free of the TLS context.
This commit addresses this bug by keeping the context alive until its
normal destruction, and implements the necessary fallbacks, so that the
connection can resume in software (non-offloaded) kTLS mode.
On the TX side tls_sw_fallback is used to encrypt all packets. The RX
side already has all the necessary fallbacks, because receiving
non-decrypted packets is supported. The thing needed on the RX side is
to block resync requests, which are normally produced after receiving
non-decrypted packets.
The necessary synchronization is implemented for a graceful teardown:
first the fallbacks are deployed, then the driver resources are released
(it used to be possible to have a tls_dev_resync after tls_dev_del).
A new flag called TLS_RX_DEV_DEGRADED is added to indicate the fallback
mode. It's used to skip the RX resync logic completely, as it becomes
useless, and some objects may be released (for example, resync_async,
which is allocated and freed by the driver).
📍 영향받는 시스템
TLS 오프로드 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
네트워크 장치의 상태 변화(Down/Up)를 유도하여 메모리 참조 오류를 일으키는 방식
🛡️ 대응 방법
TLS 컨텍스트 유지 및 소프트웨어 폴백(fallback) 기능이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 보안 업데이트 버전인지 확인합니다.