/usr/bin/aide --config /var/lib/aide/aide.conf.autogenerated --update cores under "some circumstance"

Bug #2042826 reported by Stdedos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
aide (Ubuntu)
New
Undecided
Unassigned

Bug Description

Under _some_ circumstance, `aide` cores-out:

<pre><font color="#75507B"><b>GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2</b></font>
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type &quot;show copying&quot; and &quot;show warranty&quot; for details.
This GDB was configured as &quot;x86_64-linux-gnu&quot;.
Type &quot;show configuration&quot; for configuration details.
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
Find the GDB manual and other documentation resources online at:
    &lt;http://www.gnu.org/software/gdb/documentation/&gt;.

For help, type &quot;help&quot;.
Type &quot;apropos word&quot; to search for commands related to &quot;word&quot;...
Reading symbols from <font color="#4E9A06">/usr/bin/aide</font>...
Reading symbols from <font color="#4E9A06">/home/stdedos/.cache/debuginfod/.build-id/c9/2e32e63980dfd92ffcc86c9a9e048a9c429708.debug</font>...
[New LWP 1804760]
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;<font color="#4E9A06">/lib/x86_64-linux-gnu/libthread_db.so.1</font>&quot;.
Core was generated by `/usr/bin/aide --config /var/lib/aide/aide.conf.autogenerated --update&apos;.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 <font color="#C4A000">__GI___getauxval</font> (<font color="#06989A">type</font>=25) at <font color="#4E9A06">getauxval.c</font>:41
41 getauxval.c: No such file or directory.
(gdb) sharedlibrary
(gdb) bt
#0 <font color="#C4A000">__GI___getauxval</font> (<font color="#06989A">type</font>=25) at <font color="#4E9A06">getauxval.c</font>:41
#1 <font color="#C4A000">__GI___getauxval</font> (<font color="#06989A">type=type@entry</font>=25) at <font color="#4E9A06">getauxval.c</font>:24
#2 <font color="#3465A4">0x00007f036a4f987e</font> in <font color="#C4A000">userdb_thread_sockaddr</font> (<font color="#06989A">ret_sa=ret_sa@entry</font>=0x7ffdd027dcb0, <font color="#06989A">ret_salen=ret_salen@entry</font>=0x7ffdd027dcac) at <font color="#4E9A06">../src/shared/userdb.c</font>:1252
#3 <font color="#3465A4">0x00007f036a4f9bea</font> in <font color="#C4A000">userdb_nss_compat_is_enabled</font> () at <font color="#4E9A06">../src/shared/userdb.c</font>:1288
#4 <font color="#3465A4">0x00007f036a5118de</font> in <font color="#C4A000">userdb_getpwuid</font> (<font color="#06989A">errnop</font>=&lt;synthetic pointer&gt;, <font color="#06989A">buflen</font>=1024, <font color="#06989A">buffer</font>=0xf9bf80 &quot;&quot;, <font color="#06989A">pwd</font>=0x61d100 &lt;resbuf&gt;, <font color="#06989A">uid</font>=1001) at <font color="#4E9A06">../src/nss-systemd/userdb-glue.c</font>:115
#5 <font color="#C4A000">_nss_systemd_getpwuid_r</font> (<font color="#06989A">uid</font>=1001, <font color="#06989A">pwd</font>=0x61d100 &lt;resbuf&gt;, <font color="#06989A">buffer</font>=0xf9bf80 &quot;&quot;, <font color="#06989A">buflen</font>=1024, <font color="#06989A">errnop</font>=0xe848b0) at <font color="#4E9A06">../src/nss-systemd/nss-systemd.c</font>:167
#6 <font color="#3465A4">0x00000000004f7f83</font> in <font color="#C4A000">getpwuid_r</font> ()
#7 <font color="#3465A4">0x00000000004f791b</font> in <font color="#C4A000">getpwuid</font> ()
#8 <font color="#3465A4">0x0000000000475ffd</font> in <font color="#C4A000">__acl_to_any_text</font> ()
#9 <font color="#3465A4">0x0000000000411621</font> in <font color="#C4A000">acl2line</font> (<font color="#06989A">line=line@entry</font>=0x19397830) at <font color="#4E9A06">../src/do_md.c</font>:482
#10 <font color="#3465A4">0x0000000000414776</font> in <font color="#C4A000">get_file_attrs</font> (<font color="#06989A">filename=filename@entry</font>=0x19395f00 &quot;/var/log/journal/db71213e586c4af39cc6e668d6f96fd6/user-1001.journal&quot;, <font color="#06989A">attr</font>=119187951550, <font color="#06989A">fs=fs@entry</font>=0x7ffdd027e060)
    at <font color="#4E9A06">../src/gen_list.c</font>:1093
#11 <font color="#3465A4">0x000000000040da0c</font> in <font color="#C4A000">db_readline_disk</font> () at <font color="#4E9A06">../src/db_disk.c</font>:261
#12 <font color="#3465A4">0x000000000040d1eb</font> in <font color="#C4A000">db_readline</font> (<font color="#06989A">db=db@entry</font>=256) at <font color="#4E9A06">../src/db.c</font>:258
#13 <font color="#3465A4">0x00000000004143f3</font> in <font color="#C4A000">populate_tree</font> (<font color="#06989A">tree</font>=0xeb43a0) at <font color="#4E9A06">../src/gen_list.c</font>:1176
#14 <font color="#3465A4">0x0000000000402806</font> in <font color="#C4A000">main</font> (<font color="#06989A">argc</font>=&lt;optimized out&gt;, <font color="#06989A">argv</font>=&lt;optimized out&gt;) at <font color="#4E9A06">../src/aide.c</font>:629
(gdb)
</pre>

_From guesstimating, the issue is that `/var/log/journal/db71213e586c4af39cc6e668d6f96fd6/user-1001.journal` does not exist anymore. Idk why would that be "so severe" as to core out._

```
$ aide --version
Aide 0.16.1

Compiled with the following options:

WITH_MMAP
WITH_PCRE
WITH_POSIX_ACL
WITH_SELINUX
WITH_XATTR
WITH_E2FSATTRS
WITH_LSTAT64
WITH_READDIR64
WITH_ZLIB
WITH_MHASH
WITH_AUDIT
CONFIG_FILE = "/dev/null"
$ apt-cache policy aide
aide:
  Installed: 0.16.1-1ubuntu0.1
  Candidate: 0.16.1-1ubuntu0.1
  Version table:
 *** 0.16.1-1ubuntu0.1 500
        500 http://fi.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     0.16.1-1build2 500
        500 http://fi.archive.ubuntu.com/ubuntu focal/main amd64 Packages
$ lsb_release -rd
Description: Ubuntu 20.04.6 LTS
Release: 20.04
```

I am aware that this is an old version. OTOH, "even trying to make gdb spit this out for me" took a solid calendar week. Building (also for an Debian) sounds like a nightmare.

I hope I don't have to re-start a new database for this.

I would also hope that future versions would have some more logging, so that people don't need to torture themselves trying to get `aide` to talk to them 😕

Revision history for this message
Stdedos (stdedos) wrote :
information type: Public → Public Security
information type: Public Security → Public
information type: Public → Private Security
information type: Private Security → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.