Description
In the Linux kernel, the following vulnerability has been resolved:

fou: reject omitted FOU_ATTR_IPPROTO on FOU_ENCAP_DIRECT

Commit 7a9bc9e3f423 ("fou: Don't allow 0 for FOU_ATTR_IPPROTO.") added
NLA_POLICY_MIN(NLA_U8, 1) to fou_nl_policy[FOU_ATTR_IPPROTO], which
rejects an explicitly supplied FOU_ATTR_IPPROTO == 0 attribute with
-ERANGE.

However, FOU_ATTR_IPPROTO is an optional netlink attribute. When a user
sends FOU_CMD_ADD with FOU_ATTR_TYPE set to FOU_ENCAP_DIRECT and omits
FOU_ATTR_IPPROTO entirely, nla_policy validation succeeds and
parse_nl_config() leaves cfg->protocol as 0 (from memset(cfg, 0,
sizeof(*cfg))). fou_create() then creates a FOU_ENCAP_DIRECT socket with
fou->protocol == 0.

In fou_udp_recv(), returning -fou->protocol to udp_queue_rcv_one_skb()
triggers IP protocol resubmission when fou->protocol > 0, whereas
returning 0 tells the UDP tunnel layer that the skb was consumed without
freeing it. When fou->protocol == 0, every packet received on the socket
returns 0 from fou_udp_recv() and leaks the sk_buff.

Reject FOU_ENCAP_DIRECT when !cfg->protocol in fou_create() so that
creating a direct encapsulation port without FOU_ATTR_IPPROTO fails with
-EINVAL while leaving FOU_CMD_DEL and FOU_CMD_GET (which share
parse_nl_config()) unaffected.

Tested in QEMU against Linux 7.3.0-rc3 by sending a FOU_CMD_ADD Generic
Netlink request with FOU_ATTR_PORT = 5555 and FOU_ATTR_TYPE =
FOU_ENCAP_DIRECT while omitting FOU_ATTR_IPPROTO. On the unfixed kernel,
FOU_CMD_ADD succeeds (err = 0), FOU_CMD_GET reports fou->type = 1 and
fou->protocol = 0, and sending 4000 UDP packets to 127.0.0.1:5555 leaks
all 4000 sk_buffs (SUnreclaim in /proc/meminfo grows from 41456 kB to
59008 kB, +17552 kB); with this patch applied, FOU_CMD_ADD is rejected
with -EINVAL (-22).
Published: 2026-10-18
Score: n/a
EPSS: n/a
KEV: No
Impact: Memory Leak leading to Kernel Resource Exhaustion
Action: Patch Kernel
AI Analysis

Impact

The vulnerability exists in the Linux kernel’s FOU (Forwarding/Outbound) subsystem. When a user issues a FOU_CMD_ADD with FOU_ENCAP_DIRECT and omits the optional FOU_ATTR_IPPROTO, the kernel fails to detect the missing attribute. The configuration structure is zeroed, leaving cfg->protocol as zero. During packet handling, this zero protocol causes each received packet to leak its sk_buff, as the skb is not freed. The leak accumulates until kernel memory is exhausted, resulting in a denial of service. The weakness can be classified as a resource leak (CWE‑399).

Affected Systems

All Linux kernel builds that do not include the patch introduced in commit 7a9bc9e3f423 are vulnerable. Vulnerable kernel versions include the 7.3.0‑rc3 and earlier releases that support the FOU_ENCAP_DIRECT feature. Any system that creates a FOU_ENCAP_DIRECT socket without specifying an IP protocol – for example, through netlink configuration or user‑space tools that wrap the netlink commands – is at risk. This applies to distributions that ship the affected kernel series and to environments running custom kernels that have not been backported.

Risk and Exploitability

