🇰🇷 한글 설명
Linux 커널의 IIO(Industrial I/O) 서브시스템 내 mhz19b 화학 센서 드라이버에서 버퍼 오버플로 취약점이 발견되었습니다. mhz19b_receive_buf() 함수가 시리얼 응답 데이터의 크기를 확인하지 않고 고정된 버퍼에 추가함으로써 메모리 오버플로가 발생할 수 있습니다.
💡 쉬운 설명
화학 센서로부터 들어오는 데이터가 정해진 저장 공간보다 클 경우, 넘쳐흐른 데이터가 다른 메모리 영역을 침범할 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
iio: chemical: mhz19b: reject oversized serial replies
mhz19b_receive_buf() appends each serdev chunk into the fixed
MHZ19B_CMD_SIZE receive buffer and advances buf_idx by len without
checking that the chunk fits in the remaining space. A large callback
can therefore overflow st->buf before the command path validates the
reply.
Reset the reply state before each command and reject oversized serial
replies before copying them into the fixed buffer. When an oversized
reply is detected, wake the waiter and report -EMSGSIZE instead of
overwriting st->buf.
📍 영향받는 시스템
Linux kernel (mhz19b chemical sensor driver 포함 버전)
⚔️ 공격 벡터
조작된 대용량 시리얼 응답 데이터를 센서 드라이버로 전송하여 메모리 오버플로 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 mhz19b 드라이버의 크기 검증 로직 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인