1 |
pageexec@××××××××.hu wrote: |
2 |
> On 7 Mar 2009 at 18:39, basile wrote: |
3 |
> |
4 |
> |
5 |
>> Hi guys, |
6 |
>> |
7 |
>> I'm encountering a reproduceable problem with hardened 2.6.26-r9 and |
8 |
>> 2.6.27-r8 that wasn't there with 2.6.25-r13 on i686, and isn't there |
9 |
>> with amd64 using approximately the same kernel configuration in every |
10 |
>> case. I've been able to reproduce it in vmware, qemu and on physical |
11 |
>> boxes, one with a Intel(R) Core(TM)2 Quad CPU Q6700, the other AMD |
12 |
>> Athlon(tm) 64 FX-62 Dual Core. It a stack fault in kernel mode, but I |
13 |
>> can't pin it down further. It happens almost immediately after the |
14 |
>> bootloader passes control to the kernel. The best error message comes |
15 |
>> from qemu which gives the states of the registers. Here's the error |
16 |
>> message from a bootable ISO I made suing 2.6.26-r9. Any idea where I |
17 |
>> can start tackling this one? |
18 |
>> |
19 |
> |
20 |
> you'll have to check what code was executed just before the triple fault, |
21 |
> start at around EIP. also passing -d in_asm,int,exec,cpu,pcall will pro |
22 |
> a nice log file that will make it even easier. |
23 |
> |
24 |
> |
25 |
>> # qemu -cdrom th-i686-20090307-RC3.iso |
26 |
>> qemu: fatal: triple fault |
27 |
>> EAX=000000ff EBX=0153cac0 ECX=0013a2d1 EDX=0013a2d1 |
28 |
>> ESI=0024c000 EDI=01400000 EBP=01541a20 ESP=01541a10 |
29 |
>> EIP=0153a2d0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 |
30 |
>> |
31 |
> ^^^^^^^^^^^^ |
32 |
> |
33 |
> |
34 |
1) Thanks for the suggestion with -d in_asm,int,exec,cpu,pcall Very |
35 |
useful. |
36 |
|
37 |
2) I've localized the problem, but I can't figure out what's changed |
38 |
from 2.6.25 to 2.6.26/2.6.27. The triple fault occurs when activating |
39 |
CONFIG_PAX_KERNEXEC in the later two, but poses no problem in 2.6.25. |
40 |
Comparing the source trees for 2.6.25-hardened-r13 and |
41 |
2.6.26-hardened-r9, I found no clues tracing back from places where |
42 |
#ifdef CONFIG_PAX_KERNEXEC includes code. I compared the patches |
43 |
(4420_grsec) and the only "suspicious" changes I saw were 1) in |
44 |
arch/x86/kernel/module_32.c where invoking vmalloc changed and 2) in |
45 |
arch/x86/kernel/head64.c (2.6.25) -> arch/x86/kernel/head_32.S (2.6.26) |
46 |
there is some inline assembly which changed. I don't really understand |
47 |
these two changes yet. |
48 |
|
49 |
Any more suggestions? I can always disable the option, but I like the |
50 |
feature. |
51 |
|
52 |
-- |
53 |
|
54 |
Anthony G. Basile, Ph.D. |
55 |
Chair of Information Technology |
56 |
D'Youville College |
57 |
Buffalo, NY 14201 |
58 |
USA |
59 |
|
60 |
(716) 829-8197 |