nsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment().
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c411ed854584a71b0e86ac3019b60e4789d88086 · < 696d18bb59727a2e0526c0802a812620be1c9340| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment().
syzbot triggered various splats (see [0] and links) by a crafted GSO packet of VIRTIO_NET_HDR_GSO_UDP layering the following protocols:
ETH_P_8021AD + ETH_P_NSH + ETH_P_IPV6 + IPPROTO_UDP
NSH can encapsulate IPv4, IPv6, Ethernet, NSH, and MPLS. As the inner protocol can be Ethernet, NSH GSO handler, nsh_gso_segment(), calls skb_mac_gso_segment() to invoke inner protocol GSO handlers.
nsh_gso_segment() does the following for the original skb before calling skb_mac_gso_segment()
1. reset skb->network_header 2. save the original skb->{mac_heaeder,mac_len} in a local variable 3. pull the NSH header 4. resets skb->mac_header 5. set up skb->mac_len and skb->protocol for the inner protocol.
and does the following for the segmented skb
From the CVE record · Linux
The Linux kernel's NSH GSO segmentation handler does not correctly restore outer packet headers after segmentation. A crafted GSO packet can trigger kernel error reports; the input does not specify whether an attacker needs network or local access, authentication, or user interaction.
Engineers running Linux kernels with NSH GSO support should check their installations; affected versions are not specified.