🇰🇷 한글 설명
Linux 커널의 macsec 드라이버에서, 넷디바이스를 등록하기 전에 SecY가 초기화되지 않아 LRO 가능한 하위 장치 위에 MAC 오프로드 MACsec 장치를 생성할 때 rtmsg_ifinfo_build_skb()에서 경고가 발생하는 문제입니다. SecY 초기화와 새 링크 속성 적용을 등록 이전으로 옮기고, 통계 및 메타데이터 할당을 ndo_init()으로 이동하여 해결했습니다.
💡 쉬운 설명
리눅스 커널의 암호화 네트워크 기능(MACsec)에서 장치 설정 순서가 잘못되어 장치가 완전히 준비되기 전에 시스템에 알림이 전달되는 문제가 있었습니다. 이로 인해 경고가 발생하고 잘못된 정보가 보고될 수 있었으며, 이를 수정하는 패치가 적용되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
macsec: initialize SecY before registering the netdevice
Creating a MACsec device with MAC offload over an LRO-capable lower
device triggers a warning in rtmsg_ifinfo_build_skb() when IPv4
forwarding is enabled by default.
register_netdevice() invokes inetdev_init(), which disables LRO and emits
a NETDEV_FEAT_CHANGE notification. This reaches macsec_fill_info() before
macsec_add_dev() initializes the SecY. key_len is still zero, so
macsec_fill_info() returns -EMSGSIZE and trips the WARN_ON in
rtmsg_ifinfo_build_skb(), even though the skb has enough space.
Even without the warning, notifications during registration can report
uninitialized SecY attributes, including the SCI. This ordering has existed
since the driver was introduced.
Initialize the SecY and apply the new-link attributes before registration.
Move MAC address inheritance into macsec_newlink() so the SCI can also be
initialized before registration-time notifications report it. Move the
per-CPU statistics and metadata destination allocation into ndo_init(),
and release partial allocations on failure.
📍 영향받는 시스템
패치 이전의 Linux 커널 (macsec 드라이버를 사용하는 모든 배포판 및 버전)
⚔️ 공격 벡터
로컬 사용자 또는 권한을 가진 공격자가 MAC 오프로드 MACsec 장치를 생성해 커널 경고 및 잘못된 상태 알림을 유발할 수 있으며, 직접적인 원격 공격 경로는 명확하지 않습니다.
🛡️ 대응 방법
배포판 제공 최신 커널 패키지로 업데이트하고 재부팅하여 해당 커밋이 포함된 커널을 적용하십시오.
🔧 검증 코드
커널 버전을 확인하고 적용된 배포판 패치 노트 또는 해당 수정 커밋 포함 여부를 대조하여, 현재 커널이 수정된 버전인지 판단합니다.
uname -r && (modinfo macsec 2>/dev/null | grep -i version || echo 'macsec 모듈 정보 없음')