CVE-2022-49340: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: ip_gre: test csum_start instead of transport header GRE with TUNNEL_CSUM will apply local checksum offload on CHECKSUM_PARTIAL packets. ipgre_xmit must validate csum_start after an optional skb_pull, else lco_csum may trigger an overflow. The original check was if (csum && skb_checksum_start(skb) < skb->data) return -EINVAL; This had false positives when skb_checksum_start is undefined: when ip_summed is not CHECKSUM_PARTIAL. A discussed refinement was straightforward if (csum && skb->ip_summed == CHECKSUM_PARTIAL && skb_checksum_start(skb) < skb->data) return -EINVAL; But was eventually revised more thoroughly: - restrict the check to the only branch where needed, in an uncommon GRE path that uses header_ops and calls skb_pull. - test skb_transport_header, which is set along with csum_start in skb_partial_csum_set in the normal header_ops datapath. Turns out skbs can arrive in this branch without the transport header set, e.g., through BPF redirection. Revise the check back to check csum_start directly, and only if CHECKSUM_PARTIAL. Do leave the check in the updated location. Check field regardless of whether TUNNEL_CSUM is configured.
AI Analysis
Technical Summary
CVE-2022-49340 is a vulnerability found in the Linux kernel's GRE (Generic Routing Encapsulation) implementation, specifically related to checksum validation in the ip_gre module. GRE is a tunneling protocol used to encapsulate packets for routing over IP networks. The vulnerability arises from improper validation of the checksum start offset (csum_start) in packets that use the TUNNEL_CSUM feature with CHECKSUM_PARTIAL packets. The ipgre_xmit function, responsible for transmitting GRE packets, must validate the checksum start offset after an optional skb_pull operation on the socket buffer (skb). Previously, the validation logic incorrectly checked the checksum start offset against the transport header, leading to false positives or missed invalid packets, especially when skb_checksum_start was undefined or when packets arrived via uncommon paths such as BPF (Berkeley Packet Filter) redirection without the transport header set. This improper validation could trigger an overflow condition in the local checksum offload (lco_csum) processing. The fix involved refining the validation logic to restrict the check to the relevant code branch and to verify the checksum start offset directly only when the packet's ip_summed field is CHECKSUM_PARTIAL, regardless of whether TUNNEL_CSUM is configured. This ensures that malformed or malicious packets with invalid checksum offsets are correctly rejected, preventing potential kernel memory corruption or crashes. The vulnerability affects multiple Linux kernel versions identified by specific commit hashes and was publicly disclosed on February 26, 2025. No known exploits in the wild have been reported to date.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions with GRE tunneling enabled, especially in environments leveraging advanced networking features such as VPNs, cloud infrastructure, or container orchestration platforms that use GRE tunnels for network overlay. Exploitation could lead to kernel memory corruption, potentially resulting in denial of service (system crashes) or privilege escalation if an attacker crafts malicious GRE packets with invalid checksum offsets. This could disrupt critical network services, impact availability, and compromise system integrity. Given the widespread use of Linux in European data centers, telecommunications infrastructure, and enterprise environments, the vulnerability could affect a broad range of sectors including finance, government, healthcare, and industrial control systems. The absence of known exploits reduces immediate risk, but the complexity of the vulnerability and its presence in core kernel networking code warrant prompt attention to prevent future exploitation attempts.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to versions that include the patch for CVE-2022-49340. Since the vulnerability involves low-level kernel networking code, applying vendor-supplied kernel updates or recompiling kernels with the fix is essential. Network administrators should audit GRE tunnel usage and disable GRE tunneling or TUNNEL_CSUM features where not strictly necessary to reduce the attack surface. Implementing network-level filtering to block or scrutinize GRE packets from untrusted sources can help mitigate risk. Additionally, monitoring kernel logs and network traffic for anomalies related to GRE packets or checksum errors may provide early detection of exploitation attempts. For environments using BPF programs that redirect packets, review and validate BPF configurations to ensure they do not inadvertently expose the vulnerable code path. Finally, incorporate this vulnerability into vulnerability management and incident response plans to ensure timely detection and remediation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland, Belgium
CVE-2022-49340: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: ip_gre: test csum_start instead of transport header GRE with TUNNEL_CSUM will apply local checksum offload on CHECKSUM_PARTIAL packets. ipgre_xmit must validate csum_start after an optional skb_pull, else lco_csum may trigger an overflow. The original check was if (csum && skb_checksum_start(skb) < skb->data) return -EINVAL; This had false positives when skb_checksum_start is undefined: when ip_summed is not CHECKSUM_PARTIAL. A discussed refinement was straightforward if (csum && skb->ip_summed == CHECKSUM_PARTIAL && skb_checksum_start(skb) < skb->data) return -EINVAL; But was eventually revised more thoroughly: - restrict the check to the only branch where needed, in an uncommon GRE path that uses header_ops and calls skb_pull. - test skb_transport_header, which is set along with csum_start in skb_partial_csum_set in the normal header_ops datapath. Turns out skbs can arrive in this branch without the transport header set, e.g., through BPF redirection. Revise the check back to check csum_start directly, and only if CHECKSUM_PARTIAL. Do leave the check in the updated location. Check field regardless of whether TUNNEL_CSUM is configured.
AI-Powered Analysis
Technical Analysis
CVE-2022-49340 is a vulnerability found in the Linux kernel's GRE (Generic Routing Encapsulation) implementation, specifically related to checksum validation in the ip_gre module. GRE is a tunneling protocol used to encapsulate packets for routing over IP networks. The vulnerability arises from improper validation of the checksum start offset (csum_start) in packets that use the TUNNEL_CSUM feature with CHECKSUM_PARTIAL packets. The ipgre_xmit function, responsible for transmitting GRE packets, must validate the checksum start offset after an optional skb_pull operation on the socket buffer (skb). Previously, the validation logic incorrectly checked the checksum start offset against the transport header, leading to false positives or missed invalid packets, especially when skb_checksum_start was undefined or when packets arrived via uncommon paths such as BPF (Berkeley Packet Filter) redirection without the transport header set. This improper validation could trigger an overflow condition in the local checksum offload (lco_csum) processing. The fix involved refining the validation logic to restrict the check to the relevant code branch and to verify the checksum start offset directly only when the packet's ip_summed field is CHECKSUM_PARTIAL, regardless of whether TUNNEL_CSUM is configured. This ensures that malformed or malicious packets with invalid checksum offsets are correctly rejected, preventing potential kernel memory corruption or crashes. The vulnerability affects multiple Linux kernel versions identified by specific commit hashes and was publicly disclosed on February 26, 2025. No known exploits in the wild have been reported to date.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions with GRE tunneling enabled, especially in environments leveraging advanced networking features such as VPNs, cloud infrastructure, or container orchestration platforms that use GRE tunnels for network overlay. Exploitation could lead to kernel memory corruption, potentially resulting in denial of service (system crashes) or privilege escalation if an attacker crafts malicious GRE packets with invalid checksum offsets. This could disrupt critical network services, impact availability, and compromise system integrity. Given the widespread use of Linux in European data centers, telecommunications infrastructure, and enterprise environments, the vulnerability could affect a broad range of sectors including finance, government, healthcare, and industrial control systems. The absence of known exploits reduces immediate risk, but the complexity of the vulnerability and its presence in core kernel networking code warrant prompt attention to prevent future exploitation attempts.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to versions that include the patch for CVE-2022-49340. Since the vulnerability involves low-level kernel networking code, applying vendor-supplied kernel updates or recompiling kernels with the fix is essential. Network administrators should audit GRE tunnel usage and disable GRE tunneling or TUNNEL_CSUM features where not strictly necessary to reduce the attack surface. Implementing network-level filtering to block or scrutinize GRE packets from untrusted sources can help mitigate risk. Additionally, monitoring kernel logs and network traffic for anomalies related to GRE packets or checksum errors may provide early detection of exploitation attempts. For environments using BPF programs that redirect packets, review and validate BPF configurations to ensure they do not inadvertently expose the vulnerable code path. Finally, incorporate this vulnerability into vulnerability management and incident response plans to ensure timely detection and remediation.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2025-02-26T02:08:31.541Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9820c4522896dcbdd63f
Added to database: 5/21/2025, 9:08:48 AM
Last enriched: 6/28/2025, 12:39:34 AM
Last updated: 8/11/2025, 9:56:31 PM
Views: 9
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.