From 9ee51785bd28b26faa58080c3468f2818870ea31 Mon Sep 17 00:00:00 2001 From: Rafael Fonseca Date: Thu, 19 Jan 2017 15:12:31 +0100 Subject: [PATCH] Fix double free on sysfs (#1414802) --- openhpi-3.6.1-sysfs-double-free.patch | 13 +++++++++++++ openhpi.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 openhpi-3.6.1-sysfs-double-free.patch diff --git a/openhpi-3.6.1-sysfs-double-free.patch b/openhpi-3.6.1-sysfs-double-free.patch new file mode 100644 index 0000000..e03e415 --- /dev/null +++ b/openhpi-3.6.1-sysfs-double-free.patch @@ -0,0 +1,13 @@ +Index: openhpi/plugins/sysfs/sysfs2hpi.c +=================================================================== +--- openhpi/plugins/sysfs/sysfs2hpi.c (revision 7664) ++++ openhpi/plugins/sysfs/sysfs2hpi.c (working copy) +@@ -571,6 +571,7 @@ + if (!(sys->bus->devices)) { + err("no i2c devices found"); + sysfs_close_bus(sys->bus); ++ sys->bus = NULL; + sys->initialized++; + return 0; + } + diff --git a/openhpi.spec b/openhpi.spec index d0a6a3a..734798b 100644 --- a/openhpi.spec +++ b/openhpi.spec @@ -3,13 +3,14 @@ Summary: Hardware Platform Interface library and tools Name: openhpi Version: 3.6.1 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: System Environment/Base URL: http://www.openhpi.org Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # convert from initscript to systemd unit Patch0: %{name}-3.4.0-systemd.patch +Patch1: %{name}-3.6.1-sysfs-double-free.patch BuildRequires: libsysfs-devel BuildRequires: net-snmp-devel BuildRequires: OpenIPMI-devel @@ -64,6 +65,7 @@ The development libraries and header files for the OpenHPI project. %prep %setup -q %patch0 -p1 -b .systemd +%patch1 -p1 -b .sysfs autoreconf -vif @@ -137,6 +139,9 @@ make check %changelog +* Thu Jan 19 2017 Rafael Fonseca - 3.6.1-3 +- Fix #1414802 - double free or corruption on sysfs plugin. + * Thu Feb 04 2016 Fedora Release Engineering - 3.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild