Linux
sctp: disable BH before calling udp_tunnel_xmit_skb()
In the Linux kernel, the following vulnerability has been resolved: sctp: disable BH before calling udp_tunnel_xmit_skb() udp_tunnel_xmit_skb() / udp_tunnel6_xmit_skb() are expected to run with BH disabled. After commit 6f1a9140ecda ("add xmit recursion limit to tunnel xmit functions"), on the path: udp(6)_tunnel_xmit_skb() -> ip(6)tunnel_xmit() dev_xmit_recursion_inc()/dec() must stay balanced on the same CPU. Without local_bh_disable(), the context may move between CPUs, which can break the inc/dec pairing. This may lead to incorrect recursion level detection and cause packets to be dropped in ip(6)_tunnel_xmit() or __dev_queue_xmit(). Fix it by disabling BH around both IPv4 and IPv6 SCTP UDP xmit paths. In my testing, after enabling the SCTP over UDP: # ip net exec ha sysctl -w net.sctp.udp_port=9899 # ip net exec ha sysctl -w net.sctp.encap_port=9899 # ip net exec hb sysctl -w net.sctp.udp_port=9899 # ip net exec hb sysctl -w net.sctp.encap_port=9899 # ip net exec ha iperf3 -s - without this patch: # ip net exec hb iperf3 -c 192.168.0.1 --sctp [ 5] 0.00-10.00 sec 37.2 MBytes 31.2 Mbits/sec sender [ 5] 0.00-10.00 sec 37.1 MBytes 31.1 Mbits/sec receiver - with this patch: # ip net exec hb iperf3 -c 192.168.0.1 --sctp [ 5] 0.00-10.00 sec 3.14 GBytes 2.69 Gbits/sec sender [ 5] 0.00-10.00 sec 3.14 GBytes 2.69 Gbits/sec receiver
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 046c052b475e7119b6a30e3483e2888fc606a2f8, < e2933f5b3a31b175628985b92895269b778674a1
- >= 046c052b475e7119b6a30e3483e2888fc606a2f8, < 7f0062c40781fe0a340965f5bb0816681982ff4c
- >= 046c052b475e7119b6a30e3483e2888fc606a2f8, < be3bfcb34bda04f6a350710db471d4133f950f2c
- >= 046c052b475e7119b6a30e3483e2888fc606a2f8, < 0de7db2eb27e82b983157016fa604b1ba664ae5f
- >= 046c052b475e7119b6a30e3483e2888fc606a2f8, < 790093245e35040c2adb15f48970020425aa3f47
- >= 046c052b475e7119b6a30e3483e2888fc606a2f8, < 2cd7e6971fc2787408ceef17906ea152791448cf
Fixed in e2933f5b3a31b175628985b92895269b778674a1, 7f0062c40781fe0a340965f5bb0816681982ff4c, be3bfcb34bda04f6a350710db471d4133f950f2c, 0de7db2eb27e82b983157016fa604b1ba664ae5f, 790093245e35040c2adb15f48970020425aa3f47, 2cd7e6971fc2787408ceef17906ea152791448cf
- 5.11
Fixed in 0, 6.1.191, 6.6.160, 6.12.95, 6.18.37, 7.0.10, 7.1
Mitigation
Upgrade Linux to e2933f5b3a31b175628985b92895269b778674a1 or 7f0062c40781fe0a340965f5bb0816681982ff4c or be3bfcb34bda04f6a350710db471d4133f950f2c or 0de7db2eb27e82b983157016fa604b1ba664ae5f or 790093245e35040c2adb15f48970020425aa3f47 or 2cd7e6971fc2787408ceef17906ea152791448cf or later.
Upgrade Linux to 0 or 6.1.191 or 6.6.160 or 6.12.95 or 6.18.37 or 7.0.10 or 7.1 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.