🔍 CVE-2024-38621

7.1
CVSS Score
HIGH
2024-06-21
2026-10-15 01:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 stk1160 미디어 드라이버에서 경계 검사 로직이 잘못 설계되어 버퍼 오버플로우가 발생할 수 있는 취약점입니다. 조건문 내 뺄셈 연산이 반대로 되어 있어 오버플로우 체크가 제대로 작동하지 않으며, 잘못된 메모리 주소 계산으로 인해 데이터가 허용된 범위를 벗어나 기록될 수 있습니다.

💡 쉬운 설명

비디오 데이터를 처리하는 과정에서 데이터가 들어갈 공간의 크기를 제대로 확인하지 못하는 오류가 발견되었습니다. 이로 인해 정해진 공간보다 더 많은 데이터가 입력되면 시스템의 메모리가 망가질 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: media: stk1160: fix bounds checking in stk1160_copy_video() The subtract in this condition is reversed. The ->length is the length of the buffer. The ->bytesused is how many bytes we have copied thus far. When the condition is reversed that means the result of the subtraction is always negative but since it's unsigned then the result is a very high positive value. That means the overflow check is never true. Additionally, the ->bytesused doesn't actually work for this purpose because we're not writing to "buf->mem + buf->bytesused". Instead, the math to calculate the destination where we are writing is a bit involved. You calculate the number of full lines already written, multiply by two, skip a line if necessary so that we start on an odd numbered line, and add the offset into the line. To fix this buffer overflow, just take the actual destination where we are writing, if the offset is already out of bounds print an error and return. Otherwise, write up to buf->length bytes.

📍 영향받는 시스템

stk1160 드라이버를 사용하는 Linux 커널 시스템

⚔️ 공격 벡터

조작된 비디오 데이터를 전송하여 드라이버의 메모리 경계 검사를 우회하고 버퍼 오버플로우 유도

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트

🔧 검증 코드

출력된 커널 버전이 stk1160 취약점이 수정된 최신 패치 버전인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel