bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2026-64079

5.5medium

linux6.18.60 · 6.18.54 · 6.18.8 · 6.12.21in 4 of 4 releases

Reach linux · 8 builds in 4 of 4 releases

full reviewcross-check✓ a member decided

Description · NVD

netfilter: x_tables: allocate hook ops while under mutex

arp/ip(6)t_register_table() add the table to the per-netns list via xt_register_table() before allocating the per-netns hook ops copy via kmemdup_array(). This leaves a window where the table is visible in the list with ops=NULL.

If the pernet exit happens runs concurrently the pre_exit callback finds the table via xt_find_table() and passes the NULL ops pointer to nf_unregister_net_hooks(), causing a NULL dereference:

  general protection fault in nf_unregister_net_hooks+0xbc/0x150
  RIP: nf_unregister_net_hooks (net/netfilter/core.c:613)
  Call Trace:
    ipt_unregister_table_pre_exit
    iptable_mangle_net_pre_exit
    ops_pre_exit_list
    cleanup_net

Fix by moving the ops allocation into the xtables core so the table is never in the list without valid ops. Also ensure the table is no longer processing packets before its torn down on error unwind. nf_register_net_hooks might have published at least one hook; call synchronize_rcu() if there was an error.

audit log register message gets deferred until all operations have passed, this avoids need to emit another ureg message in case of error unwinding.

Based on earlier patch by Tristan Madani.

Published 2026-07-19NVD

CVSS 3.1Local · low privileges · no user interaction

How it is reached

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None

What it costs

Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

References 5
Review Av26.10.0x86_64Not affected✓ accepted by a member, 2026-11-18 · settles 2 of 8

Fable 5.1 · high confidence · 2026-11-05

The linux 6.18.60 source in this tree already carries the stable backport of "netfilter: x_tables: allocate hook ops while under mutex".

net/netfilter/x_tables.c:xt_register_table() takes a template_ops argument, kmemdup_array()s the hook ops before the table is linked into the per-netns list, assigns table->ops under xt[af].mutex, calls synchronize_rcu() on nf_register_net_hooks() failure and defers audit_log_nfcfg — exactly the fix hunks.

The arp/ip/ip6_tables callers pass template_ops to xt_register_table() and contain no post-registration kmemdup/table->ops assignment, so the ops=NULL window the CVE describes is gone.

NVD's range simply predates this stable release; no Buildroot patch is involved.

Evidence 7

…/ is output/build/linux-6.18.60/

  1. xt_register_table(net, input_table, template_ops, bootstrap, newinfo) allocates ops via kmemdup_array() before the table is added to the list (fixed signature/logic)

    …/net/netfilter/x_tables.c:1488-1510

  2. ops[i].priv set, nf_register_net_hooks() called, synchronize_rcu() on error, table->ops assigned and audit log emitted all before list_add() under the mutex — matches the fix commit

    …/net/netfilter/x_tables.c:1538-1561

  3. ipt_register_table() calls xt_register_table(net, table, template_ops, ...) and has no separate kmemdup_array/table->ops assignment

    …/net/ipv4/netfilter/ip_tables.c:1742

  4. arp/ip6 callers use the same fixed API; grep for kmemdup/table->ops in these files returns nothing

    …/net/ipv4/netfilter/arp_tables.c:1540 and net/ipv6/netfilter/ip6_tables.c:1756

  5. VERSION 6, PATCHLEVEL 18, SUBLEVEL 60 — stable release containing the backport

    …/Makefile:2-4

  6. No Buildroot patch touches x_tables/ip_tables; the fix comes from upstream stable, not a local patch

    …/.applied_patches_list

  7. Legacy xtables is built as modules, but the code present is the fixed version

    …/.config (CONFIG_NETFILTER_XTABLES=m, CONFIG_IP_NF_IPTABLES=m, CONFIG_IP6_NF_IPTABLES=m, CONFIG_IP_NF_ARPTABLES=m)

Version and patches

NVD lists 6.18.60 as affected, but the stable backport (one of the referenced git.kernel.org/stable commits for 6.18.y) is present in this tree's net/netfilter/x_tables.c and the three table-registration callers. No Buildroot patches apply to these files.

Recommendation

Document as N/A (fix already present in 6.18.60 source); no upgrade or backport needed for this CVE.

Open questions

None material. The exact stable commit hash cannot be confirmed from a tarball (no git history), but the code matches the fix hunk-for-hunk.

Members of Kernel Kit decide. Sign in if you are one.