From 48b0e40dcd7f59ea99a40a810e75d5c90fdbbb73505f0595833306f330963640 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 30 Jan 2008 17:30:29 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kexec-tools?expand=0&rev=38 --- kexec-tools.changes | 5 ++++ kexec-tools.fread-buffer-overflow.patch | 36 +++++++++++++++++++++++++ kexec-tools.spec | 8 ++++-- 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 kexec-tools.fread-buffer-overflow.patch diff --git a/kexec-tools.changes b/kexec-tools.changes index 874af4d..70722c4 100644 --- a/kexec-tools.changes +++ b/kexec-tools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 30 15:17:18 CET 2008 - sassmann@suse.de + +- fix fread buffer overflow on ppc + ------------------------------------------------------------------- Tue Jan 22 10:14:31 CET 2008 - ro@suse.de diff --git a/kexec-tools.fread-buffer-overflow.patch b/kexec-tools.fread-buffer-overflow.patch new file mode 100644 index 0000000..1371fd4 --- /dev/null +++ b/kexec-tools.fread-buffer-overflow.patch @@ -0,0 +1,36 @@ + +Index: kexec-tools-testing-20071030/kexec/arch/ppc64/kexec-ppc64.c +=================================================================== +--- kexec-tools-testing-20071030.orig/kexec/arch/ppc64/kexec-ppc64.c ++++ kexec-tools-testing-20071030/kexec/arch/ppc64/kexec-ppc64.c +@@ -160,7 +160,7 @@ static int get_base_ranges(void) + int local_memory_ranges = 0; + char device_tree[256] = "/proc/device-tree/"; + char fname[256]; +- char buf[MAXBYTES-1]; ++ char buf[MAXBYTES]; + DIR *dir, *dmem; + FILE *file; + struct dirent *dentry, *mentry; +@@ -258,7 +258,7 @@ static int get_devtree_details(unsigned + unsigned long long htab_base, htab_size; + unsigned long long kernel_end; + unsigned long long initrd_start, initrd_end; +- char buf[MAXBYTES-1]; ++ char buf[MAXBYTES]; + char device_tree[256] = "/proc/device-tree/"; + char fname[256]; + DIR *dir, *cdir; +Index: kexec-tools-testing-20071030/kexec/arch/ppc64/crashdump-ppc64.c +=================================================================== +--- kexec-tools-testing-20071030.orig/kexec/arch/ppc64/crashdump-ppc64.c ++++ kexec-tools-testing-20071030/kexec/arch/ppc64/crashdump-ppc64.c +@@ -101,7 +101,7 @@ static int get_crash_memory_ranges(struc + int memory_ranges = 0; + char device_tree[256] = "/proc/device-tree/"; + char fname[256]; +- char buf[MAXBYTES-1]; ++ char buf[MAXBYTES]; + DIR *dir, *dmem; + FILE *file; + struct dirent *dentry, *mentry; diff --git a/kexec-tools.spec b/kexec-tools.spec index 5a25b03..ce7bf58 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -22,7 +22,7 @@ Requires: %insserv_prereq %fillup_prereq AutoReqProv: on Summary: Tools for fast kernel loading Version: 1.101 -Release: 161 +Release: 164 Source: %{name}-%{package_version}.tar.bz2 Source1: README.SUSE Url: http://www.vergenet.net/linux/kexec/kexec-tools/ @@ -33,6 +33,7 @@ Patch2: kexec-tools-elf32-elf64-fix Patch20: kexec-tools.ppc64-32bit-build.patch Patch21: kexec-tools.ppc32-64bit-purgatory.patch Patch22: kexec-tools.gcc-bug.patch +Patch30: kexec-tools.fread-buffer-overflow.patch %description Kexec is a user space utility for loading another kernel and asking the @@ -59,6 +60,7 @@ Authors: %patch20 -p1 %patch21 -p1 %patch22 -p1 +%patch30 -p1 %build %{?suse_update_config -f} @@ -94,6 +96,8 @@ install -c -m 0644 kexec/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8 %endif %changelog +* Wed Jan 30 2008 sassmann@suse.de +- fix fread buffer overflow on ppc * Tue Jan 22 2008 ro@suse.de - update ppc buildreq * Fri Nov 30 2007 bwalle@suse.de @@ -279,7 +283,7 @@ install -c -m 0644 kexec/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8 (164993 - LTC23056) * Wed Apr 26 2006 olh@suse.de - set /proc/sys/kernel/panic_on_oops to actually trigger a dump -* Wed Mar 08 2006 olh@suse.de +* Thu Mar 09 2006 olh@suse.de - add --args-linux only on intel copy vmcore with --sparse, maybe it saves a few bytes. * Wed Feb 22 2006 tiwai@suse.de