🇰🇷 한글 설명
Linux 커널의 rtnetlink 구성 요소에서 IFLA_BRIDGE_FLAGS 속성을 처리하는 과정 중 논리 오류가 발견되었습니다. 이전 패치로 인해 루프 구조가 변경되면서 잘못된 메모리 주소를 참조하게 되어, 데이터 쓰기 시 오버플로우가 발생할 수 있는 취약점입니다.
💡 쉬운 설명
네트워크 설정을 변경하는 과정에서 컴퓨터의 메모리 주소를 잘못 계산하여, 허용되지 않은 영역에 데이터를 써버릴 수 있는 문제입니다. 이를 통해 시스템의 안정성을 해치거나 보안을 위협할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
rtnetlink: fix error logic of IFLA_BRIDGE_FLAGS writing back
In the commit d73ef2d69c0d ("rtnetlink: let rtnl_bridge_setlink checks
IFLA_BRIDGE_MODE length"), an adjustment was made to the old loop logic
in the function `rtnl_bridge_setlink` to enable the loop to also check
the length of the IFLA_BRIDGE_MODE attribute. However, this adjustment
removed the `break` statement and led to an error logic of the flags
writing back at the end of this function.
if (have_flags)
memcpy(nla_data(attr), &flags, sizeof(flags));
// attr should point to IFLA_BRIDGE_FLAGS NLA !!!
Before the mentioned commit, the `attr` is granted to be IFLA_BRIDGE_FLAGS.
However, this is not necessarily true fow now as the updated loop will let
the attr point to the last NLA, even an invalid NLA which could cause
overflow writes.
This patch introduces a new variable `br_flag` to save the NLA pointer
that points to IFLA_BRIDGE_FLAGS and uses it to resolve the mentioned
error logic.
📍 영향받는 시스템
Linux Kernel (rtnetlink 관련 모듈을 사용하는 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 특수하게 조작된 rtnetlink 메시지를 전송하여 메모리 오버플로우 유도
🛡️ 대응 방법
커널 패치(commit d73ef2d69c0d 이후 버전)를 적용하여 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인