🇰🇷 한글 설명
Linux 커널의 fou_create() 함수에서 사용 후 해제(Use-After-Free) 취약점이 발견되었습니다. 포트 추가 과정에서 오류가 발생할 경우, 이미 참조 가능한 상태인 객체를 해제하여 동시 실행 중인 프로세스가 해제된 메모리에 접근할 수 있는 문제가 있습니다.
💡 쉬운 설명
컴퓨터가 사용 중인 데이터를 실수로 지워버린 후, 다른 프로그램이 그 지워진 데이터를 다시 사용하려고 시도할 때 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fou: Fix use-after-free in fou_create()
fou_create() publishes struct fou through sk_user_data before adding the
new FOU port to the per-netns list. If fou_add_to_port_list() fails,
the error path frees fou while it is still reachable through
sk_user_data. A concurrent receive can then dereference the freed
object in fou_from_sock().
This ordering issue was previously noted in the linked discussion.
The failure is reachable when local port 0 is requested. Each socket
binds to a different ephemeral port, but fou_cfg_cmp() compares the
requested port 0 and reports -EALREADY once an entry already exists.
Release the tunnel socket before freeing fou so sk_user_data is cleared
first, and defer reclamation with kfree_rcu() to protect concurrent RCU
readers. This matches the lifetime handling in fou_release().
📍 영향받는 시스템
Linux Kernel (fou 관련 기능이 포함된 버전)
⚔️ 공격 벡터
로컬 포트 0을 요청하여 특정 오류 경로를 유도함으로써 메모리 참조 오류를 발생시킴
🛡️ 대응 방법
커널 패치를 통해 fou_create()의 객체 해제 순서를 수정하고 kfree_rcu()를 사용하여 메모리 관리를 안전하게 변경해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.