#10 Aide-0.10 --config-check dumps core

closed
None
5
2003-12-03
2003-11-30
Anonymous
No

// Thanks for releasing, quite a surprise. However, I get a segmentation fault running it.

Stderr/stdout output is below, in case anyone can see at first glance what the problem is:
]# src/aide -c ./doc/aide.conf --config-check -V255
Setting verbosity to 255
commandconf():@@include ./doc/aide.conf

@@include
decode base64
Segmentation fault (core dumped)

1. Platform + SW details + notes:
Linux kernel 2.4.21, vendor Red Hat, release 7.1
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.1)
GNU ld version 2.10.91 (with BFD 2.10.91.0.2)
glibc-2.2.4-33, glibc-devel-2.2.4-33, glibc-common-2.2.4-33
Aide-0.10, Mhash-0.8.18
- This happens regardless of the config I select,
- This also happens with Aide-0.10 + mhash-0.8.16,
- I'm currently running Aide-0.9 + mhash-0.8.16 w/o any problems.

2. Compile/test process:
make='make -j3'; sort='sort -S1'; CFLAGS="-O0 -g3 -Wall"
export make sort ad CFLAGS
cd mhash-0.8.18/
# Need static flag or else Aide's $LIB selection fails
./configure --prefix=$(pwd)/../aide-0.10 --enable-static=yes && make &&
make install && cd ../aide-0.10
# Need explicitly exporting --includes dont work
export LDFLAGS="-L$(pwd)/lib"
./configure --prefix=/usr/local --sysconfdir=/etc --with-zlib
--with-config_file=/etc/aide.conf
# Munge flags as it's stubborn
cat src/Makefile | sed -e "s/CFLAGS = .*-static/CFLAGS = -g3 -O0 -static
-Wall/g" > src/Makefile~ && mv -f src/Makefile~ src/Makefile && make
sh mkcore.sh

3. Strace:
execve("aide-0.10/src/aide", ["aide-0.10/src/aide", "-c", "aide-0.10/doc/aide.conf", "--config-check", "-V255"], [/* 43 vars */]) = 0
fcntl64(0, F_GETFD) = 0
fcntl64(1, F_GETFD) = 0
fcntl64(2, F_GETFD) = 0
uname({sysname="Linux", nodename="nodename", release="2.4.21", version="SMP", machine="i686"}) = 0
geteuid32() = 0
getuid32() = 0
getegid32() = 0
getgid32() = 0
brk(0) = 0x8124254
brk(0x8124274) = 0x8124274
brk(0x8125000) = 0x8125000
umask(0177) = 027
rt_sigaction(SIGBUS, {0x805882c, [BUS], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x805882c, [TERM], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR1, {0x805882c, [USR1], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR2, {0x805882c, [USR2], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x805882c, [HUP], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
time([1070217820]) = 1070217820
write(2, "Setting verbosity to 255\n", 25) = 25
access("aide-0.10/doc/aide.conf", R_OK) = 0
write(2, "commandconf():@@include aide-0.1"..., 49) = 49
open("aide-0.10/doc/aide.conf", O_RDONLY) = 3
brk(0x812a000) = 0x812a000
ioctl(3, TCGETS, 0xbffff290) = -1 ENOTTY (Inappropriate ioctl for device)
write(2, "@@include\n", 10) = 10
fstat64(3, {st_dev=makedev(3, 12), st_ino=225346, st_mode=S_IFREG|0640, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=6, st_size=2645, st_atime=2003/11/
30-19:40:06, st_mtime=2003/11/30-19:40:06, st_ctime=2003/11/30-19:40:06}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000
read(3, "# \n# AIDE 0.10 \n#\n# example conf"..., 4096) = 2645
write(2, "decode base64\n", 14) = 14
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

4. Gdb backtrace:
Core was generated by `aide-0.10/src/aide -c aide-0.10/doc/aide.conf --config-check -V255'.
Program terminated with signal 11, Segmentation fault.
#0 mhash (td=0x0, plaintext=0x8124c10, size=1) at mhash.c:348
348 if (td->hash_func!=NULL)
#0 mhash (td=0x0, plaintext=0x8124c10, size=1) at mhash.c:348
#1 0x0804d752 in conf_input_wrapper (buf=0x8124c10 "#", max_size=8192,
in=0x8124a70) at commandconf.c:231
#2 0x0804a52b in yy_get_next_buffer () at conf_lex.c:5339
#3 0x0804a2d9 in conflex () at conf_lex.c:5174
#4 0x0804844e in confparse () at /usr/lib/bison.simple:432
#5 0x0804d543 in commandconf (mode=68 'D', line=0x80f236a "")
at commandconf.c:165
#6 0x080594a5 in main (argc=5, argv=0xbffff9e4) at aide.c:417
#7 0x0807a102 in __libc_start_main (main=0x80593f0 <main>, argc=5,
ubp_av=0xbffff9e4, init=0x80480b4 <_init>, fini=0x80db0c0 <_fini>,
rtld_fini=0, stack_end=0xbffff9dc) at ../sysdeps/generic/libc-start.c:129

For details please see attached build log and full stack trace.
Thanks in advance for your time.

Cheers, unSpawn

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Error attaching file: "Could Not Attach File to Item: ArtifactFile: File must be > 20 bytes and < 256000 bytes in length Item". Full build log and full stack trace available, see my email address.
    Sorry for the inconvenience.

    Cheers, unSpawn

     
  • Nobody/Anonymous

    Logged In: NO

    Fsck, cookie problem. I'm at unspawn at rootshell dot be.

     
  • Richard van den Berg

    • assigned_to: nobody --> rvdb
     
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    I can reproduce the segfault when compiling as described
    here. However, when using mhash-0.8.17 (debian package) all
    is fine. Will investigate further.

     
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    Oops. Made a small mistake. I CANNOT reproduce this segfault
    at all (but found another one). Need more info (aide.conf +
    aide.db) to continue on this.

     
  • Richard van den Berg

    • summary: Aide-0.10+mhash-0.8.18 dumps core --> Aide-0.10 --config-check dumps core
    • status: open --> pending
     
  • Richard van den Berg

    Fixes --config-check core dump

     
    Attachments
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    Fixed in CVS

     
  • Richard van den Berg

    • status: pending --> closed
     
  • Michael Schwendt

    Logged In: YES
    user_id=62241

    Same issue in older bug 836252 (aide -D gives segfault),
    where I think mhash is not initialized before being used.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks