🇰🇷 한글 설명
Linux 커널의 CAN(Controller Area Network) J1939 프로토콜에서 네트워크 장치가 해제될 때 참조 카운트를 적절히 감소시키지 못하는 취약점이 발견되었습니다. 이로 인해 j1939_sk_bind() 호출 시 생성된 참조가 해제되지 않아 unregister_netdevice() 과정에서 장치가 자유 상태가 되지 못하고 대기 상태에 빠지는 문제가 발생합니다.
💡 쉬운 설명
네트워크 장치를 제거하려고 할 때, 특정 프로그램이 장치를 여전히 사용 중이라고 잘못 인식하여 장치가 완전히 꺼지지 않는 문제입니다. 이로 인해 시스템이 장치 해제 프로세스를 완료하지 못하고 멈춰버릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
can: j1939: implement NETDEV_UNREGISTER notification handler
syzbot is reporting
unregister_netdevice: waiting for vcan0 to become free. Usage count = 2
problem, for j1939 protocol did not have NETDEV_UNREGISTER notification
handler for undoing changes made by j1939_sk_bind().
Commit 25fe97cb7620 ("can: j1939: move j1939_priv_put() into sk_destruct
callback") expects that a call to j1939_priv_put() can be unconditionally
delayed until j1939_sk_sock_destruct() is called. But we need to call
j1939_priv_put() against an extra ref held by j1939_sk_bind() call
(as a part of undoing changes made by j1939_sk_bind()) as soon as
NETDEV_UNREGISTER notification fires (i.e. before j1939_sk_sock_destruct()
is called via j1939_sk_release()). Otherwise, the extra ref on "struct
j1939_priv" held by j1939_sk_bind() call prevents "struct net_device" from
dropping the usage count to 1; making it impossible for
unregister_netdevice() to continue.
[mkl: remove space in front of label]
📍 영향받는 시스템
Linux Kernel (J1939 프로토콜을 사용하는 시스템)
⚔️ 공격 벡터
로컬 시스템에서 네트워크 장치(vcan0 등)를 생성하고 해제하는 과정을 반복하여 리소스 해제 지연을 유도할 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 NETDEV_UNREGISTER 알림 핸들러를 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 커널 패치 버전 이후인지 확인하십시오.