From: Eric Sesterhenn <snakebyte@gmx.de>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Cc: Netdev <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>,
yoshfuji@linux-ipv6.org
Subject: Re: [BUG] icmpv6fuzz creates bad paging request
Date: Fri, 2 Jan 2009 11:28:20 +0100 [thread overview]
Message-ID: <20090102102820.GA6088@alice> (raw)
In-Reply-To: <Pine.LNX.4.64.0901021040050.6207@wrl-59.cs.helsinki.fi>
hi,
* Ilpo Järvinen (ilpo.jarvinen@helsinki.fi) wrote:
> On Thu, 1 Jan 2009, Eric Sesterhenn wrote:
>
> > Hi,
> >
> > running "icmpv6fuzz -r 2187" gives me the following oops with current -git
>
> Can you try the patch below.
>
> I wonder btw what's the correct policy wrt. those optval == NULL checks
> that's visible in the patch' context (IPV6_PKTINFO is the only one which
> is doing that while many there fetch to sizeof(struct something)).
patch works for me, thanks for the fast reply.
Greetings, Eric
> [PATCH] ipv6: IPV6_PKTINFO relied userspace providing correct length
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> Reported-by: Eric Sesterhenn <snakebyte@gmx.de>
> ---
> net/ipv6/ipv6_sockglue.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
> index 0069b7e..d31df0f 100644
> --- a/net/ipv6/ipv6_sockglue.c
> +++ b/net/ipv6/ipv6_sockglue.c
> @@ -403,7 +403,7 @@ sticky_done:
> else if (optlen < sizeof(struct in6_pktinfo) || optval == NULL)
> goto e_inval;
>
> - if (copy_from_user(&pkt, optval, optlen)) {
> + if (copy_from_user(&pkt, optval, sizeof(struct in6_pktinfo))) {
> retv = -EFAULT;
> break;
> }
next prev parent reply other threads:[~2009-01-02 10:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-01 20:13 [BUG] icmpv6fuzz creates bad paging request Eric Sesterhenn
2009-01-02 8:53 ` Ilpo Järvinen
2009-01-02 9:05 ` Herbert Xu
2009-01-05 1:28 ` David Miller
2009-01-02 10:28 ` Eric Sesterhenn [this message]
2009-01-02 8:59 ` Herbert Xu
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=20090102102820.GA6088@alice \
--to=snakebyte@gmx.de \
--cc=davem@davemloft.net \
--cc=ilpo.jarvinen@helsinki.fi \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).