Bug 76791

Summary: Problem with esp sequence and anti-replay window logic.
Product: Networking Reporter: Bhargav (bhargav.1226)
Component: OtherAssignee: Stephen Hemminger (stephen)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.34 Subsystem:
Regression: No Bisected commit-id:

Description Bhargav 2014-05-23 07:22:47 UTC
Hi,

As the esp sequence number is a 32 bit field in the ESP packet, the maximum sequence number could be 4294967295 [as 2^32 is 4294967296], then after the sender will send the esp sequence starting from 1 again.

Lets say a scenario, if there is a huge traffic continously and the esp sequence number reaches the maximum, and for the next packets the esp sequence will be 1. 
The highest sequence number received will be 4294967295.

But the anti-replay logic will check the difference of the highest sequence number  till that time and the sequence number of the received packet. In this case the difference  will be greater than the replay window size. There is a chance of dropping of packets.

Seems it is a bug. Do we have to fix the anti-replay window to cycle the highest sequence like the sender is doing for the esp sequence number?

Thanks,
Bhargav