🇰🇷 한글 설명
Linux 커널의 usb gadget configfs 구성 요소에서 usb_string_copy() 함수를 통해 발생하는 취약점입니다. 사용자 공간에서 제공된 문자열의 길이가 0일 경우, 경계 검사 미비로 인해 인덱스 -1 위치에 대한 Out-of-Bounds(OOB) 읽기 및 쓰기가 발생할 수 있습니다.
💡 쉬운 설명
USB 연결 설정을 담당하는 프로그램에서 빈 문자열을 입력했을 때, 컴퓨터 메모리의 잘못된 위치를 읽거나 수정할 수 있는 오류입니다. 이로 인해 시스템이 멈추거나 보안이 뚫릴 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
Userspace provided string 's' could trivially have the length zero. Left
unchecked this will firstly result in an OOB read in the form
`if (str[0 - 1] == '\n') followed closely by an OOB write in the form
`str[0 - 1] = '\0'`.
There is already a validating check to catch strings that are too long.
Let's supply an additional check for invalid strings that are too short.
📍 영향받는 시스템
Linux kernel (usb gadget configfs 관련 모듈 사용 시스템)
⚔️ 공격 벡터
사용자 공간(Userspace)에서 길이가 0인 문자열을 usb_string_copy() 함수로 전달하여 메모리 경계 외 영역에 접근
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 문자열 길이 검증 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인