🇰🇷 한글 설명
Linux 커널의 RDMA/hns 드라이버에서 드라이버 제거와 리셋이 동시에 발생할 때 본딩 리소스의 메모리 누수가 발생하는 취약점입니다. 이로 인해 메모리가 누수될 뿐만 아니라, 누수된 알림 콜백으로 인해 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품을 제거하거나 초기화하는 과정에서 메모리가 제대로 정리되지 않고 쌓이는 문제입니다. 이 문제가 지속되면 시스템이 갑자기 멈추거나 꺼지는 현상이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/hns: Fix memory leak of bonding resources
In a corner case of concurrent driver removal and driver reset,
bonding resource is first released in hns_roce_hw_v2_exit() during
driver removal, and then is allocated again in hns_roce_register_device()
during driver reset. This leads to memory leak because the release
timing has already passed. This may also lead to a kernel panic
as below because of the leaked notifier callback:
Call trace:
0xffffa20fccc04978 (P)
raw_notifier_call_chain+0x20/0x38
call_netdevice_notifiers_info+0x60/0xb8
netdev_lower_state_changed+0x4c/0xb8
As Sashiko suggested, the teardown order of bonding resources should
be inverted to make sure the resources are released when the driver
is removed.
📍 영향받는 시스템
Linux Kernel (RDMA/hns 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
드라이버 제거와 리셋을 동시에 유도하는 특수한 상황을 통한 로컬 공격 가능성
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 본딩 리소스 해제 순서를 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.