cve.bz

CVE-2024-50257 linux linux kernel: Use After Free

7.8 highEPSS 0.3%Fix available

High (7.8) in linux linux kernel. EPSS 0.3% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: netfilter: Fix use-after-free in get_info() ip6table_nat module unload has refcnt warning for UAF. call trace is: WARNING: CPU: 1 PID: 379 at kernel/module/main.c:853 module_put+0x6f/0x80 Modules linked in: ip6table_nat(-) CPU: 1 UID: 0 PID: 379 Comm: ip6tables Not tainted 6.12.0-rc4-00047-gc2ee9f594da8-dirty #205 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:module_put+0x6f/0x80 Call Trace: <TASK> get_info+0x128/0x180 do_ip6t_get_ctl+0x6a/0x430 nf_getsockopt+0x46/0x80 ipv6_getsockopt+0xb9/0x100 rawv6_getsockopt+0x42/0x190 do_sock_getsockopt+0xaa/0x180 __sys_getsockopt+0x70/0xc0 __x64_sys_getsockopt+0x20/0x30 do_syscall_64+0xa2/0x1a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Concurrent execution of module unload and get_info() trigered the warning. The root cause is as follows: cpu0 cpu1 module_exit //mod->state = MODULE_STATE_GOING ip6table_nat_exit xt_unregister_template kfree(t) //removed from templ_list getinfo() t = xt_find_table_lock list_for_each_entry(tmpl, &xt_templates[af]...) if (strcmp(tmpl->name, name)) continue; //table not found try_module_get list_for_each_entry(t, &xt_net->tables[af]...) return t; //not get refcnt module_put(t->me) //uaf unregister_pernet_subsys //remove table from xt_net list While xt_table module was going away and has been removed from xt_templates list, we couldnt get refcnt of xt_table->me. Check module in xt_net->tables list re-traversal to fix it.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 17th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2024-12-11. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-50257 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-50257?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-50257?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-50257 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux5.15 and later

Fixed in

ProductRelease lineFixed in
Linux5.155.15.171
Linux6.16.1.116
Linux6.66.6.60
Linux6.116.11.7
Linuxlater releases6.12

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux-6.16.1.119-1~deb11u1DLA-4008-1
Debian12linux6.1.119-1DEBIAN-CVE-2024-50257 DSA-5818-1
Debian13, 14linux6.11.7-1DEBIAN-CVE-2024-50257
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2024-50257
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 11 moreno fix listedUBUNTU-CVE-2024-50257
Ubuntu20.04:LTSlinux-aws-5.155.15.0-1080.87~20.04.1UBUNTU-CVE-2024-50257 USN-7388-1
Ubuntu20.04:LTSlinux-azure-5.155.15.0-1081.90~20.04.1UBUNTU-CVE-2024-50257 USN-7289-2
Ubuntu20.04:LTSlinux-azure-fde-5.155.15.0-1081.90~20.04.1.1USN-7289-2
Ubuntu20.04:LTSlinux-gcp-5.155.15.0-1077.86~20.04.1UBUNTU-CVE-2024-50257 USN-7291-1
Ubuntu20.04:LTSlinux-gke, linux-riscv, linux-raspi2 and 25 moreno fix listedUBUNTU-CVE-2024-50257
Ubuntu20.04:LTSlinux-hwe-5.155.15.0-134.145~20.04.1UBUNTU-CVE-2024-50257 USN-7331-1
Ubuntu20.04:LTSlinux-ibm-5.155.15.0-1074.77~20.04.1UBUNTU-CVE-2024-50257 USN-7458-1
Ubuntu20.04:LTSlinux-intel-iotg-5.155.15.0-1073.79~20.04.2UBUNTU-CVE-2024-50257 USN-7289-4
Ubuntu20.04:LTSlinux-lowlatency-hwe-5.155.15.0-133.143~20.04.1UBUNTU-CVE-2024-50257 USN-7288-2
Ubuntu20.04:LTSlinux-oracle-5.155.15.0-1075.81~20.04.1UBUNTU-CVE-2024-50257 USN-7289-2
60 more for Ubuntu in the JSON and on Ubuntu's page.
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6, Linux Enterprise Module for Legacy 15 SP6 and 1 morekernel-default6.4.0-150600.23.30.1SUSE-SU-2024:4318-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_017-150600.3.1SUSE-SU-2025:02069-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_116-150600.2.1SUSE-SU-2025:02076-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_212-150600.2.1SUSE-SU-2025:02070-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_312-150600.2.1SUSE-SU-2025:02077-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_510-150600.2.1SUSE-SU-2025:02071-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_61-150600.1.3.1SUSE-SU-2024:4314-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_018-150600.4.46.1SUSE-SU-2025:02117-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_216-150600.2.1SUSE-SU-2025:02126-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_316-150600.2.2SUSE-SU-2025:02162-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_412-150600.2.1SUSE-SU-2025:02116-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_511-150600.2.1SUSE-SU-2025:02127-1
23 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.6dtb-aarch64, kernel-64kb, kernel-docs and 8 more6.4.0-150600.23.30.1SUSE-SU-2024:4318-1
openSUSELeap 15.6kernel-azure, kernel-syms-azure, kernel-source-azure6.4.0-150600.8.20.1SUSE-SU-2024:4316-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.30.1.150600.12.12.6SUSE-SU-2024:4318-1
openSUSELeap 15.6kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more6.4.0-150600.10.20.1SUSE-SU-2024:4314-1
openSUSETumbleweedkernel-source6.11.8-1.1openSUSE-SU-2024:14500-1
openSUSETumbleweedkernel-source-longterm6.12.11-1.1openSUSE-SU-2025:14705-1
Azure Linux2kernel5.15.173.1-1AZL-53259
Azure Linux3kernel6.6.64.2-1AZL-53304
Alpaquita23linux-lts6.1.116-r0BELL-CVE-2024-50257
Alpaquita25, streamlinux-lts6.12.41-r0BELL-CVE-2024-50257

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

To mitigate this issue, prevent the `ip6table_nat` kernel module from loading. This can be achieved by creating a modprobe configuration file:

```bash

echo "blacklist ip6table_nat" > /etc/modprobe.d/disable-ip6table_nat.conf

```

A system reboot is required for this change to take effect. This mitigation may impact systems that rely on IPv6 Network Address Translation functionality.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelOut of support scope
Red Hat Enterprise Linux 7kernel-rtOut of support scope
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-50257.

References

Check your stackJSON