public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-embedded@lists.gentoo.org
Cc: Kfir Lavi <lavi.kfir@gmail.com>, gentoo-hardened@lists.gentoo.org
Subject: Re: [gentoo-embedded] Tool for eliminating non used code or symbols?
Date: Fri, 26 Apr 2013 16:03:19 -0400	[thread overview]
Message-ID: <201304261603.20868.vapier@gentoo.org> (raw)
In-Reply-To: <CAHNvW1+TnJOK=AO6DnU0ueEMpOYt+n2YKQ9x3VNSnF0OwsiRVg@mail.gmail.com>

[-- Attachment #1: Type: Text/Plain, Size: 1456 bytes --]

On Monday 25 March 2013 03:01:51 Kfir Lavi wrote:
> I'm looking for a way to reduce glibc code size.
> It can be a way to make system smaller and minimize the impact
> of attack vectors in glibc, as in return-to-libc attack.
> 
> Lets say I'm deleting the program 'mkdir', and mkdir uses a function
> in glibc that non of the other parts of the system uses.
> Then I want to eliminate this function from glibc. This leads to smaller
> code and if this function is used in some attack scenario, maybe prevent
> it.
> 
> Is there a way to do it?
> Can you help me think how to build a tool like this? or, integrate
> with existing tools.

the only thing i've seen in the past was a hacky script that utilize the 
uClibc build system to cull objects until things stopped linking.  it had very 
constrained use where i'd safely work, and was never generalized.  i don't 
remember the name of it now (was a few years ago), but having read the 
[limited] source, i wouldn't bother using it as a base.

otherwise, i haven't heard of any tools that do what you want, but i've seen 
many people request it.  unfortunately, it's a tough nut to crack, and the 
vast majority of people requesting it didn't have the technical skills to even 
think about a solution let alone implement it.

i [pessimistically] suspect we're talking many man months here, and the skill 
set involves knowledge of the ELF format at a fairly low level.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-04-26 20:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  7:01 [gentoo-embedded] Tool for eliminating non used code or symbols? Kfir Lavi
2013-03-30  1:09 ` Markos Chandras
2013-04-14 13:07   ` Kfir Lavi
2013-04-26 20:03 ` Mike Frysinger [this message]
2013-04-29  3:58   ` Kfir Lavi
2013-05-27 13:09 ` Bertrand Jacquin
2013-05-31 18:10   ` Christopher Friedt
2013-05-31 18:11     ` Christopher Friedt
2013-06-22  0:23       ` Mike Frysinger
2013-06-22 10:05         ` Anthony G. Basile
2013-06-25 17:44           ` Christopher Friedt
2013-06-30 12:01   ` Kfir Lavi

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=201304261603.20868.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gentoo-embedded@lists.gentoo.org \
    --cc=gentoo-hardened@lists.gentoo.org \
    --cc=lavi.kfir@gmail.com \
    /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