⚠️

سلب مسئولیت و اخلاق حرفه‌ای

این مطالب صرفاً برای اهداف آموزشی، پژوهشی و افزایش آگاهی امنیتی ارائه شده‌اند. هرگونه استفاده غیرمجاز، غیرقانونی یا سوءاستفاده از اطلاعات، ابزارها و روش‌های مطرح‌شده، کاملاً بر عهده مخاطب است. نویسنده و منتشرکننده هیچ مسئولیتی در قبال خسارات، آسیب‌ها یا پیامدهای ناشی از استفاده نادرست از این مطالب نخواهند داشت.

CVE-2026-143361: Linux Kernel BPF/cgroup SKB Offset Wraparound | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-143361: Linux Kernel BPF/cgroup SKB Offset Wraparound

Executive summary

CVE-2026-143361 affects the Linux kernel’s BPF cgroup packet-filtering path. The vulnerability results from a sign and type mismatch while __cgroup_bpf_run_filter_skb() positions packet data at the network header for a cgroup_skb BPF program.

In affected execution paths, skb->data may already point before the network header. Because the relevant network offset is handled as an unsigned int, negating and applying the offset can wrap around. On a 64-bit kernel, the result can place skb->data far below skb->head even though the packet length appears consistent.

The NVD record identifies ip6mr_cache_report() and bpf_lwt_xmit_reroute() as paths that can supply such packets. The described impact is a kernel fault or a read of unrelated memory. The available record does not state which Linux versions contain the defect or received the fix, and it contains no evidence of active exploitation.

Affected systems

The supplied advisory does not enumerate vulnerable or patched kernel versions. Systems are candidates for exposure when all of the following conditions are present:

  • A cgroup_skb BPF program is attached to a relevant cgroup or network hook.

  • Packet processing reaches ip6mr_cache_report() or bpf_lwt_xmit_reroute().

  • The affected sk_buff has skb->data positioned before its network header.

This combination may occur in hosts using cgroup-attached networking filters, including some container, Kubernetes, service-mesh, and traffic-observation deployments. Their presence alone does not confirm that a host is vulnerable; the required packet-processing path must also be reached.

Because the NVD record does not list affected version ranges, no statement can be made from the supplied context that a particular Linux release is affected or fixed. Distributor advisories, stable-kernel backports, and upstream history are required to establish that information.

Technical details

cgroup_skb programs expect packet data to be presented from the network header. Before executing such a program, __cgroup_bpf_run_filter_skb() adjusts skb->data to establish that view.

The vulnerable logic obtains skb_network_offset(skb) as an unsigned int and negates it before adjusting skb->data. That calculation assumes the network header is not after the current data pointer. The assumption does not hold for packets supplied through ip6mr_cache_report() or bpf_lwt_xmit_reroute().

When the network header follows skb->data, unsigned negation wraps the calculated offset. On a 64-bit kernel, applying that value can move skb->data to an address far below skb->head. The 32-bit skb->len value may wrap into what appears to be the correct length, concealing the invalid pointer state.

A subsequent packet-data read may then fault or return memory unrelated to the intended socket buffer. The supplied advisory describes a read-oriented failure and does not establish an arbitrary-write primitive, control-flow hijack, or deterministic information-disclosure method.

The resolution keeps the network offset signed. It pulls skb->data toward the network header when the header is after the current pointer and retains the previous push behavior for the opposite case. This removes the unsigned wraparound condition.

Exploitability assessment

Real-world exploitability appears conditional. An attacker needs traffic capable of reaching one of the named packet paths while the target runs an attached cgroup_skb program and produces the specific socket-buffer layout. Local privilege may also be relevant where attaching the required BPF program is itself attacker-controlled, although some deployments may already have such programs installed for legitimate policy or observability.

No CVSS score or vector is present in the supplied material. The CVE is not listed in the CISA Known Exploited Vulnerabilities catalog in the supplied assessment, and no public exploit or observed exploitation is cited. These factors support a low-severity assessment rather than treating the issue as an active, broadly exploited kernel vulnerability.

Mitigation

Apply the upstream Linux kernel correction that retains the network offset as a signed int and pulls skb->data when the network header is after it. The supplied context does not provide a commit hash or patched version list, so the applicable stable and long-term-support backports must be confirmed through the relevant Linux distribution or upstream release documentation.

Where an immediate kernel update is unavailable:

  • Restrict or remove cgroup_skb BPF attachments from cgroups that may process the affected traffic classes.

  • Disable or restrict IPv6 multicast routing when it is not required, reducing exposure to the ip6mr_cache_report() path.

  • Review LWT BPF configurations that can route traffic through bpf_lwt_xmit_reroute().

  • Correlate kernel logs for faults involving __cgroup_bpf_run_filter_skb(), BPF cgroup filter execution, or anomalous skb->data pointer states with IPv6 multicast and LWT traffic.

These measures reduce exposure but do not substitute for the kernel correction.

Expert insight

The key security significance is not the arithmetic defect in isolation but the pointer-validation failure it creates. A packet buffer length can remain internally plausible while skb->data refers to an unrelated kernel address, making the resulting access difficult to recognize through simple length checks. The fix’s use of signed arithmetic also illustrates why network offsets should preserve direction rather than encode it through unsigned negation.

At the same time, the available evidence supports measured risk. The issue requires a specific BPF attachment and packet path, and the record describes a conditional read fault or disclosure rather than a demonstrated write primitive. Until a CVSS assessment or exploit chain becomes available, CVE-2026-143361 is best treated as a low-severity kernel memory-safety issue with potentially greater operational importance in widely instrumented BPF environments.

منابع

·
← اخبار