CVE-2026-74694: net/ncsi: fix heap OOB read in NCSI_CMD_SEND_CMD payload length

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026082234-CVE-2026-74694-3e42@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

In the Linux kernel, the following vulnerability has been resolved:

net/ncsi: fix heap OOB read in NCSI_CMD_SEND_CMD payload length

ncsi_send_cmd_nl() takes the number of bytes to copy from the
attacker-controlled ncsi_pkt_hdr.length field of the in-band packet
header, while the source buffer is the NCSI_ATTR_DATA netlink
attribute whose readable size is nla_len() - sizeof(ncsi_pkt_hdr).
The two length sources are never cross-checked: only
nla_len() >= sizeof(struct ncsi_pkt_hdr) is enforced.

With hdr->length set larger than the attribute payload (up to 65535
against at most 2032 readable bytes), ncsi_cmd_handler_oem() copies
past the end of the netlink attribute buffer with unsafe_memcpy(),
leaking up to ~64KB of kernel heap memory into the transmitted NCSI
command packet. The destination skb is sized by the declared payload,
so the write side does not overflow - this is a pure OOB read /
information leak, reachable with CAP_NET_ADMIN on systems with a
registered NCSI device (e.g. OpenBMC on Aspeed BMC SoCs, where
NET_NCSI=y is standard).

Reject commands whose declared payload extends past the end of the
data attribute.

The issue was found by the autokbug dynamic kernel fuzzer at Tencent
Yunding Lab.

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


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

	Issue introduced in 4.20 with commit 9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392 and fixed in 5.10.265 with commit e60afa01d35f8b2671b27ca93309921427144cce
	Issue introduced in 4.20 with commit 9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392 and fixed in 5.15.216 with commit 67c72b8ef63d9d9a610546fda30b116638f39745
	Issue introduced in 4.20 with commit 9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392 and fixed in 6.1.183 with commit 4489b4a17892750131e4bef4bc1d3d703c8fb5ba
	Issue introduced in 4.20 with commit 9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392 and fixed in 6.6.152 with commit 43c7d0a6917751ea898ae584d00f24f5deac46d4
	Issue introduced in 4.20 with commit 9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392 and fixed in 6.12.104 with commit b5231ad0b376b801ab8cf2962b182cc29deaedb3
	Issue introduced in 4.20 with commit 9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392 and fixed in 6.18.45 with commit 02226af69362758046822840fc6a497f5de33f00
	Issue introduced in 4.20 with commit 9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392 and fixed in 7.1.9 with commit 3a60b5af75abe8e3494ccd074fb4ae6e601a3e55
	Issue introduced in 4.20 with commit 9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392 and fixed in 7.2 with commit afa58b7384913c8773d837acdb07b035690ec5d2

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-74694
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:
	net/ncsi/ncsi-netlink.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/e60afa01d35f8b2671b27ca93309921427144cce
	https://git.kernel.org/stable/c/67c72b8ef63d9d9a610546fda30b116638f39745
	https://git.kernel.org/stable/c/4489b4a17892750131e4bef4bc1d3d703c8fb5ba
	https://git.kernel.org/stable/c/43c7d0a6917751ea898ae584d00f24f5deac46d4
	https://git.kernel.org/stable/c/b5231ad0b376b801ab8cf2962b182cc29deaedb3
	https://git.kernel.org/stable/c/02226af69362758046822840fc6a497f5de33f00
	https://git.kernel.org/stable/c/3a60b5af75abe8e3494ccd074fb4ae6e601a3e55
	https://git.kernel.org/stable/c/afa58b7384913c8773d837acdb07b035690ec5d2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.