Skip to contentSkip to conversation

Sequence Number Validation Bug Fixes 1/2

PATCH Samuel Jero 1 participant 1 message Dec 26, 2010 Networking

lore
Share & tools
lore
#0 lore raw

Currently dccp_check_seqno returns 0 (indicating a valid packet) if the acknowledgment number is out of bounds and the sync that RFC 4340 mandates at this point is currently being rate-limited. This function should return -1, indicating an invalid packet.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Patch Follows <<<<<<<<<<<<<<<<<<<<<<<<<<

net/dccp/input.c +0 -0
@@ -275,8 +279,10 @@ static int dccp_check_seqno(struct sock *sk, struct

sk_buff *skb)
* at most 1 / (dccp_sync_rate_limit * HZ) Syncs per second.
*/
if (time_before(now, (dp->dccps_rate_last +
- sysctl_dccp_sync_ratelimit)))
- return 0;
+ sysctl_dccp_sync_ratelimit))){
+ return -1;
+ }
+

DCCP_WARN("Step 6 failed for %s packet, "
"(LSWL(%llu) <= P.seqno(%llu) <= S.SWH(%llu)) and "