lkml.org 
[lkml]   [2018]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 188/496] xfrm: Fix ESN sequence number handling for IPsec GSO packets.
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Steffen Klassert <steffen.klassert@secunet.com>

    [ Upstream commit b8b549eec8187ac1b12075d69a2d84d89b5e811a ]

    When IPsec offloading was introduced, we accidentally incremented
    the sequence number counter on the xfrm_state by one packet
    too much in the ESN case. This leads to a sequence number gap of
    one packet after each GSO packet. Fix this by setting the sequence
    number to the correct value.

    Fixes: d7dbefc45cf5 ("xfrm: Add xfrm_replay_overflow functions for offloading")
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/xfrm/xfrm_replay.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/xfrm/xfrm_replay.c
    +++ b/net/xfrm/xfrm_replay.c
    @@ -658,7 +658,7 @@ static int xfrm_replay_overflow_offload_
    } else {
    XFRM_SKB_CB(skb)->seq.output.low = oseq + 1;
    XFRM_SKB_CB(skb)->seq.output.hi = oseq_hi;
    - xo->seq.low = oseq = oseq + 1;
    + xo->seq.low = oseq + 1;
    xo->seq.hi = oseq_hi;
    oseq += skb_shinfo(skb)->gso_segs;
    }

    \
     
     \ /
      Last update: 2018-05-28 15:20    [W:4.236 / U:0.168 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site