netfilter: x_tables: allocate hook ops while under mutex (Linux Linux)

CVE-2026-64079
MEDIUM 5.5

At a glance

Source
NVD
EPSS
EPSS 0.12 % · percentile 2 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
Affected products
Linux · Linux
NVD status
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: 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.

Weaknesses (CWE)

  • CWE-476 — NULL Pointer Dereference

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductAffected versions
Linux · Linux
affected : ≥ ae689334225ff0e4ef112459ecd24aea932c2b00 < 5ea15e78232253e657d352e625fb4913e2f57e63
affected : ≥ ae689334225ff0e4ef112459ecd24aea932c2b00 < 693bffd742dd4fa9a0076ed120545af3679c588b
affected : ≥ ae689334225ff0e4ef112459ecd24aea932c2b00 < f669571a2bf5067f50091cc598df9613663ee226
affected : ≥ ae689334225ff0e4ef112459ecd24aea932c2b00 < 2f92c5f923979f37ab1d5445381e4b8378a196cc
affected : ≥ ae689334225ff0e4ef112459ecd24aea932c2b00 < b62eb8dcf2c47d4d676a434efbd57c4f776f7829
Other versions : unaffected
Linux · Linux
affected : 5.13
unaffected : ≥ 0 < 5.13
unaffected : ≥ 6.6.160 ≤ 6.6.*
unaffected : ≥ 6.12.114 ≤ 6.12.*
unaffected : ≥ 6.18.57 ≤ 6.18.*
unaffected : ≥ 7.0.11 ≤ 7.0.*
unaffected : ≥ 7.1 ≤ *
Other versions : affected

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD