From b10320e9b17312f24e1e404f48750f76bf64f4da Mon Sep 17 00:00:00 2001 From: Zhang Jun Date: Fri, 21 Oct 2022 17:43:51 +0800 Subject: [PATCH] fixed 4dbf67f from https://gitee.com/zjay998/ipmitool/pulls/19 zero initialize the recv structure on the stack --- ...lize-the-recv-structure-on-the-stack.patch | 26 +++++++++++++++++++ ipmitool.spec | 9 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0005-zero-initialize-the-recv-structure-on-the-stack.patch diff --git a/0005-zero-initialize-the-recv-structure-on-the-stack.patch b/0005-zero-initialize-the-recv-structure-on-the-stack.patch new file mode 100644 index 0000000..4601b30 --- /dev/null +++ b/0005-zero-initialize-the-recv-structure-on-the-stack.patch @@ -0,0 +1,26 @@ +From 5ac7f6a54e0a416fc37e962c2be87b16821cc771 Mon Sep 17 00:00:00 2001 +From: Patrick Venture +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 + diff --git a/ipmitool.spec b/ipmitool.spec index 2e94907..c1f6519 100644 --- a/ipmitool.spec +++ b/ipmitool.spec @@ -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 - 1.8.18-19 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:zero initialize the recv structure on the stack + * Mon Dec 27 2021 gaihuiying - 1.8.18-18 - Type:requirement - ID:NA -- Gitee