lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4992DE21.80706@kernel.org>
Date:	Wed, 11 Feb 2009 23:18:09 +0900
From:	Tejun Heo <tj@...nel.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Brian Gerst <brgerst@...il.com>, hpa@...or.com, jeremy@...p.org,
	tglx@...utronix.de, linux-kernel@...r.kernel.org, x86@...nel.org,
	rusty@...tcorp.com.au
Subject: Re: [PATCH x86#core/percpu] x86: fix x86_32 stack protector bugs

Ingo Molnar wrote:
> * Tejun Heo <tj@...nel.org> wrote:
> 
>> Impact: fix x86_32 stack protector
>>
>> Brian Gerst found out that %gs was being initialized to stack_canary
>> instead of stack_canary - 20, which basically gave the same canary
>> value for all threads.  Fixing this also exposed the following bugs.
>>
>> * cpu_idle() didn't call boot_init_stack_canary()
>>
>> * stack canary switching in switch_to() was being done too late making
>>   the initial run of a new thread use the old stack canary value.
>>
>> Fix all of them and while at it update comment in cpu_idle() about
>> calling boot_init_stack_canary().
>>
>> Signed-off-by: Tejun Heo <tj@...nel.org>
>> Reported-by: Brian Gerst <brgerst@...il.com>
>> ---
>>  arch/x86/include/asm/stackprotector.h |    2 +-
>>  arch/x86/include/asm/system.h         |    8 +++-----
>>  arch/x86/kernel/head_32.S             |    1 +
>>  arch/x86/kernel/process_32.c          |   10 ++++++++++
>>  arch/x86/kernel/process_64.c          |   11 +++++------
>>  5 files changed, 20 insertions(+), 12 deletions(-)
> 
> Applied to tip:core/percpu, thanks guys!
> 
> I never got around to finding his bug in practice as the latest bits of 
> tip:core/percpu are not in tip/master at the moment, due to that 64-bit
> build failure.

I was kind of waiting for your test result (whether the build issue
can be reproduced without distcc) before going ahead and building a
cross compiler.  I don't see how the cross compiler would pass the
gcc-x86_*-has-stack-protector.sh test which builds a minimalistic c
file and greps for %gs access.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