Re: [PATCH v5 3/7] tcp: harmonize tcp_vx_rcv header lengthassumptions

From: David Miller
Date: Wed Feb 17 2010 - 18:47:23 EST


From: William Allen Simpson <william.allen.simpson@xxxxxxxxx>
Date: Sun, 14 Feb 2010 01:16:28 -0500

> @@ -1559,7 +1559,8 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
> return 0;
> }
>
> - if (skb->len < tcp_hdrlen(skb) || tcp_checksum_complete(skb))
> + /* Assumes header and options unchanged since checksum_init() */
> + if (tcp_checksum_complete(skb))
> goto csum_err;
>

Not true.

The skb->len can be modified by the call to sk_filter() done
by tcp_v4_rcv().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/