Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Urban <urban@unix-beratung.de>
To: buildroot@busybox.net
Subject: [Buildroot] stack protection support seems not to work?
Date: Tue, 18 May 2010 18:57:12 +0200	[thread overview]
Message-ID: <4BF2C6E8.8070702@unix-beratung.de> (raw)

Hi Folks,

in my environment, which I git cloned yesterday, turning on stack protection
(BR2_USE_SSP) seems to break openssh (and probably anything else that is
compiled with it).

When trying to run ssh/scp/ssh-agent/sftp on target,  I get something like:

ssh[2842] general protection ip:804c375 sp:afa542b0 error:0 in ssh[8048000+3b000]

With some help from an expert, we traced the error, sort-of.  It's generated in
main(), very near the beginning.  Here's an excerpt from "buildroot-env/objdump
-d ssh.o":

0000040e <main>:
     40e:       8d 4c 24 04             lea    0x4(%esp),%ecx
     412:       83 e4 f0                and    $0xfffffff0,%esp
     415:       ff 71 fc                pushl  -0x4(%ecx)
     418:       55                      push   %ebp
     419:       89 e5                   mov    %esp,%ebp
     41b:       57                      push   %edi
     41c:       56                      push   %esi
     41d:       53                      push   %ebx
     41e:       51                      push   %ecx
     41f:       81 ec d8 05 00 00       sub    $0x5d8,%esp
     425:       65 8b 15 14 00 00 00    mov    %gs:0x14,%edx
     42c:       89 55 ec                mov    %edx,-0x14(%ebp)
     42f:       31 d2                   xor    %edx,%edx
     431:       8b 01                   mov    (%ecx),%eax
     433:       8b 71 04                mov    0x4(%ecx),%esi
     436:       89 85 2c fa ff ff       mov    %eax,-0x5d4(%ebp)
     43c:       e8 fc ff ff ff          call   43d <main+0x2f>
     441:       83 ec 0c                sub    $0xc,%esp
     444:       ff 36                   pushl  (%esi)

The error probably originates from the instructions at offset 425

	mov    %gs:0x14,%edx

"%gs", whatever that may be, seems uninitialized.

ARCH is i386, CPU is i586.

if anyone cares, mail me for config and/or build log.

Rob Urban

                 reply	other threads:[~2010-05-18 16:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BF2C6E8.8070702@unix-beratung.de \
    --to=urban@unix-beratung.de \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox