🇰🇷 한글 설명
Linux 커널의 usb gadget midi2 구성에서 잭 디스크립터 배열 크기가 잘못 설정되어 발생하는 취약점입니다. 입력과 출력 항목을 모두 합산하는 과정에서 배열 크기가 실제 필요한 양보다 작게 할당되어, configfs를 통해 많은 수의 잭을 설정할 경우 경계 외 메모리 접근(OOB)이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 USB 장치를 인식할 때 사용하는 메모리 공간이 실제 필요한 크기보다 작게 만들어진 문제입니다. 이로 인해 너무 많은 연결 정보를 입력하면 메모리의 잘못된 영역을 건드려 시스템 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: midi2: Fix the jack descriptor array sizes
The jack in/out descriptor arrays in struct f_midi2_usb_config have
the size of MAX_CABLES, which look reasonable -- but it turned out to
be incorrect. Namely, the entries for those arrays are added from
both inputs and outputs, hence for each loop cycle, it adds two, ended
up with as twice as the expected size. This inconsistency may result
in potential OOB when a large number of jacks are set up via configfs,
although the max number of cables (the loop count) is limited to
MAX_CABLES.
For addressing it, correct the jack_ins & jack_outs array sizes to
twice, MAX_CABLES * 2.
📍 영향받는 시스템
Linux kernel (usb gadget midi2 구성 사용 시스템)
⚔️ 공격 벡터
configfs를 통해 대량의 MIDI 잭 설정을 시도하여 경계 외 메모리 접근 유도
🛡️ 대응 방법
jack_ins 및 jack_outs 배열 크기를 MAX_CABLES의 2배로 수정하여 커널 업데이트 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 패치된 최신 버전인지 확인합니다.