1 |
2016.Június 2.(Cs) 02:31 időpontban Max R.D. Parmer ezt írta: |
2 |
> On Wed, Jun 1, 2016, at 15:49, Tóth Attila wrote: |
3 |
>> I've just had an unsuccessful attempt to upgrade to systemd-230-r1. It |
4 |
>> segfaults and slows the system down. The symptoms are better compared to |
5 |
>> -229, but still significant. |
6 |
>> |
7 |
>> https://forums.grsecurity.net/viewtopic.php?f=3&t=4485 |
8 |
>> |
9 |
>> Some relevant log entries: |
10 |
>> grsec: denied resource overstep by requesting 8392704 for RLIMIT_STACK |
11 |
>> against limit 8388608 for /usr/lib64/systemd/systemd[systemd:2735] |
12 |
>> uid/euid:0/0 gid/egid:0/0, parent /usr/lib64/systemd/systemd[systemd:1] |
13 |
>> uid/euid:0/0 gid/egid:0/0 |
14 |
>> systemd[2735]: segfault at 39f8d01cf00 ip 00000368d4caa2e4 sp |
15 |
>> 0000039f8d01cf00 error 6 in libc-2.23.so[368d4c62000+19a000] |
16 |
>> grsec: Segmentation fault occurred at 0000039f8d01cf00 in |
17 |
>> /usr/lib64/systemd/systemd[systemd:2735] uid/euid:0/0 gid/egid:0/0, |
18 |
>> parent |
19 |
>> /usr/lib64/systemd/systemd[systemd:1] uid/euid:0/0 gid/egid:0/0 |
20 |
>> grsec: bruteforce prevention initiated for the next 30 minutes or until |
21 |
>> service restarted, stalling each fork 30 seconds. Please investigate |
22 |
>> the |
23 |
>> crash report for /usr/lib64/systemd/systemd[systemd:2735] uid/euid:0/0 |
24 |
>> gid/egid:0/0, parent /usr/lib64/systemd/systemd[systemd:1] uid/euid:0/0 |
25 |
>> gid/egid:0/0 |
26 |
>> |
27 |
>> systemd-coredump[2747]: Process 2735 (systemd) of user 0 dumped core. |
28 |
>> |
29 |
>> Stack trace of thread |
30 |
>> 2735: |
31 |
>> #0 |
32 |
>> 0x00000368d4caa2e4 |
33 |
>> _IO_vfprintf |
34 |
>> (libc.so.6) |
35 |
>> #1 |
36 |
>> 0x00000368d4d5e852 |
37 |
>> __vsnprintf_chk |
38 |
>> (libc.so.6) |
39 |
>> #2 |
40 |
>> 0x00000368d4d5e7a4 |
41 |
>> __snprintf_chk |
42 |
>> (libc.so.6) |
43 |
>> #3 |
44 |
>> 0x00000000df8db344 |
45 |
>> n/a (systemd) |
46 |
>> #4 |
47 |
>> 0x00000000df8db9aa |
48 |
>> n/a (systemd) |
49 |
> |
50 |
> Not necessarily the ideal solution, but have you tried twiddling with |
51 |
> the stack size in limits.conf? |
52 |
|
53 |
I checked an the system-wide defaults apply to systemd, which is: 8M soft |
54 |
limit and _unlimited_ hard limit for stack size. So after exceeding soft |
55 |
limit systemd segfaults and tries to dump core. |
56 |
|
57 |
cat /proc/1/limits |
58 |
Limit Soft Limit Hard Limit Units |
59 |
Max stack size 8388608 unlimited bytes |
60 |
|
61 |
I expect any process to handle a situation of trying to exceed soft limit |
62 |
with unlimited hard limit in another way than segfaulting and attempting |
63 |
to dump core... |
64 |
|
65 |
> If I read this right, grsec limits the size of the stack, which causes |
66 |
> the process to segfault. |
67 |
|
68 |
I think grsec does not enforce any stack limits here, it just reports the |
69 |
issue and makes it more visible. |
70 |
|
71 |
BR: Dw. |
72 |
-- |
73 |
dr Tóth Attila, Radiológus, 06-20-825-8057 |
74 |
Attila Toth MD, Radiologist, +36-20-825-8057 |