Commit 36920f30 authored by Corey Minyard's avatar Corey Minyard
Browse files

ipmi: Check event message buffer response for bad data



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: default avatarMatt Fleming <mfleming@cloudflare.com>
Closes: https://lore.kernel.org/lkml/20260415115930.3428942-1-matt@readmodwrite.com/


Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarCorey Minyard <corey@minyard.net>
parent a5d1079c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -630,7 +630,13 @@ static void handle_transaction_done(struct smi_info *smi_info)
		 */
		msg = smi_info->curr_msg;
		smi_info->curr_msg = NULL;
		if (msg->rsp[2] != 0) {
		/*
		 * It appears some BMCs, with no event data, return no
		 * data in the message and not a 0x80 error as the
		 * spec says they should.  Shut down processing if
		 * the data is not the right length.
		 */
		if (msg->rsp[2] != 0 || msg->rsp_size != 19) {
			/* Error getting event, probably done. */
			msg->done(msg);