Page 1 of 1

grsecurity-2.2.2-3.0.3-201108232250 and "stack_chk_fail"

PostPosted: Wed Aug 24, 2011 8:56 am
by simonbcn
This problem already was solved in "grsecurity-2.2.2-2.6.39.4-201108211939.patch" but in the patch "grsecurity-2.2.2-3.0.3-201108232250" this change hasn't been replicated. More info in this thread.

Re: grsecurity-2.2.2-3.0.3-201108232250 and "stack_chk_fail"

PostPosted: Wed Aug 24, 2011 11:00 am
by spender
I didn't change anything in the patch you said fixed your problem that would have actually fixed your reported problem. Furthermore, all the changes contained between the patch you had problems with and the one that "fixed" it are contained in the 3.0.3 patch. I believe you have a broken toolchain/build environment.

-Brad

Re: grsecurity-2.2.2-3.0.3-201108232250 and "stack_chk_fail"

PostPosted: Wed Aug 24, 2011 2:36 pm
by simonbcn
spender wrote:I didn't change anything in the patch you said fixed your problem that would have actually fixed your reported problem. Furthermore, all the changes contained between the patch you had problems with and the one that "fixed" it are contained in the 3.0.3 patch. I believe you have a broken toolchain/build environment.

It's very curious that my "broken toolchain/build environment" only fails when I compile the kernel with your patches... Without your patches it compiles well...

EDIT:
I was wrong: the error still occurs with last patch the kernel 2.6.39.4 and now in kernel 3.0.3.

Re: grsecurity-2.2.2-3.0.3-201108232250 and "stack_chk_fail"

PostPosted: Wed Aug 24, 2011 2:51 pm
by PaX Team
simonbcn wrote:It's very curious that my "broken toolchain/build environment" only fails when I compile the kernel with your patches... Without your patches it compiles well...
thing is, you're the only one seeing this problem, so obviously there's something peculiar with your build environment. since we don't have access to it, only you can figure out what makes ssp enabled for your kernel compiles...

Re: grsecurity-2.2.2-3.0.3-201108232250 and "stack_chk_fail"

PostPosted: Wed Aug 24, 2011 3:06 pm
by simonbcn
PaX Team wrote:
simonbcn wrote:It's very curious that my "broken toolchain/build environment" only fails when I compile the kernel with your patches... Without your patches it compiles well...
thing is, you're the only one seeing this problem, so obviously there's something peculiar with your build environment. since we don't have access to it, only you can figure out what makes ssp enabled for your kernel compiles...

And why when I compile without your patch compilation doesn't fail?

Is this issue related with this? This problem occurs since you have added this requirement to the patch.

Now I have to install gcc-plugin-dev, libmpfr-dev and libmpc-dev to compile the kernel with grsec patch.

The only one: http://forums.grsecurity.net/viewtopic.php?f=3&t=1688?

Re: grsecurity-2.2.2-3.0.3-201108232250 and "stack_chk_fail"

PostPosted: Wed Aug 24, 2011 3:30 pm
by simonbcn
Same error compiling in my PC with Ubuntu 11.04 64 bits.

Re: grsecurity-2.2.2-3.0.3-201108232250 and "stack_chk_fail"

PostPosted: Wed Aug 24, 2011 5:42 pm
by PaX Team
simonbcn wrote:And why when I compile without your patch compilation doesn't fail?
as i just learned from Kees Cook, ubuntu's gcc forcibly enables ssp so successful compilation under !CC_STACKPROTECTOR relies on the main Makefile disabling support for ssp explicitly. and which happens to be somewhat broken with the plugins as the cc-option target uses KBUILD_CFLAGS for no good reason i think. next patch will hopefully fix this, let me know if it doesn't.