🇰🇷 한글 설명
Linux 커널의 net/mlx5e 드라이버에서 IPsec MAC 주소 쿼리 시 atomic context에서 sleep을 유발하는 '스케줄링 중 원자적 작업' 버그입니다. 하드웨어 쿼리 대신 netdev->dev_addr에서 직접 MAC 주소를 복사하도록 수정되었습니다.
💡 쉬운 설명
Mellanox 네트워크 드라이버에서 특정 상황에 시스템이 일시 중지하려다 허용되지 않는 곳에서 호출되는 버그입니다. 이미 사용 가능한 데이터를 직접 사용하도록 변경하여 수정했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Fix "scheduling while atomic" in IPsec MAC address query
Fix a "scheduling while atomic" bug in mlx5e_ipsec_init_macs() by
replacing mlx5_query_mac_address() with ether_addr_copy() to get the
local MAC address directly from netdev->dev_addr.
The issue occurs because mlx5_query_mac_address() queries the hardware
which involves mlx5_cmd_exec() that can sleep, but it is called from
the mlx5e_ipsec_handle_event workqueue which runs in atomic context.
The MAC address is already available in netdev->dev_addr, so no need
to query hardware. This avoids the sleeping call and resolves the bug.
Call trace:
BUG: scheduling while atomic: kworker/u112:2/69344/0x00000200
__schedule+0x7ab/0xa20
schedule+0x1c/0xb0
schedule_timeout+0x6e/0xf0
__wait_for_common+0x91/0x1b0
cmd_exec+0xa85/0xff0 [mlx5_core]
mlx5_cmd_exec+0x1f/0x50 [mlx5_core]
mlx5_query_nic_vport_mac_address+0x7b/0xd0 [mlx5_core]
mlx5_query_mac_address+0x19/0x30 [mlx5_core]
mlx5e_ipsec_init_macs+0xc1/0x720 [mlx5_core]
mlx5e_ipsec_build_accel_xfrm_attrs+0x422/0x670 [mlx5_core]
mlx5e_ipsec_handle_event+0x2b9/0x460 [mlx5_core]
process_one_work+0x178/0x2e0
worker_thread+0x2ea/0x430
📍 영향받는 시스템
Linux kernel with Mellanox mlx5 driver (net/mlx5e IPsec module)
⚔️ 공격 벡터
직접적 공격 벡터 없음 - IPsec 오프로드 작업 수행 시 시스템 불안정성 유발
🛡️ 대응 방법
Linux 커널 업데이트 (5.15.165+, 6.1.94+, 6.6.34+, 6.8.13+, 6.9+ 중 하나)
🔧 검증 코드
mlx5_core 드라이버 버전 또는 커널 버전(uname -r)을 확인하여 패치된 버전 이상인지 검증합니다.
modinfo mlx5_core 2>/dev/null | grep -E 'version|name' || uname -r