Linux Kernel MH-Z19B Oversized Serial Reply Handling Vulnerability

Vulnerability

A vulnerability in the Linux kernel's handling of serial replies from the MH-Z19B CO2 sensor has been addressed. The issue arose because the 'mhz19b_receive_buf()' function did not properly check if incoming data chunks fit within the designated buffer, leading to potential buffer overflows. This flaw could allow oversized replies to overwrite important state information before the command processing could validate the response. The vulnerability has been fixed by adding checks to reject oversized replies and by resetting the reply state before each command, ensuring that the buffer is not improperly overwritten.

Impact

The vulnerability could lead to a buffer overflow, allowing for potential memory corruption or arbitrary code execution.

Reproduction

The vulnerability can be reproduced by sending oversized serial replies to the MH-Z19B sensor. The 'mhz19b_receive_buf()' function will append each chunk to the fixed-size receive buffer without checking if there is enough space, causing an overflow.

Remediation

Users can update to the latest version of the Linux kernel where this vulnerability has been fixed.

Added: Jul 19, 2026, 7:52 PM
Updated: Jul 19, 2026, 7:52 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
0.6
exploitability
4.3
remediation
7.7
relevance
9.7
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.