zero initialize the recv structure on the stack
This commit is contained in:
Zhang Jun 2022-10-21 17:43:51 +08:00
parent b7555fa0c1
commit b10320e9b1
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 5ac7f6a54e0a416fc37e962c2be87b16821cc771 Mon Sep 17 00:00:00 2001
From: Patrick Venture <pstrinkle@users.noreply.github.com>
Date: Wed, 3 Nov 2021 14:10:53 -0700
Subject: [PATCH] zero initialize the recv structure on the stack
Zero initialize the recv structure used by openipmi_read().
---
src/ipmievd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ipmievd.c b/src/ipmievd.c
index 2c19887..6a94b1f 100644
--- a/src/ipmievd.c
+++ b/src/ipmievd.c
@@ -422,7 +422,7 @@ static int
openipmi_read(struct ipmi_event_intf * eintf)
{
struct ipmi_addr addr;
- struct ipmi_recv recv;
+ struct ipmi_recv recv = {};
uint8_t data[80];
int rv;
--
2.25.1

View File

@ -1,6 +1,6 @@
Name: ipmitool
Version: 1.8.18
Release: 18
Release: 19
Summary: Utility for IPMI control
License: BSD
URL: http://ipmitool.sourceforge.net/
@ -13,6 +13,7 @@ Patch1: 0001-CVE-2011-4339-OpenIPMI.patch
Patch2: 0002-openssl.patch
Patch3: 0003-ipmitool-1.8.11-set-kg-key.patch
Patch4: 0004-slowswid.patch
Patch5: 0005-zero-initialize-the-recv-structure-on-the-stack.patch
Patch6000: ID-477-fru-Fix-decoding-of-non-text-data-in-get_fru_.patch
Patch6001: ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch
@ -170,6 +171,12 @@ install -Dm 755 contrib/bmc-snmp-proxy %{buildroot}%{_libexecdir}/bmc-sn
%{_mandir}/man8/ipmievd.8*
%changelog
* Fri Oct 21 2022 zhangjun <zhangjun@kylinos.cn> - 1.8.18-19
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:zero initialize the recv structure on the stack
* Mon Dec 27 2021 gaihuiying <gaihuiying1@huawei.com> - 1.8.18-18
- Type:requirement
- ID:NA