🇰🇷 한글 설명
Linux 커널의 Aquantia Atlantic 이더넷 드라이버에서 for 루프의 마지막 업데이트 구문이 배열 범위를 초과하여 aq_vec 배열 인덱스 범위 초과 오류가 발생합니다. 이로 인해 self->aq_vec[i] 역참조 시 검사가 이루어지지 않아 UBSAN 경고와 함께 잠재적 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
네트워크 카드 드라이버의 반복문이 배열의 끝을 넘어서 잘못된 메모리를 읽는 버그입니다. 이로 인해 전원 관리(절전/종료) 과정에서 시스템이 불안정해지거나 중단될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: atlantic: fix aq_vec index out of range error
The final update statement of the for loop exceeds the array range, the
dereference of self->aq_vec[i] is not checked and then leads to the
index out of range error.
Also fixed this kind of coding style in other for loop.
[ 97.937604] UBSAN: array-index-out-of-bounds in drivers/net/ethernet/aquantia/atlantic/aq_nic.c:1404:48
[ 97.937607] index 8 is out of range for type 'aq_vec_s *[8]'
[ 97.937608] CPU: 38 PID: 3767 Comm: kworker/u256:18 Not tainted 5.19.0+ #2
[ 97.937610] Hardware name: Dell Inc. Precision 7865 Tower/, BIOS 1.0.0 06/12/2022
[ 97.937611] Workqueue: events_unbound async_run_entry_fn
[ 97.937616] Call Trace:
[ 97.937617] <TASK>
[ 97.937619] dump_stack_lvl+0x49/0x63
[ 97.937624] dump_stack+0x10/0x16
[ 97.937626] ubsan_epilogue+0x9/0x3f
[ 97.937627] __ubsan_handle_out_of_bounds.cold+0x44/0x49
[ 97.937629] ? __scm_send+0x348/0x440
[ 97.937632] ? aq_vec_stop+0x72/0x80 [atlantic]
[ 97.937639] aq_nic_stop+0x1b6/0x1c0 [atlantic]
[ 97.937644] aq_suspend_common+0x88/0x90 [atlantic]
[ 97.937648] aq_pm_suspend_poweroff+0xe/0x20 [atlantic]
[ 97.937653] pci_pm_suspend+0x7e/0x1a0
[ 97.937655] ? pci_pm_suspend_noirq+0x2b0/0x2b0
[ 97.937657] dpm_run_callback+0x54/0x190
[ 97.937660] __device_suspend+0x14c/0x4d0
[ 97.937661] async_suspend+0x23/0x70
[ 97.937663] async_run_entry_fn+0x33/0x120
[ 97.937664] process_one_work+0x21f/0x3f0
[ 97.937666] worker_thread+0x4a/0x3c0
[ 97.937668] ? process_one_work+0x3f0/0x3f0
[ 97.937669] kthread+0xf0/0x120
[ 97.937671] ? kthread_complete_and_exit+0x20/0x20
[ 97.937672] ret_from_fork+0x22/0x30
[ 97.937676] </TASK>
v2. fixed "warning: variable 'aq_vec' set but not used"
v3. simplified a for loop
📍 영향받는 시스템
Linux 커널 5.19 계열 등 Aquantia Atlantic(AQC107 등) 이더넷 드라이버를 사용하는 시스템
⚔️ 공격 벡터
주로 로컬 또는 하드웨어 상태에 따른 오작동이며, 공격자가 이를 악용해 시스템을 불안정하게 만들 수 있음 (직접적인 원격 공격 경로는 명확하지 않음)
🛡️ 대응 방법
패치된 최신 Linux 커널(해당 커밋 반영 버전)로 업데이트하거나 배포판의 보안 업데이트를 적용
🔧 검증 코드
커널 버전이 패치가 반영된 버전 이상인지 확인하고, atlantic 모듈이 로드되어 있지 않다면 이 취약점의 영향을 받지 않음을 의미하며, 로드되어 있다면 커널 업데이트 여부를 점검해야 함
uname -r && (lsmod | grep -i atlantic || echo 'atlantic module not loaded')