mbox series

[SRU,F:linux-bluefield,V2,0/9] Fix fragmentation support for TC connection tracking

Message ID 1630516460-16421-1-git-send-email-bodong@nvidia.com
Headers show
Series Fix fragmentation support for TC connection tracking | expand

Message

Bodong Wang Sept. 1, 2021, 5:14 p.m. UTC
When using OVS with tc to offload connection tracking flows, sending udp/icmp
fragmented traffic will cause call trace with NULL dereference.

This series contains 7 patches from upstream which fix act_ct handling of
fragmented packets. And revert a patch which is covered by the 7 upstream
patches.

V0->V1:
Fix backport commit message for patch 1/8

V1->v2:
Add new patch from Davide for better backporting.
Fix backport commit message for the patches which can't be applied cleanly.

Davide Caratti (1):
  net/sched: act_ct: fix wild memory access when clearing fragments

Maor Dickman (1):
  Revert "net/sched: act_ct: Fix skb double-free in
    tcf_ct_handle_fragments() error flow"

liujian (1):
  net/sched: The error lable position is corrected in ct_init_module

wenxu (6):
  net/sched: act_ct: fix restore the qdisc_skb_cb after defrag
  net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct
  net/sched: fix miss init the mru in qdisc_skb_cb
  net/sched: act_mirred: refactor the handle of xmit
  net/sched: sch_frag: add generic packet fragment support.
  ipv6: add ipv6_fragment hook in ipv6_stub

 include/linux/skbuff.h    |   1 +
 include/net/act_api.h     |   6 ++
 include/net/ipv6_stubs.h  |   2 +
 include/net/sch_generic.h |   8 +--
 net/core/dev.c            |   2 +
 net/ipv6/addrconf_core.c  |   8 +++
 net/ipv6/af_inet6.c       |   1 +
 net/openvswitch/flow.c    |   1 +
 net/sched/Makefile        |   1 +
 net/sched/act_api.c       |  16 +++++
 net/sched/act_ct.c        |  33 +++++++---
 net/sched/act_mirred.c    |  21 +++++--
 net/sched/cls_api.c       |   1 +
 net/sched/sch_frag.c      | 150 ++++++++++++++++++++++++++++++++++++++++++++++
 14 files changed, 233 insertions(+), 18 deletions(-)
 create mode 100644 net/sched/sch_frag.c

Comments

Tim Gardner Sept. 1, 2021, 5:38 p.m. UTC | #1
Acked-by: Tim Gardner <tim.gardner@canonical.com>

PATCH 5/9 was not a clean revert, but the conflict resolution was 
straightforward.

PATCH 9/9 was a clean cherry-pick for me.

The other backports were easy enough to resolve.

