Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-1380

aide fails to check some compressed databases

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-8.6.0
    • aide
    • None
    • None
    • sst_security_special_projects
    • ssg_security
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • 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;

            rsroka@redhat.com Radovan Sroka
            jira-bugzilla-migration RH Bugzilla Integration
            Radovan Sroka Radovan Sroka
            SSG Security QE SSG Security QE
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: