🇰🇷 한글 설명
Linux 커널의 efi/capsule-loader 구성 요소에서 물리 주소 배열 재할당 시 잘못된 크기가 계산되는 취약점이 발견되었습니다. 32비트 PAE 시스템에서 포인터 크기 대신 실제 주소 데이터 크기를 사용하지 않아 메모리 할당량이 부족해질 수 있으며, 이는 힙 버퍼 오버플로우로 이어질 수 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 저장할 공간을 예약할 때, 실제 필요한 양보다 절반만 예약하는 실수가 있었습니다. 이로 인해 넘치는 데이터가 다른 영역을 침범하여 시스템 오류나 보안 문제를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
efi/capsule-loader: fix incorrect sizeof in phys array reallocation
The krealloc() call for cap_info->phys in __efi_capsule_setup_info() uses
sizeof(phys_addr_t *) instead of sizeof(phys_addr_t), which might be
causing an undersized allocation.
The allocation is also inconsistent with the initial array allocation in
efi_capsule_open() that allocates one entry with sizeof(phys_addr_t),
and the efi_capsule_write() function that stores phys_addr_t values (not
pointers) via page_to_phys().
On 64-bit systems where sizeof(phys_addr_t) == sizeof(phys_addr_t *), this
goes unnoticed. On 32-bit systems with PAE where phys_addr_t is 64-bit but
pointers are 32-bit, this allocates half the required space, which might
lead to a heap buffer overflow when storing physical addresses.
This is similar to the bug fixed in commit fccfa646ef36 ("efi/capsule-loader:
fix incorrect allocation size") which fixed the same issue at the initial
allocation site.
📍 영향받는 시스템
32-bit PAE를 사용하는 Linux 커널 시스템 (efi/capsule-loader 구성 요소 포함)
⚔️ 공격 벡터
조작된 EFI 캡슐을 통해 물리 주소 배열의 재할당을 유도하여 힙 버퍼 오버플로우 발생
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 패치 버전 이후인지 확인