Skip to content

Commit 2418e4b

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 67c44e0 commit 2418e4b

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
@@ -625,7 +625,13 @@ static void handle_transaction_done(struct smi_info *smi_info)
625625
*/
626626
msg = smi_info->curr_msg;
627627
smi_info->curr_msg = NULL;
628-
if (msg->rsp[2] != 0) {
628+
/*
629+
* It appears some BMCs, with no event data, return no
630+
* data in the message and not a 0x80 error as the
631+
* spec says they should. Shut down processing if
632+
* the data is not the right length.
633+
*/
634+
if (msg->rsp[2] != 0 || msg->rsp_size != 19) {
629635
/* Error getting event, probably done. */
630636
msg->done(msg);
631637

0 commit comments

Comments
 (0)