The exploit requires the ability to send netlink commands to the kernel, which typically means the attacker must have CAP_NET_ADMIN or be a privileged user on the host. The exploitation surface is the public netlink interface to the FOU subsystem. An attacker can repeatedly create a FOU_ENCAP_DIRECT socket without providing the IPPROTO attribute, causing predictable memory leaks. Without a kernel patch, the attacker can exhaust kernel memory and trigger a denial of service. The EPSS value is not available and the vulnerability is not listed in CISA KEV, but the severity is moderate to high for local privileged users. The primary attack vector is local privileged netlink.

Generated by OpenCVE AI on October 18, 2026 at 17:21 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Install a kernel version that includes commit 7a9bc9e3f423 or later, ensuring the FOU_ENCAP_DIRECT attribute validation is active. For example, update to the latest stable release from the distribution’s repository or compile a patched kernel from upstream source.
  • If an immediate kernel upgrade is not possible, restrict the netlink interface that configures FOU sockets by removing CAP_NET_ADMIN from untrusted accounts and using Linux kernel capabilities or security modules such as SELinux/AppArmor to limit FOU configuration to trusted processes only.
  • Monitor kernel memory usage (e.g., watching /proc/meminfo SUnreclaim) for unexpected growth, and be prepared to reboot the system if memory exhaustion is detected, until a kernel patch can be applied.

Generated by OpenCVE AI on October 18, 2026 at 17:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 18 Oct 2026 17:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-399

Sun, 18 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: fou: reject omitted FOU_ATTR_IPPROTO on FOU_ENCAP_DIRECT Commit 7a9bc9e3f423 ("fou: Don't allow 0 for FOU_ATTR_IPPROTO.") added NLA_POLICY_MIN(NLA_U8, 1) to fou_nl_policy[FOU_ATTR_IPPROTO], which rejects an explicitly supplied FOU_ATTR_IPPROTO == 0 attribute with -ERANGE. However, FOU_ATTR_IPPROTO is an optional netlink attribute. When a user sends FOU_CMD_ADD with FOU_ATTR_TYPE set to FOU_ENCAP_DIRECT and omits FOU_ATTR_IPPROTO entirely, nla_policy validation succeeds and parse_nl_config() leaves cfg->protocol as 0 (from memset(cfg, 0, sizeof(*cfg))). fou_create() then creates a FOU_ENCAP_DIRECT socket with fou->protocol == 0. In fou_udp_recv(), returning -fou->protocol to udp_queue_rcv_one_skb() triggers IP protocol resubmission when fou->protocol > 0, whereas returning 0 tells the UDP tunnel layer that the skb was consumed without freeing it. When fou->protocol == 0, every packet received on the socket returns 0 from fou_udp_recv() and leaks the sk_buff. Reject FOU_ENCAP_DIRECT when !cfg->protocol in fou_create() so that creating a direct encapsulation port without FOU_ATTR_IPPROTO fails with -EINVAL while leaving FOU_CMD_DEL and FOU_CMD_GET (which share parse_nl_config()) unaffected. Tested in QEMU against Linux 7.3.0-rc3 by sending a FOU_CMD_ADD Generic Netlink request with FOU_ATTR_PORT = 5555 and FOU_ATTR_TYPE = FOU_ENCAP_DIRECT while omitting FOU_ATTR_IPPROTO. On the unfixed kernel, FOU_CMD_ADD succeeds (err = 0), FOU_CMD_GET reports fou->type = 1 and fou->protocol = 0, and sending 4000 UDP packets to 127.0.0.1:5555 leaks all 4000 sk_buffs (SUnreclaim in /proc/meminfo grows from 41456 kB to 59008 kB, +17552 kB); with this patch applied, FOU_CMD_ADD is rejected with -EINVAL (-22).
Title fou: reject omitted FOU_ATTR_IPPROTO on FOU_ENCAP_DIRECT
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-18T15:18:09.190Z

Reserved: 2026-09-25T10:25:14.356Z

Link: CVE-2026-98541

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-18T16:17:05.967

Modified: 2026-10-18T16:17:05.967

Link: CVE-2026-98541

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-18T17:30:16Z

Weaknesses