All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Rosenberg <drosenberg@vsecurity.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [CRYPTO] obfuscating kernel pointers
Date: Fri, 12 Nov 2010 12:39:41 -0500	[thread overview]
Message-ID: <1289583581.2034.8.camel@dan> (raw)
In-Reply-To: <20101112172727.GA26217@hmsreliant.think-freely.org>

Thanks for your response.

> > 
> Just use get_random_bytes, or initalize an instance of cprng with
> get_random_bytes.
> 

Will do.

> 
> Depends on your goal, if you just wnat to hide the pointers, why not just print
> NULL instead of the value?  If you want to maintain some level of uniqueness,
> just pull sizeof (void *) random bytes from whatever method above and add it to
> the pointer in question, and hope for the best.
> 

Unfortunately, neither of these sound like an option.  It's been
requested from the networking folks that any replacement value for the
socket addresses be a consistent unique identifier for object tracking
purposes.  The current plan is to expose the real address to privileged
readers, and expose a consistent obfuscated address that's only useful
for tracking to unprivileged readers.

> Honestly, though, I'm having trouble seeing the value of this.  What interface in proc
> are you seeing that exposes pointers from kernel space in any meaningful way?
> and if those cases exist, isn't selinux the solution to preventing exposure of
> these values to processes without sufficient privlidges?
> Neil
> 

Lots of packet families expose them...see, for
example, /proc/net/{tcp,udp,raw,unix}.  Since socket structures have
function pointers, they are an appealing target in the event of a kernel
memory write vulnerability.  The goal here is to make exploitation of
such issues more difficult, including for distros that don't use
SELinux.

Thanks,
Dan

  reply	other threads:[~2010-11-12 17:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12 13:32 [CRYPTO] obfuscating kernel pointers Dan Rosenberg
2010-11-12 17:27 ` Neil Horman
2010-11-12 17:39   ` Dan Rosenberg [this message]
2010-11-12 18:54     ` Neil Horman
2010-11-12 19:03       ` Dan Rosenberg
2010-11-15  8:43 ` Tomas Mraz
2010-11-15 11:21   ` Neil Horman
2010-11-15 11:58   ` Herbert Xu
2010-11-15 12:06     ` Tomas Mraz

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=1289583581.2034.8.camel@dan \
    --to=drosenberg@vsecurity.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=nhorman@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.