🇰🇷 한글 설명
Linux 커널의 net-shapers 모듈에서 genlmsg_reply() 실패 시 이미 netlink에 의해 소비된 skb를 추가로 해제하는 double-free 버그입니다. net_shaper_nl_get_doit()과 net_shaper_nl_cap_get_doit() 함수에서 발생하며, 로컬 공격자가 악용하여 커널 메모리 손상을 유발할 수 있습니다.
💡 쉬운 설명
Linux 커널이 네트워크 메시지 응답 시 메모리를 두 번 해제하는 버그입니다. 로컬 사용자가 특정 명령을 실행하면 시스템이 크래시되거나 권한 상승이 가능합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net-shapers: don't free reply skb after genlmsg_reply()
genlmsg_reply() hands the reply skb to netlink, and
netlink_unicast() consumes it on all return paths, whether the
skb is queued successfully or freed on an error path.
net_shaper_nl_get_doit() and net_shaper_nl_cap_get_doit()
currently jump to free_msg after genlmsg_reply() fails and call
nlmsg_free(msg), which can hit the same skb twice.
Return the genlmsg_reply() error directly and keep free_msg
only for pre-reply failures.
📍 영향받는 시스템
Linux kernel 6.x 계열 (net-shapers 모듈 활성화된 시스템)
⚔️ 공격 벡터
로컬 공격자가 netlink 인터페이스를 통해 특정 메시지 전송으로 double-free 트리거
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업그레이드하여 패치 적용 (6.x 최신 버전)
🔧 검증 코드
커널 버전이 6.x 미만이거나 수정된 6.x 버전이 아닐 경우 'Vulnerable version detected' 출력. uname -r로 정확한 버전 확인 후 커널 업그레이드 필요 여부 판단
uname -r | grep -E '^(5\.|6\.[0-9]+\.[0-9]+)' && echo 'Vulnerable version detected' || echo 'Check kernel version manually'