🇰🇷 한글 설명
Linux 커널의 bonding 드라이버에서 가상 CAN(vxcan) 장치를 bonding 마스터에 종속시키려 할 때 발생하는 커널 페이지 요청 충돌 취약점입니다. CAN 장치는 이더넷과 구조가 달라 bonding 과정에서 필요한 데이터 구조가 초기화되지 않아 NULL 포인터 역참조 및 시스템 충돌을 유발합니다.
💡 쉬운 설명
네트워크 장치들을 하나로 묶어주는 기능이 CAN이라는 특수한 통신 장치를 잘못 처리하여 컴퓨터 시스템을 멈추게 만들 수 있는 문제입니다. CAN 장치는 일반적인 인터넷 연결 방식과 다르기 때문에 이 기능을 사용하지 못하도록 막아야 합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bonding: refuse to enslave CAN devices
syzbot reported a kernel paging request crash in
can_rx_unregister() inside net/can/af_can.c. The crash occurs
because a virtual CAN device (vxcan) is being enslaved to a
bonding master.
During the enslavement process, the bonding driver mutates
and modifies the network device states to fit an Ethernet-like
aggregation model. However, CAN devices operate on a completely
different Layer 2 architecture, relying on the CAN mid-layer
private data structure (can_ml_priv) instead of standard
Ethernet structures. Since bonding does not initialize or
maintain these CAN structures, subsequent operations on the
half-enslaved interface (such as closing associated sockets
via isotp_release) lead to a null-pointer dereference when
accessing the CAN receiver lists.
Bonding CAN interfaces is architecturally invalid as CAN lacks
MAC addresses, ARP capabilities, and standard Ethernet
link-layer mechanisms. While generic loopback devices are
blocked globally in net/core/dev.c, virtual CAN devices
bypass this check because they do not carry the IFF_LOOPBACK
flag, despite acting as local software-loopbacks.
Fix this by explicitly blocking network devices of type
ARPHRD_CAN from being enslaved at the very beginning of
bond_enslave(). This prevents illegal state mutations,
eliminates the resulting KASAN crashes, and avoids potential
memory leaks from incomplete socket cleanups.
As the CAN support has been added a long time after bonding
the Fixes-tag points to the introduction of ARPHRD_CAN that
would have needed a specific handling in bonding_main.c.
📍 영향받는 시스템
Linux Kernel (bonding driver 사용 환경)
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 가상 CAN 장치를 bonding 인터페이스에 종속시키는 조작을 수행하여 커널 패닉 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 bonding 드라이버의 CAN 장치 종속 차단 로직 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인