🇰🇷 한글 설명
Linux 커널의 rtnetlink 구성 요소에서 ifla_vf_broadcast 구조체가 스택에 초기화되지 않은 채 선언되어 발생하는 정보 유출 취약점입니다. 이로 인해 이더넷 장치의 VF(Virtual Function) 정보 요청 시 커널 스택에 남아있던 민감한 데이터가 사용자 공간으로 유출될 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제(커널)가 정보를 전달할 때, 비어있어야 할 공간에 이전에 사용했던 중요한 데이터가 섞여서 외부로 새어나가는 문제입니다. 공격자는 이를 통해 시스템의 중요한 보안 정보를 훔쳐볼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: rtnetlink: zero ifla_vf_broadcast to avoid stack infoleak in rtnl_fill_vfinfo
rtnl_fill_vfinfo() declares struct ifla_vf_broadcast on the stack
without initialisation:
struct ifla_vf_broadcast vf_broadcast;
The struct contains a single fixed 32-byte field:
/* include/uapi/linux/if_link.h */
struct ifla_vf_broadcast {
__u8 broadcast[32];
};
The function then copies dev->broadcast into it using dev->addr_len
as the length:
memcpy(vf_broadcast.broadcast, dev->broadcast, dev->addr_len);
On Ethernet devices (the overwhelming majority of SR-IOV NICs)
dev->addr_len is 6, so only the first 6 bytes of broadcast[] are
written. The remaining 26 bytes retain whatever was previously on
the kernel stack. The full struct is then handed to userspace via:
nla_put(skb, IFLA_VF_BROADCAST,
sizeof(vf_broadcast), &vf_broadcast)
leaking up to 26 bytes of uninitialised kernel stack per VF per
RTM_GETLINK request, repeatable.
The other vf_* structs in the same function are explicitly zeroed
for exactly this reason - see the memset() calls for ivi,
vf_vlan_info, node_guid and port_guid a few lines above.
vf_broadcast was simply missed when it was added.
Reachability: any unprivileged local process can open AF_NETLINK /
NETLINK_ROUTE without capabilities and send RTM_GETLINK with an
IFLA_EXT_MASK attribute carrying RTEXT_FILTER_VF. The kernel walks
each VF and emits IFLA_VF_BROADCAST, leaking 26 bytes of stack per
VF per request. Stack residue at this call site can include return
addresses and transient sensitive data; KASAN with stack
instrumentation, or KMSAN, will flag the nla_put() when reproduced.
Zero the on-stack struct before the partial memcpy, matching the
existing pattern used for the other vf_* structs in the same
function.
📍 영향받는 시스템
Linux kernel (rtnetlink 관련 모듈이 포함된 버전)
⚔️ 공격 벡터
권한이 없는 로컬 프로세스가 AF_NETLINK/NETLINK_ROUTE 소켓을 통해 RTM_GETLINK 요청을 전송
🛡️ 대응 방법
커널 패치를 통해 rtnl_fill_vfinfo() 함수 내의 ifla_vf_broadcast 구조체를 사용 전 0으로 초기화(memset)해야 함
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인하십시오.