# CVE-2024-50257: netfilter: Fix use-after-free in get\_info()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.0
- **CVSS:** 7.0 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.34% (percentile 20, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-11-09T10:15:10.373Z
- **Modified:** 2026-08-05T11:42:49.717Z

## Who should check

- Anyone running Linux \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< ba22ea01348384df19cc1fabc7964be6e7189749; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< cb7c388b5967946f097afdb759b7c860305f2d96; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< 6a1f088f9807f5166f58902d26246d0b88da03a8; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< bab3bb35c03b263c486833d50d50c081d9e9832b; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< f48d258f0ac540f00fa617dac496c4c18b5dc2fa
- Anyone running Linux 5.15

## Description

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.

## Affected and fixed versions

- Linux: \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< ba22ea01348384df19cc1fabc7964be6e7189749; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< cb7c388b5967946f097afdb759b7c860305f2d96; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< 6a1f088f9807f5166f58902d26246d0b88da03a8; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< bab3bb35c03b263c486833d50d50c081d9e9832b; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< f48d258f0ac540f00fa617dac496c4c18b5dc2fa (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-50257. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-50257.md
Affected: Linux >= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, < ba22ea01348384df19cc1fabc7964be6e7189749; >= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, < cb7c388b5967946f097afdb759b7c860305f2d96; >= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, < 6a1f088f9807f5166f58902d26246d0b88da03a8; >= fdacd57c79b79a03c7ca88f…
Fixed in: Linux 6a1f088f9807f5166f58902d26246d0b88da03a8

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-50257 being exploited?

There is no confirmed exploitation: CVE-2024-50257 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.34% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-50257?

High: CVSS 7.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2024-50257?

Linux \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< ba22ea01348384df19cc1fabc7964be6e7189749; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< cb7c388b5967946f097afdb759b7c860305f2d96; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< 6a1f088f9807f5166f58902d26246d0b88da03a8; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< bab3bb35c03b263c486833d50d50c081d9e9832b; \>= fdacd57c79b79a03c7ca88f706ad9fb7b46831c1, \< f48d258f0ac540f00fa617dac496c4c18b5dc2fa; Linux 5.15.

### Is there a fix for CVE-2024-50257?

Yes. Fixed in Linux 6a1f088f9807f5166f58902d26246d0b88da03a8. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-50257?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/ba22ea01348384df19cc1fabc7964be6e7189749>
- patch: <https://git.kernel.org/stable/c/cb7c388b5967946f097afdb759b7c860305f2d96>
- patch: <https://git.kernel.org/stable/c/6a1f088f9807f5166f58902d26246d0b88da03a8>
- patch: <https://git.kernel.org/stable/c/bab3bb35c03b263c486833d50d50c081d9e9832b>
- patch: <https://git.kernel.org/stable/c/f48d258f0ac540f00fa617dac496c4c18b5dc2fa>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-50257>

HTML: <https://flawdb.com/CVE-2024-50257> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-50257>
