All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Daniel Borkmann <dborkman@redhat.com>
Cc: trinity@vger.kernel.org
Subject: Re: [PATCH] setsockopt: sanitize PF_PACKET SOL_PACKET options for zero-copy rings
Date: Thu, 2 May 2013 09:54:10 -0400	[thread overview]
Message-ID: <20130502135410.GA2831@redhat.com> (raw)
In-Reply-To: <3f833e7246a223dc545e3f9d06b75ebeca723e6f.1367420720.git.dborkman@redhat.com>

On Wed, May 01, 2013 at 05:10:15PM +0200, Daniel Borkmann wrote:
 > In SOL_PACKET, we can sanitize the setsockopt() syscall a bit in the
 > following ways:
 > 
 > i) PACKET_VERSION is always checked in the kernel and it is quite
 >    likely to return -EINVAL here, very unlikely to crash this option.
 >    However, if we pass the correct values to it (TPACKET_V1, TPACKET_V2,
 >    TPACKET_V3), we can jump into this version specific code on other
 >    syscalls on that socket.
 > 
 > ii) PACKET_{R,T}X_RING never gets a structure of size int, so it might
 >     always return -EINVAL here. Depending on the TPACKET version, it
 >     can either be tpacket_req or tpacket_req3. Make it more likely to
 >     have size tpacket_req though.
 > 
 > Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

thanks, applied and pushed out.

	Dave

      reply	other threads:[~2013-05-02 13:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1367420720.git.dborkman@redhat.com>
2013-05-01 15:10 ` [PATCH] setsockopt: sanitize PF_PACKET SOL_PACKET options for zero-copy rings Daniel Borkmann
2013-05-02 13:54   ` Dave Jones [this message]

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=20130502135410.GA2831@redhat.com \
    --to=davej@redhat.com \
    --cc=dborkman@redhat.com \
    --cc=trinity@vger.kernel.org \
    /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.