Release 2.0.7-1

Rebase kexec-tools-2.0.7

Signed-off-by: WANG Chao <chaowang@redhat.com>
This commit is contained in:
WANG Chao 2014-06-10 11:20:36 +08:00
parent 3a560f19ab
commit 85ee62fdd1
4 changed files with 4 additions and 49 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
/eppic_030413.tar.gz
/kexec-tools-po-20131224.tgz
/kexec-tools-2.0.6.tar.xz
/makedumpfile-1.5.6.tar.gz
/kdump-anaconda-addon-20140522.tar.gz
/kexec-tools-2.0.7.tar.xz

View File

@ -1,43 +0,0 @@
From 401e037e5e9527134c594b8923342a69ff38b7cb Mon Sep 17 00:00:00 2001
From: Arthur Zou <zzou@redhat.com>
Date: Wed, 12 Mar 2014 13:05:18 +0800
Subject: [PATCH] vmcore-dmesg stack smashing happend in extreme case
Description
in dump_dmesg_structured() the out_buf size is 4096, and if the
length is less than 4080( 4096-16 ) it won't really write out.
Normally, after writing one or four chars to the out_buf, it will
check the length of out_buf. But in extreme cases, 19 chars was
written to the out_buf before checking the length. This may cause
the stack corruption. If the length was 4079 (won't realy write out),
and then write 19 chars to it. the out_buf will overflow.
Solution
Change 16 to 64 thus can make sure that always have 64bytes before
moving to next records. why using 64 is that a long long int can take
20 bytes. so the length of timestamp can be 44 ('[','.',']',' ') in
extreme case.
Signed-off-by: Arthur Zou <zzou@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
vmcore-dmesg/vmcore-dmesg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
index 0345660..e15cd91 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -674,7 +674,7 @@ static void dump_dmesg_structured(int fd)
else
out_buf[len++] = c;
- if (len >= OUT_BUF_SIZE - 16) {
+ if (len >= OUT_BUF_SIZE - 64) {
write_to_stdout(out_buf, len);
len = 0;
}
--
1.8.4.2

View File

@ -1,6 +1,6 @@
Name: kexec-tools
Version: 2.0.6
Release: 9%{?dist}
Version: 2.0.7
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
Summary: The kexec/kdump userspace component
@ -76,7 +76,6 @@ ExcludeArch: aarch64
#
Patch601: kexec-tools-2.0.3-disable-kexec-test.patch
Patch604: kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch
Patch619: kexec-tools-2.0.5-vmcore-dmesg-stack-smashing-happend-in-extreme-case.patch
%description
kexec-tools provides /sbin/kexec binary that facilitates a new
@ -114,7 +113,6 @@ tar -z -x -v -f %{SOURCE23}
%patch601 -p1
%patch604 -p1
%patch619 -p1
tar -z -x -v -f %{SOURCE13}

View File

@ -1,5 +1,5 @@
b48eb2726d602c1aa3abfd3739441f54 eppic_030413.tar.gz
ba3710c36b287b6a61b2867b4c9b6478 kexec-tools-po-20131224.tgz
9192e5b9fab094b90f481226d1ad5e74 kexec-tools-2.0.6.tar.xz
874990aedbdd28689a238917169852f8 makedumpfile-1.5.6.tar.gz
67b136ff6b44995e4d772c78384abddf kdump-anaconda-addon-20140522.tar.gz
457f49ad1708eea1f6b332484855fe25 kexec-tools-2.0.7.tar.xz