🇰🇷 한글 설명
Linux 커널의 mlx5e 드라이버에서 mlx5e_tx_reporter_timeout_recover 함수 실행 시 Use-After-Free 취약점이 발견되었습니다. 채널이 해제되고 메모리가 해제된 이후에 해당 메모리에 접근하여 발생하는 문제로, 이를 priv->netdev 참조로 변경하여 해결했습니다.
💡 쉬운 설명
컴퓨터의 네트워크 장치를 관리하는 프로그램이 이미 삭제된 메모리 영역을 다시 사용하려고 시도할 때 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Fix use-after-free in mlx5e_tx_reporter_timeout_recover
mlx5e_tx_reporter_timeout_recover() accesses sq->netdev after
mlx5e_safe_reopen_channels() has torn down and freed the channel (and
its embedded SQs). Replace the three sq->netdev references with
priv->netdev which is safe because priv outlives channel teardown.
The netdev_err() call already used priv->netdev for this reason; make
the trylock/unlock and health_channel_eq_recover calls consistent.
This fixes the following KASAN splat:
BUG: KASAN: use-after-free in mlx5e_tx_reporter_timeout_recover+0x1dd/0x360 [mlx5_core]
Read of size 8 at addr ffff889860ed0b28 by task kworker/u113:2/5277
Call Trace:
mlx5e_tx_reporter_timeout_recover+0x1dd/0x360 [mlx5_core]
devlink_health_reporter_recover+0xa2/0x150
devlink_health_report+0x254/0x7c0
mlx5e_reporter_tx_timeout+0x297/0x380 [mlx5_core]
mlx5e_tx_timeout_work+0x109/0x170 [mlx5_core]
process_one_work+0x677/0xf20
worker_thread+0x51f/0xd90
kthread+0x3a5/0x810
ret_from_fork+0x208/0x400
ret_from_fork_asm+0x1a/0x30
📍 영향받는 시스템
Linux kernel (mlx5_core 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
네트워크 채널의 타임아웃 및 복구 과정을 유도하여 메모리 오류를 발생시키는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.