Fix segfault when data chunk in section is empty
This commit is contained in:
parent
d99ec07631
commit
ec0b814a33
2 changed files with 19 additions and 0 deletions
17
aide-0.16.7-empty_shdr_size.patch
Normal file
17
aide-0.16.7-empty_shdr_size.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
--- ./src/do_md.c.orig 2018-03-19 05:10:19.994957024 -0400
|
||||
+++ ./src/do_md.c 2018-03-19 05:19:05.829957024 -0400
|
||||
@@ -135,8 +135,13 @@
|
||||
continue;
|
||||
|
||||
while (!bingo && (data = elf_getdata (scn, data)) != NULL) {
|
||||
- int maxndx = data->d_size / shdr.sh_entsize;
|
||||
+ int maxndx;
|
||||
int ndx;
|
||||
+
|
||||
+ if (shdr.sh_entsize != 0)
|
||||
+ maxndx = data->d_size / shdr.sh_entsize;
|
||||
+ else
|
||||
+ continue;
|
||||
|
||||
for (ndx = 0; ndx < maxndx; ++ndx) {
|
||||
(void) gelf_getdyn (data, ndx, &dyn);
|
||||
|
|
@ -28,6 +28,8 @@ Buildrequires: audit-libs-devel
|
|||
Patch1: aide-0.16rc1-man.patch
|
||||
# fix aide in FIPS mode
|
||||
Patch2: aide-0.16b1-fipsfix.patch
|
||||
# fix segfault when data chunk in section is empty
|
||||
Patch3: aide-0.16.7-empty_shdr_size.patch
|
||||
|
||||
%description
|
||||
AIDE (Advanced Intrusion Detection Environment) is a file integrity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue