[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 3 Mar 2015 12:03:46 -0500
From: Willem de Bruijn <willemb@...gle.com>
To: Florian Westphal <fw@...len.de>
Cc: Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH RFC 14/14] net: introduce and use KERNEL_MAX_HEADER_PARSE_ADDRLEN
> index 6fb6bdf..97eb50c 100644
> --- a/net/mac802154/iface.c
> +++ b/net/mac802154/iface.c
> @@ -433,6 +433,7 @@ mac802154_header_parse(const struct sk_buff *skb, unsigned char *haddr)
> return 0;
> }
>
> + dev_validate_header_parse_addrlen(sizeof(*addr));
> *addr = hdr.source;
> return sizeof(*addr);
> }
> diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
> index 9db8369..1a4dcbb 100644
> --- a/net/packet/af_packet.c
> +++ b/net/packet/af_packet.c
> @@ -1816,7 +1816,8 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
> skb = nskb;
> }
>
> - sock_skb_cb_check_size(sizeof(*PACKET_SKB_CB(skb)) + MAX_ADDR_LEN - 8);
> + sock_skb_cb_check_size(sizeof(*PACKET_SKB_CB(skb)) +
> + KERNEL_MAX_HEADER_PARSE_ADDRLEN);
KERNEL_MAX_HEADER_PARSE_ADDRLEN - 8, as the first 8
bytes are still written into the space allocated in packet_skb_cb?
--
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