🇰🇷 한글 설명
Linux 커널의 macsec 모듈에서 macsec_encrypt() 함수가 설정되지 않은 MAC 헤더를 읽어 발생하는 취약점입니다. AF_PACKET SOCK_RAW 경로를 통해 전송될 때 MAC 헤더가 설정되지 않아 12바이트의 힙 영역을 초과 읽게 되며, 이 데이터가 네트워크 프레임의 소스/목적지 MAC 주소로 노출될 수 있습니다.
💡 쉬운 설명
네트워크 보안 기능을 처리하는 과정에서 잘못된 메모리 위치를 읽어 시스템 내부 정보가 외부로 유출될 수 있는 문제입니다. 공격자가 조작된 패킷을 보내면 컴퓨터 메모리의 일부 내용이 네트워크를 통해 밖으로 새 나갈 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
macsec: don't read an unset MAC header in macsec_encrypt()
macsec_encrypt() reads the Ethernet header via eth_hdr(skb)
(skb->head + skb->mac_header) to memmove() the 12 source/destination MAC
bytes forward and make room for the SecTAG.
On the AF_PACKET SOCK_RAW + PACKET_QDISC_BYPASS transmit path the skb
reaches the macsec ndo_start_xmit() with the MAC header unset, so
eth_hdr(skb) resolves to skb->head + (u16)~0 and the read is out of
bounds: a 12-byte heap over-read that is also emitted on the wire as the
frame's outer source/destination MAC. KASAN reports a slab-out-of-bounds
read in macsec_start_xmit() on 6.0; on current mainline a CONFIG_DEBUG_NET
build flags it as an unset mac header in skb_mac_header().
On the TX path the L2 header is at skb->data, so use skb_eth_hdr(), added
by commit 96cc4b69581d ("macvlan: do not assume mac_header is set in
macvlan_broadcast()") for exactly this purpose.
📍 영향받는 시스템
Linux kernel (6.0 및 이전 버전 포함, CONFIG_DEBUG_NET 설정 시 감지 가능)
⚔️ 공격 벡터
AF_PACKET SOCK_RAW 및 PACKET_QDISC_BYPASS 전송 경로를 이용한 메모리 초과 읽기 유도
🛡️ 대응 방법
macsec_encrypt() 함수에서 eth_hdr() 대신 skb_eth_hdr()를 사용하도록 커널을 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 메인라인 커널 버전인지 확인하십시오.