🇰🇷 한글 설명
Linux 커널의 blk_add_partition() 함수에서 오류 처리 로직 개선 중 발생한 취약점으로, 특정 오류 경로에서 part 포인터가 유효하지 않은 상태로 md_autodetect_dev()가 호출될 수 있습니다. 이로 인해 커널 패닉이나 시스템 불안정을 초래할 수 있습니다.
💡 쉬운 설명
Linux 커널의 디스크 분할 처리 코드에서 오류 검사 누락으로 인해 잘못된 메모리 주소에 접근할 수 있습니다. 이는 시스템 충돌이나 DoS를 유발할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
block: fix potential invalid pointer dereference in blk_add_partition
The blk_add_partition() function initially used a single if-condition
(IS_ERR(part)) to check for errors when adding a partition. This was
modified to handle the specific case of -ENXIO separately, allowing the
function to proceed without logging the error in this case. However,
this change unintentionally left a path where md_autodetect_dev()
could be called without confirming that part is a valid pointer.
This commit separates the error handling logic by splitting the
initial if-condition, improving code readability and handling specific
error scenarios explicitly. The function now distinguishes the general
error case from -ENXIO without altering the existing behavior of
md_autodetect_dev() calls.
📍 영향받는 시스템
Linux kernel 5.10+ (정확한 영향 범위는 배포판 커널 백포트에 따라 다름)
⚔️ 공격 벡터
로컬 - 특정 디스크 파티션 작업 또는 USB 장치 추가 시 트리거 가능
🛡️ 대응 방법
배포판 커널 보안 업데이트 적용 또는 최신 커널로 업그레이드
🔧 검증 코드
현재 커널 버전을 확인하고 배포판의 최신 보안 업데이트(예: apt update && apt upgrade, yum update) 확인
cat /proc/version | grep -oP 'Linux version \K[^ ]+' && uname -r