🇰🇷 한글 설명
Linux 커널의 mlx5e 드라이버에서 representor vnic 리포터의 생성 및 삭제 과정이 devlink 인스턴스 잠금(lock)에 의해 직렬화되지 않는 취약점이 발견되었습니다. 이로 인해 드라이버 언바인드 시 devl_assert_locked() 경고(splat)가 발생할 수 있습니다.
💡 쉬운 설명
네트워크 장치 드라이버를 제거할 때 시스템 내부의 보호 장치가 제대로 작동하지 않아 오류 메시지가 발생하는 문제입니다. 이는 시스템 안정성에 영향을 줄 수 있는 소프트웨어 설계상의 결함입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Move representor vnic reporter to eswitch devlink port
The representor vnic devlink health reporter is created and destroyed
along the representor netdev (un)load path, which is not serialized by
the devlink instance lock. Destroying the reporter from there triggers
a devl_assert_locked() splat on driver unbind:
WARNING: net/devlink/core.c:259 at devl_assert_locked+0x54/0x70, CPU#2: bash/3758
Modules linked in: mlx5_vdpa vringh vdpa mlx5_ib mlx5_fwctl mlx5_core ...
CPU: 2 UID: 0 PID: 3758 Comm: bash Tainted: G W 6.19.0+ #1 PREEMPT
Tainted: [W]=WARN
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), ...
RIP: 0010:devl_assert_locked+0x54/0x70
Call Trace:
<TASK>
devl_health_reporter_destroy+0x3a/0x1b0
mlx5e_vport_rep_unload+0x12d/0x2b0 [mlx5_core]
mlx5_eswitch_unregister_vport_reps+0x1b8/0x220 [mlx5_core]
? __esw_offloads_unload_rep+0x190/0x190 [mlx5_core]
? kernfs_remove_by_name_ns+0xc3/0xf0
device_release_driver_internal+0x3b2/0x560
unbind_store+0xce/0xf0
Move the reporter's lifecycle to the eswitch devlink port (un)register
paths, which are already serialized by the devlink instance lock, and
store the handle on mlx5_devlink_port. Use the port's mlx5_vport as the
reporter priv since the diagnose callback only needs a device handle and
a vport number, and mlx5_vport carries both and is initialized before
any representor driver probes.
📍 영향받는 시스템
Linux kernel (mlx5_core 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 네트워크 드라이버를 언바인드(unbind)할 때 발생 가능
🛡️ 대응 방법
리포터의 생명주기를 devlink 인스턴스 잠금이 적용되는 eswitch devlink 포트 경로로 이동시킨 최신 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인하십시오.