🇰🇷 한글 설명
Linux 커널의 VXLAN 드라이버에서 장치가 비활성화된 상태임에도 타이머가 작동하여 발생하는 Use-After-Free 취약점입니다. 장치가 종료될 때 타이머가 적절히 취소되지 않아, 이미 해제된 메모리 영역에 타이머 코어가 접근함으로써 시스템 오류나 권한 상승을 유발할 수 있습니다.
💡 쉬운 설명
네트워크 장치가 꺼져 있는데도 내부 시계가 계속 돌아가서, 이미 사라진 메모리 주소를 건드려 컴퓨터를 고장 내는 문제입니다. 공격자가 이를 이용해 시스템의 제어권을 뺏을 수도 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
vxlan: do not arm the ageing timer on a device that is down
vxlan_changelink() arms vxlan->age_timer whenever the requested ageing
interval differs from the configured one:
if (conf.age_interval != vxlan->cfg.age_interval)
mod_timer(&vxlan->age_timer, jiffies);
There is no netif_running() test, so the timer is armed even on a device
that was never brought up. The only synchronous cancel in the driver is
the timer_delete_sync() in vxlan_stop(), which is .ndo_stop.
netif_close_many() drops devices without IFF_UP before
__dev_close_many() runs, so that cancel is skipped for such a device.
vxlan_setup() sets dev->needs_free_netdev = true and age_timer is a
member of struct vxlan_dev, so free_netdev() releases the allocation the
timer lives in while it is still queued on a timer_base.
expire_timers() unlinks the entry before it loads timer->function, so
the timer core writes through the freed object's list pointers:
BUG: KASAN: slab-use-after-free in __run_timers+0x208/0x654
Write of size 8 at addr ffff00001adace68 by task true/192
__asan_store8+0x84/0xac
__run_timers+0x208/0x654
run_timer_softirq+0x154/0x18c
Allocated by task 189:
alloc_netdev_mqs+0x64/0x720
rtnl_create_link+0x4ac/0x520
rtnl_newlink+0x758/0xd00
Freed by task 191:
netdev_release+0x40/0x58
netdev_run_todo+0x4a4/0x8c0
rtnl_dellink+0x200/0x4e8
The rtnl operations involved are netns-scoped, so an unprivileged user
can perform them in a new user and network namespace.
Arming the timer on a down device never had an effect: vxlan_cleanup()
returns early on !netif_running(), and vxlan_open() arms the timer for
any non-zero interval once the device is brought up. Add the missing
test.
Discovered by XBOW, triaged by Baul Lee <
[email protected]>
📍 영향받는 시스템
Linux Kernel (VXLAN 드라이버를 사용하는 모든 버전)
⚔️ 공격 벡터
새로운 사용자 및 네트워크 네임스페이스를 생성하여 비특권 사용자가 VXLAN 장치를 조작함으로써 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 VXLAN 타이머 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인하십시오.