Gentoo Archives: gentoo-hardened

From: Barry Dunn <lists@×××××××××××.uk>
To: gentoo-hardened@l.g.o
Subject: [gentoo-hardened] cpufreqd-1.1.1 segmentation fault with hardened
Date: Mon, 19 Jul 2004 01:58:34
Message-Id: 20040719025002.3d362082@gen.aqui
1 Hi, I've converted a recent install to hardened (USE=hardened, changed
2 the profile to hardened-x86-2004.0, emerge gcc binutils glibc && emerge
3 -e world, using hardened-dev-sources-2.6.7-r3) and now cpufreqd won't
4 start, it segfaults every time. I will be using grsec/pax but have
5 removed them from the kernel for now, cpufreqd is still the same though.
6
7 Guess I need to post a bug report, just thought I'd see if anyone had
8 any suggestions first on things to try. There's an strace below fwiw.
9
10 Now that flags like -pie and -fstack-protector are deprecated in favour
11 of the hardened use flag, can anyone tell me how best to disable
12 hardened stuff when compiling particular packages, to work around any
13 problem like this? (I confess I'm not too clear on what all the compiler
14 options do or how they interrelate... more reading required.)
15
16 Anyway, must say the conversion went very smoothly overall, looking
17 forward to getting to grips with it all... thank you contributors for
18 your time and efforts. :)
19
20 Barry
21
22
23 strace output:
24
25 execve("/usr/sbin/cpufreqd", ["/usr/sbin/cpufreqd"], [/* 31 vars */]) =
26 0 uname({sys="Linux", node="tin", ...}) = 0
27 brk(0) = 0x800075e0
28 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
29 directory) open("/etc/ld.so.cache", O_RDONLY) = 3
30 fstat64(3, {st_mode=S_IFREG|0644, st_size=31190, ...}) = 0
31 mmap2(NULL, 31190, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
32 close(3) = 0
33 open("/lib/libdl.so.2", O_RDONLY) = 3
34 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\\\33\0"...,
35 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=10452, ...}) = 0
36 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
37 0) = 0x4001c000 mmap2(NULL, 12072, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3,
38 0) = 0x4001d000 mmap2(0x4001f000, 4096, PROT_READ|PROT_WRITE,
39 MAP_PRIVATE|MAP_FIXED, 3, 0x1) = 0x4001f000 close(3)
40 = 0 open("/lib/libc.so.6", O_RDONLY) = 3
41 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0001Y\1\000"...,
42 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1182840, ...}) = 0
43 mmap2(NULL, 1103620, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
44 0x40020000 mmap2(0x40128000, 12288, PROT_READ|PROT_WRITE,
45 MAP_PRIVATE|MAP_FIXED, 3, 0x107) = 0x40128000 mmap2(0x4012b000, 9988,
46 PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =
47 0x4012b000 close(3) = 0
48 munmap(0x40014000, 31190) = 0
49 open("/dev/urandom", O_RDONLY) = 3
50 read(3, "\17;\256\334", 4) = 4
51 close(3) = 0
52 brk(0) = 0x800075e0
53 brk(0x800285e0) = 0x800285e0
54 brk(0) = 0x800285e0
55 brk(0x80029000) = 0x80029000
56 stat64("/proc/cpufreq", 0xbffff92c) = -1 ENOENT (No such file or
57 directory) stat64("/sys/devices/system/cpu/cpu0/cpufreq",
58 {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 open("/etc/cpufreqd.conf",
59 O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1687, ...}) =
60 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
61 0) = 0x40014000 read(3, "# cpufreqd.conf\n\n[General]\npidfi"..., 4096)
62 = 1687 time([1090190008]) = 1090190008
63 open("/etc/localtime", O_RDONLY) = 4
64 fstat64(4, {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
65 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
66 0) = 0x40015000 read(4,
67 "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0"..., 4096) =
68 1323 close(4) = 0
69 munmap(0x40015000, 4096) = 0
70 rt_sigaction(SIGPIPE, {0x400ceef2, [], 0}, {SIG_DFL}, 8) = 0
71 socket(PF_UNIX, SOCK_DGRAM, 0) = 4
72 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
73 connect(4, {sa_family=AF_UNIX, path="/dev/log"}, 16) = -1 EPROTOTYPE
74 (Protocol wrong type for socket) close(4)
75 = 0 socket(PF_UNIX, SOCK_STREAM, 0) = 4
76 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
77 connect(4, {sa_family=AF_UNIX, path="/dev/log"}, 16) = 0
78 send(4, "<28>Jul 18 23:33:28 cpufreqd: pa"..., 80, 0) = 80
79 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
80 read(3, "", 4096) = 0
81 close(3) = 0
82 munmap(0x40014000, 4096) = 0
83 time([1090190008]) = 1090190008
84 rt_sigaction(SIGPIPE, {0x400ceef2, [], 0}, {SIG_DFL}, 8) = 0
85 send(4, "<29>Jul 18 23:33:28 cpufreqd: pa"..., 91, 0) = 91
86 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
87 time([1090190008]) = 1090190008
88 rt_sigaction(SIGPIPE, {0x400ceef2, [], 0}, {SIG_DFL}, 8) = 0
89 send(4, "<29>Jul 18 23:33:28 cpufreqd: pa"..., 87, 0) = 87
90 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
91 time([1090190008]) = 1090190008
92 rt_sigaction(SIGPIPE, {0x400ceef2, [], 0}, {SIG_DFL}, 8) = 0
93 send(4, "<29>Jul 18 23:33:28 cpufreqd: pa"..., 84, 0) = 84
94 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
95 time([1090190008]) = 1090190008
96 rt_sigaction(SIGPIPE, {0x400ceef2, [], 0}, {SIG_DFL}, 8) = 0
97 send(4, "<29>Jul 18 23:33:28 cpufreqd: pa"..., 89, 0) = 89
98 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
99 time([1090190008]) = 1090190008
100 rt_sigaction(SIGPIPE, {0x400ceef2, [], 0}, {SIG_DFL}, 8) = 0
101 send(4, "<29>Jul 18 23:33:28 cpufreqd: pa"..., 89, 0) = 89
102 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
103 geteuid32() = 0
104 time([1090190008]) = 1090190008
105 rt_sigaction(SIGPIPE, {0x400ceef2, [], 0}, {SIG_DFL}, 8) = 0
106 send(4, "<29>Jul 18 23:33:28 cpufreqd: St"..., 52, 0) = 52
107 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
108 rt_sigaction(SIGTERM, {0x800032fa, [HUP INT TERM], 0}, NULL, 8) = 0
109 rt_sigaction(SIGINT, {0x8000327c, [HUP INT TERM], 0}, NULL, 8) = 0
110 rt_sigaction(SIGHUP, {0x800031fe, [HUP INT TERM], 0}, NULL, 8) = 0
111 open("/usr/lib/libsys_acpi.so", O_RDONLY) = 3
112 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\f\0"...,
113 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=10168, ...}) = 0
114 mmap2(NULL, 9000, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40014000
115 mmap2(0x40016000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
116 0x2) = 0x40016000 close(3) = 0
117 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
118 +++ killed by SIGSEGV +++
119
120 --
121 gentoo-hardened@g.o mailing list

Replies