lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1530784849-3376-1-git-send-email-kamlakant.patel@cavium.com>
Date:   Thu,  5 Jul 2018 15:30:49 +0530
From:   Kamlakant Patel <kamlakant.patel@...ium.com>
To:     Corey Minyard <cminyard@...sta.com>
Cc:     Kamlakant Patel <kamlakant.patel@...ium.com>,
        openipmi-developer@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: [PATCH] ipmi: update ssif max_xmit_msg_size limit for multi-part messages

There is an issue with Host name Write command with payload size of 132 bytes.
Currently ipmi driver limits max_xmit_msg_size to 63 bytes. Due to this
all IPMI commands with request size more than 63 bytes will not work.
This is seen with AMI OEM Host Name write command: payload 132 bytes.
When a DNS host name set is tried from host through SSIF interface, the name
gets truncated due to ipmi_ssif driver limiting the length to 63 bytes

As per IPMI Spec v2.0 section 12.3:
The maximum message size returned by the Get SSIF Interface Capabilities command
is 255 bytes.

This patch updates the max_xmit_msg_size to 255 in case SSIF_MULTI_n_PART.

Signee-off-by: Kamlakant Patel <kamlakant.patel@...ium.com>
---
 drivers/char/ipmi/ipmi_ssif.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index 18e4650..2bf6f07 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -88,6 +88,8 @@
 #define SSIF_MSG_JIFFIES	((SSIF_MSG_USEC * 1000) / TICK_NSEC)
 #define SSIF_MSG_PART_JIFFIES	((SSIF_MSG_PART_USEC * 1000) / TICK_NSEC)
 
+#define SSIF_MAX_MSG_LENGTH	255
+
 enum ssif_intf_state {
 	SSIF_NORMAL,
 	SSIF_GETTING_FLAGS,
@@ -1500,8 +1502,8 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
 			 * to be 1-31 bytes in length.  Not ideal, but
 			 * it should work.
 			 */
-			if (ssif_info->max_xmit_msg_size > 63)
-				ssif_info->max_xmit_msg_size = 63;
+			if (ssif_info->max_xmit_msg_size > SSIF_MAX_MSG_LENGTH)
+				ssif_info->max_xmit_msg_size = SSIF_MAX_MSG_LENGTH;
 			break;
 
 		default:
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