🇰🇷 한글 설명
Linux 커널의 i40e 드라이버에서 mac_filter_hash에 대한 동시 접근으로 인해 macvlan 메모리 누수가 발생하는 취약점이 발견되었습니다. 여러 스레드가 동시에 필터를 수정할 때 상태 불일치가 발생하며, 이를 해결하기 위해 spin_lock을 이용한 동기화 처리가 적용되었습니다.
💡 쉬운 설명
네트워크 카드의 드라이버가 여러 작업을 동시에 처리하다가 메모리를 제대로 정리하지 못하고 쌓아두는 버그가 있습니다. 이로 인해 시스템의 메모리가 점차 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
i40e: Fix macvlan leak by synchronizing access to mac_filter_hash
This patch addresses a macvlan leak issue in the i40e driver caused by
concurrent access to vsi->mac_filter_hash. The leak occurs when multiple
threads attempt to modify the mac_filter_hash simultaneously, leading to
inconsistent state and potential memory leaks.
To fix this, we now wrap the calls to i40e_del_mac_filter() and zeroing
vf->default_lan_addr.addr with spin_lock/unlock_bh(&vsi->mac_filter_hash_lock),
ensuring atomic operations and preventing concurrent access.
Additionally, we add lockdep_assert_held(&vsi->mac_filter_hash_lock) in
i40e_add_mac_filter() to help catch similar issues in the future.
Reproduction steps:
1. Spawn VFs and configure port vlan on them.
2. Trigger concurrent macvlan operations (e.g., adding and deleting
portvlan and/or mac filters).
3. Observe the potential memory leak and inconsistent state in the
mac_filter_hash.
This synchronization ensures the integrity of the mac_filter_hash and prevents
the described leak.
📍 영향받는 시스템
i40e 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
동시에 여러 개의 macvlan 필터 추가/삭제 작업을 수행하여 메모리 누수 유도
🛡️ 대응 방법
i40e 드라이버의 동기화 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.