🇰🇷 한글 설명
Linux 커널의 ice 드라이버에서 tx_buf skb의 이중 해제(double-free) 취약점이 발견되었습니다. 특정 오류 경로에서 skb가 이미 해제되었음에도 불구하고 tx_buf가 여전히 유효한 것으로 표시되어, 인터페이스 종료 시 동일한 메모리를 다시 해제하려고 시도할 수 있습니다.
💡 쉬운 설명
네트워크 카드를 제어하는 소프트웨어에서 이미 사용이 끝난 메모리 공간을 실수로 두 번 삭제하려고 시도하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ice: fix double-free of tx_buf skb
If ice_tso() or ice_tx_csum() fail, the error path in
ice_xmit_frame_ring() frees the skb, but the 'first' tx_buf still points
to it and is marked as valid (ICE_TX_BUF_SKB).
'next_to_use' remains unchanged, so the potential problem will
likely fix itself when the next packet is transmitted and the tx_buf
gets overwritten. But if there is no next packet and the interface is
brought down instead, ice_clean_tx_ring() -> ice_unmap_and_free_tx_buf()
will find the tx_buf and free the skb for the second time.
The fix is to reset the tx_buf type to ICE_TX_BUF_EMPTY in the error
path, so that ice_unmap_and_free_tx_buf().
Move the initialization of 'first' up, to ensure it's already valid in
case we hit the linearization error path.
The bug was spotted by AI while I had it looking for something else.
It also proposed an initial version of the patch.
I reproduced the bug and tested the fix by adding code to inject
failures, on a build with KASAN.
I looked for similar bugs in related Intel drivers and did not find any.
📍 영향받는 시스템
Intel ice 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
네트워크 전송 과정에서 의도적으로 오류를 유발하여 메모리 해제 로직을 트리거하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.