[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100802.155937.58423604.davem@davemloft.net>
Date: Mon, 02 Aug 2010 15:59:37 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: shemminger@...tta.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 1/4] net: check for reference outside of skb
From: Stephen Hemminger <shemminger@...tta.com>
Date: Mon, 02 Aug 2010 15:00:31 -0700
> It is legitimate for callers of skb_header_pointer to pass a negative
> offset, but the resulting pointer should not go outside the valid
> range of data in the skb.
>
> Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
Stephen, it seems to me that most existing (if not all) callers of
skb_header_pointer() already can prove that their offsets are
legitimate, negative or not. They usually do this via pskb_may_pull()
or similar.
Therefore it makes no sense to me that we punish all existing code paths
with a duplicate test just to have this check available for use in u32.
Just put the range test in u32.
Thanks.
--
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