Skip to contentSkip to conversation

CVE-2026-97957: net: hinic: fix mailbox segment buffer overflow

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-97957 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.8 with commit a425b6e1c69ba907b72b737a4d44f8cfbc43ce3c and fixed in 6.12.111 with commit eca54a092d5f7b497b458ff5a6f66d4f7bfb6674
	Issue introduced in 5.8 with commit a425b6e1c69ba907b72b737a4d44f8cfbc43ce3c and fixed in 6.18.53 with commit 9f6ad383901d0cb1c8ea5f7f3160fabfe1540eb5
	Issue introduced in 5.8 with commit a425b6e1c69ba907b72b737a4d44f8cfbc43ce3c and fixed in 7.2.7 with commit 513f7b16ed0cffae9348151c72bed17c7073096f
	Issue introduced in 5.8 with commit a425b6e1c69ba907b72b737a4d44f8cfbc43ce3c and fixed in 7.3-rc3 with commit 5d4d985957434867bbe85e4fa5e638f3e48ad522

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-97957

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/eca54a092d5f7b497b458ff5a6f66d4f7bfb6674
	https://git.kernel.org/stable/c/9f6ad383901d0cb1c8ea5f7f3160fabfe1540eb5
	https://git.kernel.org/stable/c/513f7b16ed0cffae9348151c72bed17c7073096f
	https://git.kernel.org/stable/c/5d4d985957434867bbe85e4fa5e638f3e48ad522