🇰🇷 한글 설명
Linux 커널의 macb 네트워크 드라이버에서 fixed-link 설정 시 MDIO 버스가 할당되지 않아 발생하는 NULL 포인터 역참조 취약점입니다. 이로 인해 드라이버 언바인드(unbind) 또는 프로브(probe) 오류 발생 시 커널 패닉(Oops)이 발생할 수 있습니다.
💡 쉬운 설명
네트워크 장치를 연결하거나 해제하는 과정에서 시스템이 존재하지 않는 주소를 참조하여 컴퓨터가 갑자기 멈추거나 오류를 일으키는 문제입니다. 특정 설정 환경에서 장치 드라이버가 작동할 때 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: macb: fix NULL pointer dereference on unbind with fixed-link
When the device tree describes a fixed-link and has no "mdio" child
node, macb_mii_init() returns early without allocating the MDIO bus,
leaving bp->mii_bus as NULL.
Two cleanup paths then dereference this NULL bus:
1. On driver unbind, macb_remove() unconditionally calls
mdiobus_unregister(bp->mii_bus), which oopses:
Unable to handle kernel NULL pointer dereference at virtual address 00000000000004a8
pc : mdiobus_unregister+0x14/0xa4
lr : macb_remove+0x38/0xa4
Call trace:
mdiobus_unregister+0x14/0xa4 (P)
macb_remove+0x38/0xa4
platform_remove+0x20/0x30
device_release_driver_internal+0x1c8/0x224
unbind_store+0xb4/0xbc
2. On the probe error path in macb_probe(), reached when
macb_mii_init() has succeeded but a subsequent step fails, the
err_out_unregister_mdio label runs the same unconditional cleanup.
mdiobus_unregister() and mdiobus_free() do not guard against a NULL
bus, so guard the calls in both macb_remove() and the probe error
path.
📍 영향받는 시스템
Linux kernel (macb driver 사용 시스템)
⚔️ 공격 벡터
로컬 환경에서 특정 디바이스 트리(Device Tree) 설정을 가진 장치를 언바인드하거나 프로브 오류를 유도하여 커널 패닉 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 macb_remove 및 macb_probe의 NULL 체크 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인