⚠️

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

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

CVE-2026-143394: Linux kernel xfrm replay notifications leak uninitialised stack data to netlink listeners | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-143394: Linux kernel xfrm replay notifications leak uninitialised stack data to netlink listeners

What CVE-2026-143394 covers

CVE-2026-143394 addresses an incomplete initialisation defect in the Linux kernel's XFRM (IPsec) subsystem. The vulnerability is confined to the anti-replay notification path, where the kernel itself originates messages announcing replay events to userspace.

Three functions are involved:

  • xfrm_replay_notify()

  • xfrm_replay_notify_bmp()

  • xfrm_replay_notify_esn()

Each of them allocates a struct km_event on the stack and assigns only the .event and .data.aevent fields. The .seq and .portid members are left in whatever state the stack frame happened to hold.

Root cause

The uninitialised members are not cosmetic. build_aevent() later constructs an XFRM_MSG_NEWAE netlink message and populates the message header with:

nlmsg_put(skb, c->portid, c->seq, ...)

Because neither field was ever assigned on the replay path, the outgoing netlink header carries two undefined 32-bit values drawn from the kernel stack.

The contrast with the request-driven paths makes the asymmetry clear. xfrm_get_ae() and xfrm_new_ae() populate .seq and .portid from the requesting user, so their outgoing messages always carry defined values. Only the kernel-originated replay path — where no requester exists — leaves the fields unset, and zero is the semantically correct value for a kernel-generated notification.

Who can observe the leak

The affected output is the netlink XFRM_MSG_NEWAE notification stream. Any userspace process able to subscribe to xfrm netlink notifications receives the kernel-originated anti-replay events and can read the four bytes of .seq plus four bytes of .portid per delivered message.

Notably, the disclosure is bounded and noisy:

  • The content is whatever previously occupied those stack slots, not attacker-controlled input.

  • The leaked fields are netlink header integers, not pointer-sized values from the message payload, which limits their usefulness as a direct kernel-ASLR bypass.

  • The listener already needs privilege to receive these messages (typically CAP_NET_ADMIN or equivalent netlink socket policy), so the flaw discloses data rather than escalating authority.

The defect is also configuration-dependent: it only becomes observable where IPsec security associations use anti-replay detection (esn, bmp, or a classic replay window), the kernel actually reports a replay event, and a listener is subscribed to the xfrm netlink group.

Fix approach

The upstream resolution zero-initialises the event structure so the header fields are explicitly defined as 0 for kernel-originated notifications — equivalent to declaring struct km_event ev = { }; (or a full memset) in each of the three replay-notify functions.

The fix has been picked into multiple maintained stable trees, with six commits referenced for the affected branches:

  • https://git.kernel.org/stable/c/58c474af3879aab539ac179dd3e891827cb482d4

  • https://git.kernel.org/stable/c/5e14088d45ca7a07d6be4912f8f7a0635d4a3fc7

  • https://git.kernel.org/stable/c/62edd883dc8b8da74b1acebab45e4895b03a1c94

  • https://git.kernel.org/stable/c/8cf8f488ebaac6a3324f26bd2d6badec2c93faa3

  • https://git.kernel.org/stable/c/9b2a11a479514b977ac8902603cc7e956188d0cd

  • https://git.kernel.org/stable/c/e35a12dffd5da67b6ca12bd23eebdd0570592205

Affected systems

  • Product: Linux kernel (Vendor: Linux, Product: linux_kernel), XFRM/IPsec subsystem.

  • Components: xfrm_replay_notify(), xfrm_replay_notify_bmp(), xfrm_replay_notify_esn() in the kernel xfrm replay-notification code.

  • Versions: the provided context does not enumerate specific affected or fixed version ranges, and the cvefeed.io product table states that known affected versions are not represented. Because the fix was committed into several stable branches, the defect's reach extends across maintained kernel lines. Exact version boundaries should be treated as unknown and confirmed against the six referenced commits and distribution advisories.

  • Exposure prerequisites: IPsec SAs with anti-replay detection enabled, a replay event reported by the kernel, and a local userspace subscriber on the xfrm netlink group.

  • Vendor reference: an MSRC update-guide entry exists for this CVE (https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-143394), though its contents were not supplied here.

Mitigation

  • Apply the upstream fix corresponding to the running kernel branch using one of the six referenced stable commits, or install the vendor/distribution kernel package that carries it.

  • Until a patched kernel is deployed, restrict which principals may open xfrm netlink sockets and receive XFRM_MSG_NEWAE notifications — for example through netlink socket policy, AppArmor/SELinux rules, or equivalent kernel-level confinement of userspace that subscribes to the xfrm netlink group.

  • On IPsec hosts, compare the running kernel build against the referenced commits (uname -r, git describe) and inventory which local processes subscribe to xfrm netlink groups.

  • Track the CVE in the standard advisory feeds — MSRC update-guide (https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-143394), NVD (https://nvd.nist.gov/vuln/detail/CVE-2026-143394), and the cvefeed.io record (https://cvefeed.io/vuln/detail/CVE-2026-143394) — for version detail not present in the current context.

What remains unknown

The context does not state a CVSS vector or base score, specific fixed kernel versions, a CWE classification, or any proof-of-concept or in-the-wild exploitation reference. cvefeed.io lists the CVE as not remotely exploitable, and no public exploit repositories are reported for it.

منابع

·
← اخبار