All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Ani Sinha <ani@arista.com>, David Miller <davem@davemloft.net>,
	"matthew.leach" <matthew.leach@arm.com>,
	netdev@vger.kernel.org, fenner <fenner@arista.com>,
	fruggeri <fruggeri@arista.com>, travisb <travisb@arista.com>
Subject: Re: [PATCH] net: socket: do not validate msg_namelen unless msg_name is non-NULL
Date: Fri, 05 Sep 2014 14:42:22 -0700	[thread overview]
Message-ID: <1409953342.26422.137.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <1409952419.5306.29.camel@localhost>

On Fri, 2014-09-05 at 23:26 +0200, Hannes Frederic Sowa wrote:

> Yes, I understood. Same issues with sin6_flowinfo where a specific
> setsockopt is needed so the kernel will look at it at all.
> 
> If you set msg_namelen = 0 if msg_name == NULL prior to the < 0 check it
> should not trigger the return -EINVAL and also we don't run into the
> unsafe implicit conversion case when comparing msg_namelen with the
> result of the sizeof(). Do you see any problems with that?

BTW, it looks some of the tests are done in different places, like
verify_iovec()

We certainly can cleanup the confusion.

  reply	other threads:[~2014-09-05 21:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 21:00 [PATCH] net: socket: do not validate msg_namelen unless msg_name is non-NULL Ani Sinha
2014-09-05 21:14 ` Hannes Frederic Sowa
2014-09-05 21:21   ` Ani Sinha
2014-09-05 21:26     ` Hannes Frederic Sowa
2014-09-05 21:42       ` Eric Dumazet [this message]
2014-09-05 21:44       ` Ani Sinha
2014-09-08 21:53         ` Ani Sinha

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=1409953342.26422.137.camel@edumazet-glaptop2.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=ani@arista.com \
    --cc=davem@davemloft.net \
    --cc=fenner@arista.com \
    --cc=fruggeri@arista.com \
    --cc=hannes@stressinduktion.org \
    --cc=matthew.leach@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=travisb@arista.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.