🇰🇷 한글 설명
Linux 커널의 emac_mac_tx_buf_send 함수에서 Use-After-Free 취약점이 발견되었습니다. emac_tx_fill_tpd 함수 실행 중 오류가 발생하여 skb(소켓 버퍼)가 해제되었음에도 불구하고, 이후 코드에서 해제된 skb의 길이를 참조하여 메모리 오류를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터가 이미 사용이 끝나서 버린 메모리 상자를 다시 열어서 내용을 확인하려다 발생하는 오류입니다. 이 과정에서 시스템이 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send
In emac_mac_tx_buf_send, it calls emac_tx_fill_tpd(..,skb,..).
If some error happens in emac_tx_fill_tpd(), the skb will be freed via
dev_kfree_skb(skb) in error branch of emac_tx_fill_tpd().
But the freed skb is still used via skb->len by netdev_sent_queue(,skb->len).
As i observed that emac_tx_fill_tpd() haven't modified the value of skb->len,
thus my patch assigns skb->len to 'len' before the possible free and
use 'len' instead of skb->len later.
📍 영향받는 시스템
emac 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
네트워크 패킷 전송 과정에서 특정 오류를 유도하여 메모리 해제 후 재참조 발생
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 패치된 최신 버전인지 확인