🇰🇷 한글 설명
Linux 커널의 EFI/CPER 처리 코드에서 ARM 프로세서 CPER 레코드의 section_length 값이 지나치게 클 때 이를 검증하지 않아, 펌웨어 메모리 영역을 벗어나 과도한 데이터를 덤프하는 문제가 있었습니다. 이 수정은 ERR_INFO_NUM이 버퍼 범위를 초과하면 버퍼를 넘지 않도록 막고 오류 정보를 보고하도록 합니다.
💡 쉬운 설명
펌웨어가 잘못된 하드웨어 오류 기록을 보내면 리눅스 커널이 그 기록의 길이를 검사 없이 믿어서 허용된 메모리 범위를 넘어 데이터를 읽었습니다. 이번 수정으로 커널이 범위를 확인하고 잘못된 기록이라는 것만 보고하게 됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
EFI/CPER: don't go past the ARM processor CPER record buffer
There's a logic inside GHES/CPER to detect if the section_length
is too small, but it doesn't detect if it is too big.
Currently, if the firmware receives an ARM processor CPER record
stating that a section length is big, kernel will blindly trust
section_length, producing a very long dump. For instance, a 67
bytes record with ERR_INFO_NUM set 46198 and section length
set to 854918320 would dump a lot of data going a way past the
firmware memory-mapped area.
Fix it by adding a logic to prevent it to go past the buffer
if ERR_INFO_NUM is too big, making it report instead:
[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
[Hardware Error]: event severity: recoverable
[Hardware Error]: Error 0, type: recoverable
[Hardware Error]: section_type: ARM processor error
[Hardware Error]: MIDR: 0xff304b2f8476870a
[Hardware Error]: section length: 854918320, CPER size: 67
[Hardware Error]: section length is too big
[Hardware Error]: firmware-generated error record is incorrect
[Hardware Error]: ERR_INFO_NUM is 46198
[ rjw: Subject and changelog tweaks ]
📍 영향받는 시스템
패치가 적용되지 않은 Linux 커널 (EFI/CPER·GHES 기능을 사용하는 시스템)
⚔️ 공격 벡터
악성 또는 손상된 펌웨어가 크기 필드를 조작한 ARM 프로세서 CPER 레코드를 전달하여 커널의 과도한 메모리 읽기를 유발
🛡️ 대응 방법
배포판에서 제공하는 보안 업데이트 적용 또는 수정이 포함된 최신 커널로 업그레이드 후 재부팅
🔧 검증 코드
출력된 커널 버전을 배포판의 보안 공지나 패치된 버전 목록과 비교하여, 수정이 포함된 빌드인지 확인합니다.