-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-8.6.0
-
None
-
None
-
rhel-sst-security-special-projects
-
ssg_security
-
None
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
Unspecified
-
None
Description of problem:
The "aide -C" command fails to process a gzipped database file when the uncompressed file is exactly n*8192+11 bytes long for some n>0.
Version-Release number of selected component (if applicable):
aide-0.16-14.el8_5.1
How reproducible:
When the database size is as described, "aide -C" fails every time.
Steps to Reproduce:
It is difficult to create a database of the required size, but I have attached a contrived example.
Actual results:
The "aide -C" command fails with varying errors though usually the errors include "Trying to continue on line xx" for some xx and "db_char2line():Error while reading database"
Expected results:
The "aide -C" command should properly check the database.
Additional info:
This patch fixes the problem:
diff -ru aide-0.16/src/commandconf.c aide-0.16.modified/src/commandconf.c
— aide-0.16/src/commandconf.c 2016-07-25 15:56:55.000000000 -0500
+++ aide-0.16.modified/src/commandconf.c 2023-07-18 08:48:11.913932324 -0500
@@ -303,6 +303,7 @@
retval=0;
buf[0]='\0';
}else {
+ buf[0]='\0';
if((retval=gzread(*db_gzp,buf,max_size))<0){
error(0,_("gzread() failed: gzerr=%s!\n"),gzerror(*db_gzp,&err));
retval=0;
- external trackers