GHSA-78p3-4gv3-qjh9: Out-of-bounds write in the Intel SEDI IPM driver from an unvalidated inbound doorbell length
The Intel SEDI IPM (inter-processor mailbox) driver in drivers/ipm/ipmsedi.c handles an inbound message interrupt in ipmeventdispose(). It read the peer-written doorbell register, extracted the payload length with IPCHEADERGETLENGTH(), and passed that length straight to sediipcreadmsg() to copy the message into struct ipmsedicontext.incomingdatabuf, without checking it against the buffer size. The doorbell length field is 10 bits wide (IPCHEADERLENGTHMASK is 0x03FF), so it can encode up to 1023 bytes, while incomingdatabuf is IPCDATALENMAX (128) bytes. The bounds check in the underlying HAL sediipcreadmsg() is a DBGCHECK that compiles away unless CONFIGDEBUG is set, so no check remained in a production image.
The doorbell register is written by the peer processor on the other side of the IPC link — for the intelish5 targets, the host CPU's ISH driver, reached through the device's memory-mapped register window. Host-side software with driver-level or raw BAR access can therefore set a length of up to 1023 and cause the interrupt handler to copy far past the destination buffer. The affected path requires an application to have registered an IPM receive callback via ipmregistercallback(), which is the driver's normal mode of use.
The result is an out-of-bounds write of up to 895 bytes into static (.bss) memory, performed in interrupt context. The overflow first clobbers the rest of struct ipmsedicontext — including the ksem and kmutex used by the transmit path, whose wait queues contain self-referential list pointers — and then adjacent static data, giving a kernel data-structure corruption and crash primitive. The overflowing bytes are read from registers following the message window, a portion of which are themselves peer-programmable. The fix rejects any doorbell whose encoded length exceeds IPCDATALENMAX, logging it and acknowledging the doorbell so the peer is not left waiting.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Update the Intel SEDI IPM driver’s inbound interrupt handling to reject doorbell lengths greater than IPC_DATA_LEN_MAX before calling sedi_ipc_read_msg(); log the invalid length and acknowledge the doorbell so the peer is not left waiting.
Event History
Frequently Asked Questions
Who can trigger the vulnerable message path?
The peer processor on the IPC link controls the doorbell register. On intel_ish_5_* targets, host-side software with driver-level access to the ISH driver or raw access to the device memory-mapped BAR can set the encoded length.
What conditions are required on the affected device?
The inbound interrupt path must be reachable, and an application must have registered an IPM receive callback. The attacker also needs the ability to write the peer-controlled doorbell register with a crafted payload length.
Does enabling debug protections prevent the overflow?
The underlying HAL check is a DBG_CHECK and is compiled away unless CONFIG_DEBUG is enabled. Therefore, production images without CONFIG_DEBUG retain no underlying length check before copying into the 128-byte incoming buffer.
How can I assess whether a device is exposed?
Check whether it uses the Intel SEDI IPM driver on an intel_ish_5_* target, has an application IPM receive callback registered, and permits host-side software to access the ISH driver or the relevant memory-mapped register window. The risky condition is an inbound doorbell length greater than 128 bytes, because the field can encode up to 1023 bytes.