🇰🇷 한글 설명
Linux 커널의 net/atm 모듈 내 vcc_setsockopt() 함수에서 slab-out-of-bounds read 취약점이 발견되었습니다. 잘못된 옵션 레벨 전달 시 길이 검사가 우회되거나 cgroup BPF 필터에 의해 길이가 축소될 경우, 커널 메모리의 범위를 벗어난 읽기가 발생할 수 있습니다.
💡 쉬운 설명
리눅스 운영체제의 네트워크 통신 기능에서 데이터 크기를 제대로 확인하지 못하는 오류가 있습니다. 공격자가 이를 악용하면 시스템의 중요한 메모리 정보를 몰래 읽어낼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/atm: fix slab-out-of-bounds read in vcc_setsockopt()
vcc_setsockopt() contained an ineffective optlen check:
if (__SO_LEVEL_MATCH(optname, level) && optlen != __SO_SIZE(optname))
return -EINVAL;
If __SO_LEVEL_MATCH(optname, level) evaluated to false (e.g. if the caller
passed a mismatched level), the length check optlen != __SO_SIZE(optname)
was short-circuited and bypassed. Execution then fell through to switch(optname),
calling copy_from_sockptr() assuming optval contained sufficient space.
Furthermore, even if level matched, a cgroup BPF setsockopt filter could shrink
optlen after entry. Because copy_from_sockptr() on kernel pointers uses memcpy(),
this leads to a KASAN slab-out-of-bounds read when optlen is smaller than the
expected structure size.
Fix this by using copy_safe_from_sockptr(), which unconditionally validates
that optlen is at least the expected size before copying. Also change the local
'value' variable type from 'unsigned long' to 'int' so that SO_SETCLP matches
its sizeof(int) ABI encoding on 64-bit systems.
📍 영향받는 시스템
Linux kernel (net/atm 모듈을 사용하는 시스템)
⚔️ 공격 벡터
잘못된 옵션 레벨을 전달하거나 cgroup BPF 필터를 사용하여 optlen을 조작함으로써 발생
🛡️ 대응 방법
copy_safe_from_sockptr()를 사용하여 데이터 크기를 검증하도록 커널을 업데이트하고 관련 변수 타입을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.