Re: [PATCH 5/6] dccp: Fix incorrect length check for ICMPv4 packets

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <dccp@...>, <netdev@...>, <yjwei@...>
Date: Friday, July 25, 2008 - 6:25 am

| > -	if (skb->len < (iph->ihl << 2) + 8) {
| > +	if (skb->len < (iph->ihl << 2) + __dccp_basic_hdr_len(dh)) {
| >  		ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
| >  		return;
| >  	}
| 
| You can't dereference "dh" before you know there is even
| space past offset "iph->ihl << 2".  Yet that is what doing
| an unconditional __dccp_basic_hdr_len() call here is going
| to do.
| 
Oh that was my fault. Thanks a lot for pointing this out.

Will work out a fixed/improved version for both patches,
test and then resubmit.

Gerrit
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[net-2.6 PATCH 0/6] dccp: ICMP bug fixes by Wei Yongjun, Gerrit Renker, (Fri Jul 25, 5:02 am)
v2 [net-2.6 PATCH 0-4/7] dccp: Revised ICMP bug fixes, Gerrit Renker, (Fri Jul 25, 10:28 am)
[PATCH 2/6] dccp: Bug-Fix - AWL was never updated, Gerrit Renker, (Fri Jul 25, 5:02 am)
Re: [PATCH 5/6] dccp: Fix incorrect length check for ICMPv4 ..., Gerrit Renker, (Fri Jul 25, 6:25 am)