On 9/1/21 11:14 AM, Bodong Wang wrote:
> When using OVS with tc to offload connection tracking flows, sending udp/icmp
> fragmented traffic will cause call trace with NULL dereference.
> 
> This series contains 7 patches from upstream which fix act_ct handling of
> fragmented packets. And revert a patch which is covered by the 7 upstream
> patches.
> 
> V0->V1:
> Fix backport commit message for patch 1/8
> 
> V1->v2:
> Add new patch from Davide for better backporting.
> Fix backport commit message for the patches which can't be applied cleanly.
> 
> Davide Caratti (1):
>    net/sched: act_ct: fix wild memory access when clearing fragments
> 
> Maor Dickman (1):
>    Revert "net/sched: act_ct: Fix skb double-free in
>      tcf_ct_handle_fragments() error flow"
> 
> liujian (1):
>    net/sched: The error lable position is corrected in ct_init_module
> 
> wenxu (6):
>    net/sched: act_ct: fix restore the qdisc_skb_cb after defrag
>    net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct
>    net/sched: fix miss init the mru in qdisc_skb_cb
>    net/sched: act_mirred: refactor the handle of xmit
>    net/sched: sch_frag: add generic packet fragment support.
>    ipv6: add ipv6_fragment hook in ipv6_stub
> 
>   include/linux/skbuff.h    |   1 +
>   include/net/act_api.h     |   6 ++
>   include/net/ipv6_stubs.h  |   2 +
>   include/net/sch_generic.h |   8 +--
>   net/core/dev.c            |   2 +
>   net/ipv6/addrconf_core.c  |   8 +++
>   net/ipv6/af_inet6.c       |   1 +
>   net/openvswitch/flow.c    |   1 +
>   net/sched/Makefile        |   1 +
>   net/sched/act_api.c       |  16 +++++
>   net/sched/act_ct.c        |  33 +++++++---
>   net/sched/act_mirred.c    |  21 +++++--
>   net/sched/cls_api.c       |   1 +
>   net/sched/sch_frag.c      | 150 ++++++++++++++++++++++++++++++++++++++++++++++
>   14 files changed, 233 insertions(+), 18 deletions(-)
>   create mode 100644 net/sched/sch_frag.c
>
Stefan Bader Sept. 3, 2021, 7:55 a.m. UTC | #2
On 01.09.21 19:14, Bodong Wang wrote:
> When using OVS with tc to offload connection tracking flows, sending udp/icmp
> fragmented traffic will cause call trace with NULL dereference.
> 
> This series contains 7 patches from upstream which fix act_ct handling of
> fragmented packets. And revert a patch which is covered by the 7 upstream
> patches.
> 
> V0->V1:
> Fix backport commit message for patch 1/8
> 
> V1->v2:
> Add new patch from Davide for better backporting.
> Fix backport commit message for the patches which can't be applied cleanly.
> 
> Davide Caratti (1):
>    net/sched: act_ct: fix wild memory access when clearing fragments
> 
> Maor Dickman (1):
>    Revert "net/sched: act_ct: Fix skb double-free in
>      tcf_ct_handle_fragments() error flow"
> 
> liujian (1):
>    net/sched: The error lable position is corrected in ct_init_module
> 
> wenxu (6):
>    net/sched: act_ct: fix restore the qdisc_skb_cb after defrag
>    net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct
>    net/sched: fix miss init the mru in qdisc_skb_cb
>    net/sched: act_mirred: refactor the handle of xmit
>    net/sched: sch_frag: add generic packet fragment support.
>    ipv6: add ipv6_fragment hook in ipv6_stub
> 
>   include/linux/skbuff.h    |   1 +
>   include/net/act_api.h     |   6 ++
>   include/net/ipv6_stubs.h  |   2 +
>   include/net/sch_generic.h |   8 +--
>   net/core/dev.c            |   2 +
>   net/ipv6/addrconf_core.c  |   8 +++
>   net/ipv6/af_inet6.c       |   1 +
>   net/openvswitch/flow.c    |   1 +
>   net/sched/Makefile        |   1 +
>   net/sched/act_api.c       |  16 +++++
>   net/sched/act_ct.c        |  33 +++++++---
>   net/sched/act_mirred.c    |  21 +++++--
>   net/sched/cls_api.c       |   1 +
>   net/sched/sch_frag.c      | 150 ++++++++++++++++++++++++++++++++++++++++++++++
>   14 files changed, 233 insertions(+), 18 deletions(-)
>   create mode 100644 net/sched/sch_frag.c
> 
Sounds like needing a bit of care when applying but...

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Kelsey Skunberg Sept. 3, 2021, 9:15 p.m. UTC | #3
Applied to F/bluefield master-next. patch 6 didn't apply cleanly, though it was
minor context change. thank you!

-Kelsey

On 2021-09-01 12:14:11 , Bodong Wang wrote:
> When using OVS with tc to offload connection tracking flows, sending udp/icmp
> fragmented traffic will cause call trace with NULL dereference.
> 
> This series contains 7 patches from upstream which fix act_ct handling of
> fragmented packets. And revert a patch which is covered by the 7 upstream
> patches.
> 
> V0->V1:
> Fix backport commit message for patch 1/8
> 
> V1->v2:
> Add new patch from Davide for better backporting.
> Fix backport commit message for the patches which can't be applied cleanly.
> 
> Davide Caratti (1):
>   net/sched: act_ct: fix wild memory access when clearing fragments
> 
> Maor Dickman (1):
>   Revert "net/sched: act_ct: Fix skb double-free in
>     tcf_ct_handle_fragments() error flow"
> 
> liujian (1):
>   net/sched: The error lable position is corrected in ct_init_module
> 
> wenxu (6):
>   net/sched: act_ct: fix restore the qdisc_skb_cb after defrag
>   net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct
>   net/sched: fix miss init the mru in qdisc_skb_cb
>   net/sched: act_mirred: refactor the handle of xmit
>   net/sched: sch_frag: add generic packet fragment support.
>   ipv6: add ipv6_fragment hook in ipv6_stub
> 
>  include/linux/skbuff.h    |   1 +
>  include/net/act_api.h     |   6 ++
>  include/net/ipv6_stubs.h  |   2 +
>  include/net/sch_generic.h |   8 +--
>  net/core/dev.c            |   2 +
>  net/ipv6/addrconf_core.c  |   8 +++
>  net/ipv6/af_inet6.c       |   1 +
>  net/openvswitch/flow.c    |   1 +
>  net/sched/Makefile        |   1 +
>  net/sched/act_api.c       |  16 +++++
>  net/sched/act_ct.c        |  33 +++++++---
>  net/sched/act_mirred.c    |  21 +++++--
>  net/sched/cls_api.c       |   1 +
>  net/sched/sch_frag.c      | 150 ++++++++++++++++++++++++++++++++++++++++++++++
>  14 files changed, 233 insertions(+), 18 deletions(-)
>  create mode 100644 net/sched/sch_frag.c
> 
> -- 
> 1.8.3.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team