net: hinic: fix mailbox segment buffer overflow
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a425b6e1c69ba907b72b737a4d44f8cfbc43ce3c · < 9f6ad383901d0cb1c8ea5f7f3160fabfe1540eb5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: hinic: fix mailbox segment buffer overflow
check_mbox_seq_id_and_seg_len() validates that seq_id does not exceed SEQ_ID_MAX_VAL (42) and seg_len does not exceed MBOX_SEG_LEN (48). However, this allows the last segment (seq_id=42) to carry a full 48-byte payload, writing to offset 42*48=2016 for 48 bytes (ending at byte 2064). The receive buffer is only MBOX_MAX_BUF_SZ (2048) bytes, resulting in a 16-byte heap buffer overflow.
The hinic3 driver already handles this correctly by defining MBOX_LAST_SEG_MAX_LEN and rejecting the last segment when it exceeds the remaining buffer space. Apply the same fix to the hinic driver.
From the CVE record · Linux
The Linux kernel's hinic driver can write past a 2048-byte receive buffer when the last mailbox segment contains more data than the remaining buffer space. A mailbox segment with sequence ID 42 and a 48-byte payload causes a 16-byte heap buffer overflow. The input does not specify how an attacker could deliver such a segment or whether authentication or user interaction is required.
Engineers running Linux kernels with the hinic driver should check whether their kernel includes the fix; affected versions were not specified.