🇰🇷 한글 설명
Linux 커널의 ethtool netlink 모듈에서 ethnl_req_get_phydev() 함수가 nlattr 헤더를 NULL 검사 없이 사용하여 발생하는 취약점입니다. 알림(notify) 경로에서 요청 속성이 없을 때 커널 크래시가 발생할 수 있으며, 이는 PLCA 명령에서만 해당됩니다. 패치는 cmd 인덱스와 nlattr 배열을 분리 전달하고 헬퍼 내부에서 NULL 검사를 수행하도록 수정합니다.
💡 쉬운 설명
리눅스 커널의 네트워크 설정 기능에서 특정 상황에 잘못된 데이터를 참조해 시스템이 멈추는 문제입니다. 이 문제는 주로 시스템 안정성에 영향을 주며 커널 업데이트로 해결할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: ethtool: netlink: Allow NULL nlattrs when getting a phy_device
ethnl_req_get_phydev() is used to lookup a phy_device, in the case an
ethtool netlink command targets a specific phydev within a netdev's
topology.
It takes as a parameter a const struct nlattr *header that's used for
error handling :
if (!phydev) {
NL_SET_ERR_MSG_ATTR(extack, header,
"no phy matching phyindex");
return ERR_PTR(-ENODEV);
}
In the notify path after a ->set operation however, there's no request
attributes available.
The typical callsite for the above function looks like:
phydev = ethnl_req_get_phydev(req_base, tb[ETHTOOL_A_XXX_HEADER],
info->extack);
So, when tb is NULL (such as in the ethnl notify path), we have a nice
crash.
It turns out that there's only the PLCA command that is in that case, as
the other phydev-specific commands don't have a notification.
This commit fixes the crash by passing the cmd index and the nlattr
array separately, allowing NULL-checking it directly inside the helper.
📍 영향받는 시스템
Linux 커널 (패치 적용 이전의 6.x 계열 등 해당 커밋 이전 버전), 배포판별 커널 패키지
⚔️ 공격 벡터
로컬 또는 권한을 가진 사용자가 특정 ethtool netlink 알림 경로를 유발하여 커널 크래시(서비스 거부)를 일으킬 수 있음
🛡️ 대응 방법
배포판 벤더가 제공하는 최신 커널 보안 업데이트를 설치하고 재부팅합니다.
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지(예: 벤더 CVE 페이지)의 패치된 버전과 비교하여, 해당 수정이 포함된 빌드인지 확인합니다.