[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090102102820.GA6088@alice>
Date: Fri, 2 Jan 2009 11:28:20 +0100
From: Eric Sesterhenn <snakebyte@....de>
To: Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>
Cc: Netdev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>, yoshfuji@...ux-ipv6.org
Subject: Re: [BUG] icmpv6fuzz creates bad paging request
hi,
* Ilpo Järvinen (ilpo.jarvinen@...sinki.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@...sinki.fi>
> Reported-by: Eric Sesterhenn <snakebyte@....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;
> }
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists