🇰🇷 한글 설명
Linux 커널의 crypto: ccp 구성 요소 내 snp_filter_reserved_mem_regions() 함수에서 off-by-one 오류가 발견되었습니다. 이 오류로 인해 할당된 페이지 크기를 초과하여 메모리에 데이터를 쓰는 힙 버퍼 오버플로우가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 메모리를 담는 그릇의 크기를 잘못 계산하여, 정해진 범위를 아주 조금 넘어서 데이터를 저장하는 문제가 있습니다. 이로 인해 시스템의 중요한 정보가 덮어씌워지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
crypto: ccp - Fix snp_filter_reserved_mem_regions() off-by-one
Sashiko notes:
> regarding the bounds check in snp_filter_reserved_mem_regions()
> called via walk_iomem_res_desc(): does the check
> if ((range_list->num_elements * 16 + 8) > PAGE_SIZE)
> allow an off-by-one heap buffer overflow?
>
> If range_list->num_elements is 255, 255 * 16 + 8 = 4088, which is <= 4096.
> Writing range->base (8 bytes) fills 4088-4095, but writing range->page_count
> (4 bytes) would write to 4096-4099, overflowing the kzalloc-allocated
> PAGE_SIZE buffer.
Fix this by accounting for the entry about to be written to, in addition to
the entries that are already allocated.
📍 영향받는 시스템
Linux Kernel (crypto: ccp 모듈 사용 시스템)
⚔️ 공격 벡터
특정 조건에서 메모리 범위를 조작하여 커널 힙 영역에 오버플로우를 유발하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.