Release Date: | 2024-05-30 |
In the Linux kernel, the following vulnerability has been resolved:\nnsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment().\nsyzbot triggered various splats (see [0] and links) by a crafted GSO\npacket of VIRTIO_NET_HDR_GSO_UDP layering the following protocols:\nETH_P_8021AD + ETH_P_NSH + ETH_P_IPV6 + IPPROTO_UDP\nNSH can encapsulate IPv4, IPv6, Ethernet, NSH, and MPLS. As the inner\nprotocol can be Ethernet, NSH GSO handler, nsh_gso_segment(), calls\nskb_mac_gso_segment() to invoke inner protocol GSO handlers.\nnsh_gso_segment() does the following for the original skb before\ncalling skb_mac_gso_segment()\n1. reset skb->network_header\n2. save the original skb->{mac_heaeder,mac_len} in a local variable\n3. pull the NSH header\n4. resets skb->mac_header\n5. set up skb->mac_len and skb->protocol for the inner protocol.\nand does the following for the segmented skb\n6. set ntohs(ETH_P_NSH) to skb->protocol\n7. push the NSH header\n8. restore skb->mac_header\n9. set skb->mac_header + mac_len to skb->network_header\n10. restore skb->mac_len\nThere are two problems in 6-7 and 8-9.\n(a)\nAfter 6 & 7, skb->data points to the NSH header, so the outer header\n(ETH_P_8021AD in this case) is stripped when skb is sent out of netdev.\nAlso, if NSH is encapsulated by NSH + Ethernet (so NSH-Ethernet-NSH),\nskb_pull() in the first nsh_gso_segment() will make skb->data point\nto the middle of the outer NSH or Ethernet header because the Ethernet\nheader is not pulled by the second nsh_gso_segment().\n(b)\nWhile restoring skb->{mac_header,network_header} in 8 & 9,\nnsh_gso_segment() does not assume that the data in the linear\nbuffer is shifted.\nHowever, udp6_ufo_fragment() could shift the data and change\nskb->mac_header accordingly as demonstrated by syzbot.\nIf this happens, even the restored skb->mac_header points to\nthe middle of the outer header.\nIt seems nsh_gso_segment() has never worked with outer headers so far.\nAt the end of nsh_gso_segment(), the outer header must be restored for\nthe segmented skb, instead of the NSH header.\nTo do that, let's calculate the outer header position relatively from\nthe inner header and set skb->{data,mac_header,protocol} properly.\n[0]:\nBUG: KMSAN: uninit-value in ipvlan_process_outbound drivers/net/ipvlan/ipvlan_core.c:524 [inline]\nBUG: KMSAN: uninit-value in ipvlan_xmit_mode_l3 drivers/net/ipvlan/ipvlan_core.c:602 [inline]\nBUG: KMSAN: uninit-value in ipvlan_queue_xmit+0xf44/0x16b0 drivers/net/ipvlan/ipvlan_core.c:668\nipvlan_process_outbound drivers/net/ipvlan/ipvlan_core.c:524 [inline]\nipvlan_xmit_mode_l3 drivers/net/ipvlan/ipvlan_core.c:602 [inline]\nipvlan_queue_xmit+0xf44/0x16b0 drivers/net/ipvlan/ipvlan_core.c:668\nipvlan_start_xmit+0x5c/0x1a0 drivers/net/ipvlan/ipvlan_main.c:222\n__netdev_start_xmit include/linux/netdevice.h:4989 [inline]\nnetdev_start_xmit include/linux/netdevice.h:5003 [inline]\nxmit_one net/core/dev.c:3547 [inline]\ndev_hard_start_xmit+0x244/0xa10 net/core/dev.c:3563\n__dev_queue_xmit+0x33ed/0x51c0 net/core/dev.c:4351\ndev_queue_xmit include/linux/netdevice.h:3171 [inline]\npacket_xmit+0x9c/0x6b0 net/packet/af_packet.c:276\npacket_snd net/packet/af_packet.c:3081 [inline]\npacket_sendmsg+0x8aef/0x9f10 net/packet/af_packet.c:3113\nsock_sendmsg_nosec net/socket.c:730 [inline]\n__sock_sendmsg net/socket.c:745 [inline]\n__sys_sendto+0x735/0xa10 net/socket.c:2191\n__do_sys_sendto net/socket.c:2203 [inline]\n__se_sys_sendto net/socket.c:2199 [inline]\n__x64_sys_sendto+0x125/0x1c0 net/socket.c:2199\ndo_syscall_x64 arch/x86/entry/common.c:52 [inline]\ndo_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83\nentry_SYSCALL_64_after_hwframe+0x63/0x6b\nUninit was created at:\nslab_post_alloc_hook mm/slub.c:3819 [inline]\nslab_alloc_node mm/slub.c:3860 [inline]\n__do_kmalloc_node mm/slub.c:3980 [inline]\n__kmalloc_node_track_caller+0x705/0x1000 mm/slub.c:4001\nkmalloc_reserve+0x249/0x4a0 net/core/skbuff.c:582\n__\n---truncated---
See more information about CVE-2024-36933 from MITRE CVE dictionary and NIST NVD
NOTE: The following CVSS v3.1 metrics and score provided are preliminary and subject to review.
Base Score: | 5.9 | CVSS Vector: | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H |
Attack Vector: | Network | Attack Complexity: | High |
Privileges Required: | Low | User Interaction: | None |
Scope: | Unchanged | Confidentiality Impact: | None |
Integrity Impact: | Low | Availability Impact: | High |
Platform | Errata | Release Date |
Oracle Linux version 8 (kernel) | ELSA-2024-5101 | 2024-08-08 |
Oracle Linux version 9 (kernel) | ELSA-2024-9315 | 2024-11-14 |
This page is generated automatically and has not been checked for errors or omissions. For clarification or corrections: