Package: aide-common
Version: 0.19.1-2+deb13u6
Severity: normal

Dear Maintainer,

On Debian trixie, with FILTERUPDATES=yes, dailyaidecheck can report
zero changes in its daily email even when the corresponding AIDE
log contains thousands of changes. Both aide and aide-common are
version 0.19.1-2+deb13u6.

Here is an example from my system. The local AIDE log reported
169 added, 115 removed, and 3223 changed entries. However, the email
reported 0 (filtered: 0) for all three categories.

Here is the Summary section of /var/log/aide/aide.log for this run:

        Summary:
          Total number of entries:      495734
          Added entries:                169
          Removed entries:              115
          Changed entries:              3223

And here is the corresponding exerpt from the email sent by
dailyaidecheck:

        Summary:
          Total number of entries:      495734
          Added entries:                0       (filtered: 0)
          Removed entries:              0       (filtered: 0)
          Changed entries:              0       (filtered: 0)

        The following package changes were detected and were filtered from this 
mail:
        openssl-provider-legacy:amd64 (upgrade)
        libssl-dev:amd64 (upgrade)
        libssl3t64:amd64 (upgrade)
        mercurial:amd64 (upgrade)
        mercurial-common:all (upgrade)
        openssl:amd64 (upgrade)

        AIDE detected no changes after filtering package changes.

The SHA-256 checksum printed in the email matched
/var/log/aide/aide.log, confirming that the email and log came
from the same run.

The log contains entries like these (paths anonymized):

    f++++++++++++++++++: /example/added
    f------------------: /example/removed

Line 571 of /usr/share/aide/bin/dailyaidecheck defines the package
filter's entry parser as:

    REGEX="^(changed|removed|added|[fdLDBFs?!][ :l<>=bpugamcinHAXSEC.+-]{17}): 
(.*)"

Line 579 and 590 also expect 17 attribute positions:

579: added|[fdLDBFs?]+++++++++++++++++)
590: removed|[fdLDBFs?]-----------------)

The parser expects exactly 17 attribute positions after the file
type. AIDE 0.19 added a filesystem-type position (F), so the entries
on this system have 18 attribute positions. I verified the width on
added, removed, and changed entries. The regex silently skips these
lines, leaving both the reported and filtered counts at zero.
As a result, the email can omit changes unrelated to package upgrades.

The parser appears to have changed in sid, so this issue may already
be fixed there. Could the fix be considered for a trixie point release?

-- System Information:
Debian Release: 13.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 7.1.9-x86_64-linode176 (SMP w/3 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages aide-common depends on:
ii  aide                        0.19.1-2+deb13u6
ii  debconf [debconf-2.0]       1.5.91
ii  liblockfile1                1.17-2
ii  systemd [systemd-sysusers]  257.13-1~deb13u1
ii  ucf                         3.0052

Versions of packages aide-common recommends:
ii  bsd-mailx [mailx]   8.1.2-0.20220412cvs-1.1
ii  cron [cron-daemon]  3.0pl1-197

aide-common suggests no packages.

-- debconf information:
  aideinit/copynew: false
  aideinit/overwritenew: true
  aide/aideinit: false

Reply via email to