🇰🇷 한글 설명
MariaDB Connector/J에서 CLIENT_SESSION_TRACK 협상 시 OkPacket.parse() 및 parseWithInfo() 경로가 패킷 내 실제 바이트 존재 여부를 확인하기 전에 서버가 선언한 길이만큼 바이트 배열을 할당하는 문제가 있습니다. 악의적이거나 침해된 서버 또는 중간자 공격자는 작은 OK 패킷으로 과도한 힙 할당을 반복 유발할 수 있으며, 이는 GC 부하나 클라이언트 애플리케이션의 OutOfMemoryError로 이어질 수 있습니다. 해당 문제는 3.3.7, 3.4.5, 3.5.11 버전에서 수정되었습니다.
💡 쉬운 설명
데이터베이스 서버가 거짓 정보로 응답하면 자바 프로그램이 불필요하게 많은 메모리를 할당하게 됩니다. 이로 인해 프로그램이 느려지거나 메모리 부족으로 멈출 수 있습니다.
🇺🇸 원문 (English)
MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7, 3.4.5, and 3.5.11, when CLIENT_SESSION_TRACK was negotiated, the OkPacket.parse() and OkPacket.parseWithInfo() paths allocated byte arrays using server-declared lengths for the OK packet info field and session-state variable names and values before confirming that the bytes remained in the packet. A malicious or compromised server, or a machine-in-the-middle attacker, could send a small OK packet declaring a much larger length and repeatedly force attacker-controlled heap allocations before the subsequent copy failed. This could create garbage-collection pressure or an OutOfMemoryError in the client application. This issue is fixed in versions 3.3.7, 3.4.5, and 3.5.11.
📍 영향받는 시스템
MariaDB Connector/J 3.0.0 ~ 3.3.6, 3.4.0 ~ 3.4.4, 3.5.0 ~ 3.5.10 (CLIENT_SESSION_TRACK 사용 시)
⚔️ 공격 벡터
악의적 서버 또는 중간자 공격자가 길이를 과장한 조작된 OK 패킷을 전송하여 클라이언트 힙 메모리를 반복 소모하게 함
🛡️ 대응 방법
MariaDB Connector/J를 3.3.7, 3.4.5, 3.5.11 이상 버전으로 업그레이드
🔧 검증 코드
출력된 JAR 파일명의 버전이 3.3.7, 3.4.5, 3.5.11 미만이면 취약하므로 업그레이드가 필요하며, 해당 이상 버전이면 패치된 상태입니다.
find / -name 'mariadb-java-client*.jar' 2>/dev/null -exec basename {} \;
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
💻 영향받는 소프트웨어
IBM WebSphere Application Server