Linux: seg6: set IPSKB_L3SLAVE from IP6SKB_L3SLAVE on IPIP decapsulation
What fixes it
- 1d9f5c78903dd25a3556229eb716dd465c5f3573LinuxCVE List
- 72f410616000d21a0a6ec6c93a60301b9c92e95cLinuxCVE List
- 5130afa025c95faa621adf8bac525baeb2b290d2LinuxCVE List
- 8c16e1ccc082a3763dfc6bc2d3f658c1a6336f9dLinuxCVE List
- 7616242a2b37883f7322aaa1d2bd6cd0fed28315LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
seg6: set IPSKB_L3SLAVE from IP6SKB_L3SLAVE on IPIP decapsulation
When an SRv6 packet arrives on an interface enslaved to a VRF, vrf_ip6_rcv() sets IP6SKB_L3SLAVE in IP6CB, but decap_and_validate() has never set IPSKB_L3SLAVE in IPCB. The bit stayed clear in the common case, and with CONFIG_IPV6_MIP6 the leftover frag_max_size of a reassembled outer packet could even set it, with no VRF involved. Commit 44930446dde4 ("ipv6: seg6: clear IPv4 control block on IPIP decapsulation") then made the unreliable bit reliably clear.
The effect of the missing flag is visible with End.DX4 when a delivery to a local address of the node reaches the socket lookup. For example, a UDP socket bound to the enslaved ingress interface does not receive any of the decapsulated packets, while an unbound socket outside the VRF does. This contradicts Documentation/networking/vrf.rst: by default the scope of an unbound UDP or TCP socket is limited to the default VRF.
Set IPSKB_L3SLAVE for IPv4 in decap_and_validate(), which already does the same for IPv6. The socket lookup then matches the decapsulated packet like any other packet received on that enslaved interface. Such a packet matches an unbound UDP or TCP socket only when udp_l3mdev_accept or tcp_l3mdev_accept is set.
Text from CVE List
Affected versions 18
- Linuxaffected: 891ef8dd2a8d14e4e73a81dcdb135b574c57f556 before 1d9f5c78903dd25a3556229eb716dd465c5f3573CVE List
- Linuxaffected: 891ef8dd2a8d14e4e73a81dcdb135b574c57f556 before 72f410616000d21a0a6ec6c93a60301b9c92e95cCVE List
- Linuxaffected: 891ef8dd2a8d14e4e73a81dcdb135b574c57f556 before e4d7c52f15f572608374947c6c802052e1a2fc82CVE List
- Linuxaffected: 891ef8dd2a8d14e4e73a81dcdb135b574c57f556 before 5130afa025c95faa621adf8bac525baeb2b290d2CVE List
- Linuxaffected: 891ef8dd2a8d14e4e73a81dcdb135b574c57f556 before f8fb4738ccef5f9d107845b05734a56352747b1aCVE List
- Linuxaffected: 891ef8dd2a8d14e4e73a81dcdb135b574c57f556 before ddf60220c925b54a1714c4722fdbdb12833232d0CVE List
- Linuxaffected: 891ef8dd2a8d14e4e73a81dcdb135b574c57f556 before 8c16e1ccc082a3763dfc6bc2d3f658c1a6336f9dCVE List
- Linuxaffected: 891ef8dd2a8d14e4e73a81dcdb135b574c57f556 before 7616242a2b37883f7322aaa1d2bd6cd0fed28315CVE List
- Linuxaffected: 4.14CVE List
- Linuxunaffected: all versions before 4.14CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.112 through 6.12.*CVE List
- Linuxunaffected: 6.18.54 through 6.18.*CVE List
- Linuxunaffected: 7.2.8 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 8
- git.kernel.org/stable/c/1d9f5c78903dd25a3556229eb716dd465c5f3573Referencevia CVE List
- git.kernel.org/stable/c/72f410616000d21a0a6ec6c93a60301b9c92e95cReferencevia CVE List
- git.kernel.org/stable/c/e4d7c52f15f572608374947c6c802052e1a2fc82Referencevia CVE List
- git.kernel.org/stable/c/5130afa025c95faa621adf8bac525baeb2b290d2Referencevia CVE List
- git.kernel.org/stable/c/f8fb4738ccef5f9d107845b05734a56352747b1aReferencevia CVE List
- git.kernel.org/stable/c/ddf60220c925b54a1714c4722fdbdb12833232d0Referencevia CVE List
- git.kernel.org/stable/c/8c16e1ccc082a3763dfc6bc2d3f658c1a6336f9dReferencevia CVE List
- git.kernel.org/stable/c/7616242a2b37883f7322aaa1d2bd6cd0fed28315Referencevia CVE List