[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/25] contrib/elf2dmp: add kernel start address chec
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 05/25] contrib/elf2dmp: add kernel start address checking |
Date: |
Sat, 9 Mar 2019 08:47:58 +0100 |
From: Viktor Prutyanov <address@hidden>
Before this patch, if elf2dmp failed to find NT kernel PE magic in
allowed virtual address range, then it assumes NULL as NT kernel
address and cause segfault.
This patch fix the problem described above by checking NT kernel address
before futher processing.
Signed-off-by: Viktor Prutyanov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
contrib/elf2dmp/main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index 1a45eaf..1bfeb89 100644
--- a/contrib/elf2dmp/main.c
+++ b/contrib/elf2dmp/main.c
@@ -524,6 +524,12 @@ int main(int argc, char *argv[])
}
}
+ if (!nt_start_addr) {
+ eprintf("Failed to find NT kernel image\n");
+ err = 1;
+ goto out_ps;
+ }
+
printf("KernBase = 0x%016"PRIx64", signature is \'%.2s\'\n", KernBase,
(char *)nt_start_addr);
--
1.8.3.1
- [Qemu-devel] [PULL 17/25] oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure, (continued)
- [Qemu-devel] [PULL 17/25] oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 16/25] accel: Allow to build QEMU without TCG or KVM support, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 24/25] lsi: return dfifo value, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 10/25] lsi: implement basic SBCL functionality, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 06/25] configure: Enable werror for git worktrees, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 18/25] configure: Disable W^X on OpenBSD, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 25/25] exec: streamline flatview_add_to_dispatch, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 22/25] lsi: use enum type for s->msg_action, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 09/25] virtio-scsi: Fix build with gcc 9, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 23/25] lsi: use SCSI phase names instead of numbers in trace, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 05/25] contrib/elf2dmp: add kernel start address checking,
Paolo Bonzini <=
- [Qemu-devel] [PULL 13/25] build: get rid of target-obj-y, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 15/25] build: clean trace/generated-helpers.c, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 21/25] lsi: use enum type for s->waiting, Paolo Bonzini, 2019/03/09
- Re: [Qemu-devel] [PULL 00/25] Misc patches for QEMU 4.0 soft freeze, Peter Maydell, 2019/03/10