Skip to content

Commit 2426926

Browse files
cminyardgregkh
authored andcommitted
ipmi: Check event message buffer response for bad data
commit 36920f3 upstream. The event message buffer response data size got checked later when processing, but check it right after the response comes back. It appears some BMCs may return an empty message instead of an error when fetching events. There are apparently some new BMCs that make this error, so we need to compensate. Reported-by: Matt Fleming <mfleming@cloudflare.com> Closes: https://lore.kernel.org/lkml/20260415115930.3428942-1-matt@readmodwrite.com/ Fixes: 1da177e ("Linux-2.6.12-rc2") Cc: <stable@vger.kernel.org> Signed-off-by: Corey Minyard <corey@minyard.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c024167 commit 2426926

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,13 @@ static void handle_transaction_done(struct smi_info *smi_info)
641641
*/
642642
msg = smi_info->curr_msg;
643643
smi_info->curr_msg = NULL;
644-
if (msg->rsp[2] != 0) {
644+
/*
645+
* It appears some BMCs, with no event data, return no
646+
* data in the message and not a 0x80 error as the
647+
* spec says they should. Shut down processing if
648+
* the data is not the right length.
649+
*/
650+
if (msg->rsp[2] != 0 || msg->rsp_size != 19) {
645651
/* Error getting event, probably done. */
646652
msg->done(msg);
647653

0 commit comments

Comments
 (0)