🇰🇷 한글 설명
리눅스 커널의 net: ops_init 과정에서 발생하는 경계 외 메모리 접근(Out-of-bounds access) 취약점입니다. net_alloc_generic 함수가 잠금 장치 없이 max_gen_ptrs 값을 두 번 읽는 과정에서, 값이 변경될 경우 할당된 배열 크기보다 더 큰 길이를 참조하게 되어 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 메모리를 빌릴 때 적어둔 크기보다 더 많은 양을 사용하려고 시도하여 시스템 오류를 일으킬 수 있는 문제입니다. 여러 작업이 동시에 일어날 때 정보가 꼬이면서 발생하는 현상입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: fix out-of-bounds access in ops_init
net_alloc_generic is called by net_alloc, which is called without any
locking. It reads max_gen_ptrs, which is changed under pernet_ops_rwsem. It
is read twice, first to allocate an array, then to set s.len, which is
later used to limit the bounds of the array access.
It is possible that the array is allocated and another thread is
registering a new pernet ops, increments max_gen_ptrs, which is then used
to set s.len with a larger than allocated length for the variable array.
Fix it by reading max_gen_ptrs only once in net_alloc_generic. If
max_gen_ptrs is later incremented, it will be caught in net_assign_generic.
📍 영향받는 시스템
Linux Kernel (net subsystem 관련 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 네트워크 운영(pernet ops)을 등록하는 과정을 통해 레이스 컨디션을 유발하여 메모리 손상 유도
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 max_gen_ptrs를 한 번만 읽도록 수정된 코드를 적용해야 함
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 패치 버전인지 확인