Gentoo Archives: gentoo-hardened

From: Ned Ludd <solar@g.o>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] Problem with logrotate with a hardened/grsec system
Date: Sun, 05 Feb 2006 17:55:40
Message-Id: 1139161950.5092.16.camel@localhost
In Reply to: [gentoo-hardened] Problem with logrotate with a hardened/grsec system by Guillaume Castagnino
1 No idea never seen of this before.
2
3
4 On Sun, 2006-02-05 at 18:10 +0100, Guillaume Castagnino wrote:
5 > Hi,
6 >
7 > Logrotate has a very strange behavior on my grsec box :
8 > after reading the config files, there is a big lockup, logrotate does not
9 > start rotating the logs, and use 100% CPU. Here is the verbose output :
10 >
11 > =====================8<=====================
12 > # logrotate /etc/logrotate.conf -v
13 > reading config file /etc/logrotate.conf
14 > including /etc/logrotate.d
15 > reading config file acpid
16 > reading config info for /var/log/acpid
17 > reading config file apache2
18 > reading config info for /var/log/apache2/*log
19 > reading config file fail2ban
20 > reading config info for /var/log/fail2ban.log
21 > reading config file samba
22 > reading config info for /var/log/samba/log
23 > reading config file syslog-ng
24 > reading config info
25 > for /var/log/syslog /var/log/auth.log /var/log/mail.err /var/log/cron.log
26 > /var/log/mail.log /var/log/messages /var/log/user.log /var/log/daemon.log
27 > /var/log/kern.log /var/log/imapd.log /var/log/grsec.log /var/log/iptables.log
28 > /var/log/rsync.log
29 > reading config info for /var/log/wtmp
30 > <HERE IS THE LOCKUP>
31 > =====================>8=====================
32 >
33 > The same logrotate config works well on my desktop (non hardened) box.
34 > Strace output of logrotate execution sounds quite strange to me. Seems
35 > logrotate loops for half an hour with this message :
36 >
37 > =====================8<=====================
38 > mremap(0x4ae6d000, 557056, 557056, MREMAP_MAYMOVE) = 0x4ae6d000
39 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
40 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
41 > mremap(0x4ae6d000, 557056, 557056, MREMAP_MAYMOVE) = 0x4ae6d000
42 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
43 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
44 > mremap(0x4ae6d000, 557056, 557056, MREMAP_MAYMOVE) = 0x4ae6d000
45 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
46 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
47 > mremap(0x4ae6d000, 557056, 557056, MREMAP_MAYMOVE) = 0x4ae6d000
48 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
49 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
50 > mremap(0x4ae6d000, 557056, 557056, MREMAP_MAYMOVE) = 0x4ae6d000
51 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
52 > stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
53 > mremap(0x4ae6d000, 557056, 557056, MREMAP_MAYMOVE) = 0x4ae6d000
54 > =====================>8=====================
55 >
56 > Do you have any idea of what could cause this strange behavior ?
57 >
58 > Some config infos :
59 > - using a vanilla 2.6.14.6 with grsec patch 2.1.8
60 > - rbac is disabled for those tests
61 > - logrotate is 3.7.1-r2
62 > - hardened profile hardened/x86/2.6 full ~x86
63 > - CFLAGS : -march=pentium4 -O2 -mtune=pentium4 -fomit-frame-pointer -pipe
64 >
65 > Regards,
66 --
67 Ned Ludd <solar@g.o>
68 Gentoo Linux
69
70 --
71 gentoo-hardened@g.o mailing list