CVE-2024-42109: netfilter: nf_tables: unconditionally flush pending work before notifier

Published Jul 30, 2024
·
Updated

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

netfilter: nftables: unconditionally flush pending work before notifier

syzbot reports:

KASAN: slab-uaf in nftctxupdate include/net/netfilter/nftables.h:1831 KASAN: slab-uaf in nftcommitrelease net/netfilter/nftablesapi.c:9530 KASAN: slab-uaf int nftablestransdestroywork+0x152b/0x1750 net/netfilter/nftablesapi.c:9597 Read of size 2 at addr ffff88802b0051c4 by task kworker/1:1/45 [..] Workqueue: events nftablestransdestroywork Call Trace: nftctxupdate include/net/netfilter/nftables.h:1831 [inline] nftcommitrelease net/netfilter/nftablesapi.c:9530 [inline] nftablestransdestroywork+0x152b/0x1750 net/netfilter/nftablesapi.c:9597

Problem is that the notifier does a conditional flush, but its possible that the table-to-be-removed is still referenced by transactions being processed by the worker, so we need to flush unconditionally.

We could make the flushwork depend on whether we found a table to delete in nf-next to avoid the flush for most cases.

AFAICS this problem is only exposed in nf-next, with commit e169285f8c56 ("netfilter: nftables: do not store nftctx in transaction objects"), with this commit applied there is an unconditional fetch of table->family which is whats triggering the above splat.

Affected Software

6 affected componentsFixes available
Linux Linux kernel>=5.15.129<5.15.163
Linux Linux kernel>=6.1.50<6.1.98
Linux Linux kernel>=6.5<6.6.39
Linux Linux kernel>=6.7<6.9.9
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.129-1~deb11u1

Event History

Jul 30, 2024
CVE Published
via MITRE·07:46 AM
Data Sourced
via MITRE·07:46 AM
DescriptionSeverity
Data Sourced
via NVD·08:15 AM
RemedyDescriptionSeverityAffected Software
Apr 27, 2025
Data Sourced
via Ubuntu·12:33 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-42109?

CVE-2024-42109 is classified with a high severity level due to its potential impact on system integrity.

2

How do I fix CVE-2024-42109?

To resolve CVE-2024-42109, update your Linux kernel to a version that includes the fix, such as 5.10.223-1 or 6.1.123-1.

3

What systems are affected by CVE-2024-42109?

CVE-2024-42109 affects various Linux kernel versions, particularly between 5.15.129 to 5.15.163 and 6.1.50 to 6.1.98.

4

Is there a specific patch for CVE-2024-42109?

Yes, the fix for CVE-2024-42109 has been included in several kernel updates; please ensure you are running one of the remedied versions.

5

What type of vulnerability is CVE-2024-42109?

CVE-2024-42109 is a use-after-free vulnerability identified in the netfilter component of the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203