CVE-2026-74694: net/ncsi: fix heap OOB read in NCSI_CMD_SEND_CMD payload length
In the Linux kernel, the following vulnerability has been resolved:
net/ncsi: fix heap OOB read in NCSICMDSENDCMD payload length
ncsisendcmdnl() takes the number of bytes to copy from the attacker-controlled ncsipkthdr.length field of the in-band packet header, while the source buffer is the NCSIATTRDATA netlink attribute whose readable size is nlalen() - sizeof(ncsipkthdr). The two length sources are never cross-checked: only nlalen() >= sizeof(struct ncsipkthdr) is enforced.
With hdr->length set larger than the attribute payload (up to 65535 against at most 2032 readable bytes), ncsicmdhandleroem() copies past the end of the netlink attribute buffer with unsafememcpy(), 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 CAPNETADMIN on systems with a registered NCSI device (e.g. OpenBMC on Aspeed BMC SoCs, where NETNCSI=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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Linux kernel (net/ncsi)to a version that resolves this vulnerability.Patch net/ncsi: fix heap OOB read in NCSI_CMD_SEND_CMD payload length - Configuration
Update the kernel so ncsi_send_cmd_nl() enforces nla_len() >= sizeof(struct ncsi_pkt_hdr) and ncsi_cmd_handler_oem() rejects commands whose declared payload extends past the end of the destination skb; copy length must be based on declared payload size with proper cross-checking of hdr->length against attribute payload (nla_len() - sizeof(struct ncsi_pkt_hdr)).
Linux kernel net/ncsi NCSI_CMD_SEND_CMD payload length validation = Enforce nla_len() >= sizeof(struct ncsi_pkt_hdr) and reject commands where declared payload extends past end of destination skb/source buffer - Compensating control
On affected systems, restrict CAP_NET_ADMIN access (the issue is reachable with CAP_NET_ADMIN) until the kernel/net/ncsi fix is applied.