# CVE-2024-54031: netfilter: nft\_set\_hash: unaligned atomic read on struct nft\_set\_ext

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.31% (percentile 16, 2026-11-26)
- **Published:** 2025-01-15T13:10:23.140Z
- **Modified:** 2026-06-17T08:09:42.187Z

## Who should check

- Anyone running Linux \>= 98d62cf0e26305dd6a1932a4054004290f4194bb, \< 352f8eaaabd008f09d1e176194edc261a7304084; \>= e21855091f11df80d41239dbc5f8545b772c657d, \< 6a14b46052eeb83175a95baf399283860b9d94c4; \>= 59a59da8de47848575eedc141a74aae57696706d, \< 277f00b0c2dca8794cf4837722960bdc4174911f; \>= 23a6919bb3ecf6787f060476ee6810ad55ebf9c8, \< 607774a13764676d4b8be9c8b9c66b8cf3469043; \>= 86c27603514cb8ead29857365cdd145404ee9706, \< 4f49349c1963e507aa37c1ec05178faeb0103959; \>= be4d0ac67d92e6a285cd3eeb672188d249c121b2, \< d24cbc43cc7b41a0824b0bc6ec4d8436d8d7a9c0; \>= 7ffc7481153bbabf3332c6a19b289730c7e1edf5, \< 542ed8145e6f9392e3d0a86a0e9027d2ffd183e4
- Anyone running Linux \>= 5.4.287, \< 5.4.289; \>= 5.10.231, \< 5.10.233; \>= 5.15.174, \< 5.15.176; \>= 6.1.120, \< 6.1.124; \>= 6.6.66, \< 6.6.70; \>= 6.12.5, \< 6.12.9

## Description

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

netfilter: nft\_set\_hash: unaligned atomic read on struct nft\_set\_ext

Access to genmask field in struct nft\_set\_ext results in unaligned
atomic read:

\[   72.130109\] Unable to handle kernel paging request at virtual address ffff0000c2bb708c
\[   72.131036\] Mem abort info:
\[   72.131213\]   ESR = 0x0000000096000021
\[   72.131446\]   EC = 0x25: DABT (current EL), IL = 32 bits
\[   72.132209\]   SET = 0, FnV = 0
\[   72.133216\]   EA = 0, S1PTW = 0
\[   72.134080\]   FSC = 0x21: alignment fault
\[   72.135593\] Data abort info:
\[   72.137194\]   ISV = 0, ISS = 0x00000021, ISS2 = 0x00000000
\[   72.142351\]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
\[   72.145989\]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
\[   72.150115\] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000237d27000
\[   72.154893\] \[ffff0000c2bb708c\] pgd=0000000000000000, p4d=180000023ffff403, pud=180000023f84b403, pmd=180000023f835403,
+pte=0068000102bb7707
\[   72.163021\] Internal error: Oops: 0000000096000021 \[\#1\] SMP
\[...\]
\[   72.170041\] CPU: 7 UID: 0 PID: 54 Comm: kworker/7:0 Tainted: G            E      6.13.0-rc3+ \#2
\[   72.170509\] Tainted: \[E\]=UNSIGNED\_MODULE
\[   72.170720\] Hardware name: QEMU QEMU Virtual Machine, BIOS edk2-stable202302-for-qemu 03/01/2023
\[   72.171192\] Workqueue: events\_power\_efficient nft\_rhash\_gc \[nf\_tables\]
\[   72.171552\] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
\[   72.171915\] pc : nft\_rhash\_gc+0x200/0x2d8 \[nf\_tables\]
\[   72.172166\] lr : nft\_rhash\_gc+0x128/0x2d8 \[nf\_tables\]
\[   72.172546\] sp : ffff800081f2bce0
\[   72.172724\] x29: ffff800081f2bd40 x28: ffff0000c2bb708c x27: 0000000000000038
\[   72.173078\] x26: ffff0000c6780ef0 x25: ffff0000c643df00 x24: ffff0000c6778f78
\[   72.173431\] x23: 000000000000001a x22: ffff0000c4b1f000 x21: ffff0000c6780f78
\[   72.173782\] x20: ffff0000c2bb70dc x19: ffff0000c2bb7080 x18: 0000000000000000
\[   72.174135\] x17: ffff0000c0a4e1c0 x16: 0000000000003000 x15: 0000ac26d173b978
\[   72.174485\] x14: ffffffffffffffff x13: 0000000000000030 x12: ffff0000c6780ef0
\[   72.174841\] x11: 0000000000000000 x10: ffff800081f2bcf8 x9 : ffff0000c3000000
\[   72.175193\] x8 : 00000000000004be x7 : 0000000000000000 x6 : 0000000000000000
\[   72.175544\] x5 : 0000000000000040 x4 : ffff0000c3000010 x3 : 0000000000000000
\[   72.175871\] x2 : 0000000000003a98 x1 : ffff0000c2bb708c x0 : 0000000000000004
\[   72.176207\] Call trace:
\[   72.176316\]  nft\_rhash\_gc+0x200/0x2d8 \[nf\_tables\] (P)
\[   72.176653\]  process\_one\_work+0x178/0x3d0
\[   72.176831\]  worker\_thread+0x200/0x3f0
\[   72.176995\]  kthread+0xe8/0xf8
\[   72.177130\]  ret\_from\_fork+0x10/0x20
\[   72.177289\] Code: 54fff984 d503201f d2800080 91003261 (f820303f)
\[   72.177557\] ---\[ end trace 0000000000000000 \]---

Align struct nft\_set\_ext to word size to address this and
documentation it.

pahole reports that this increases the size of elements for rhash and
pipapo in 8 bytes on x86\_64.

## Affected and fixed versions

- Linux: \>= 98d62cf0e26305dd6a1932a4054004290f4194bb, \< 352f8eaaabd008f09d1e176194edc261a7304084; \>= e21855091f11df80d41239dbc5f8545b772c657d, \< 6a14b46052eeb83175a95baf399283860b9d94c4; \>= 59a59da8de47848575eedc141a74aae57696706d, \< 277f00b0c2dca8794cf4837722960bdc4174911f; \>= 23a6919bb3ecf6787f060476ee6810ad55ebf9c8, \< 607774a13764676d4b8be9c8b9c66b8cf3469043; \>= 86c27603514cb8ead29857365cdd145404ee9706, \< 4f49349c1963e507aa37c1ec05178faeb0103959; \>= be4d0ac67d92e6a285cd3eeb672188d249c121b2, \< d24cbc43cc7b41a0824b0bc6ec4d8436d8d7a9c0; \>= 7ffc7481153bbabf3332c6a19b289730c7e1edf5, \< 542ed8145e6f9392e3d0a86a0e9027d2ffd183e4 (cvelist)
- Linux: \>= 5.4.287, \< 5.4.289; \>= 5.10.231, \< 5.10.233; \>= 5.15.174, \< 5.15.176; \>= 6.1.120, \< 6.1.124; \>= 6.6.66, \< 6.6.70; \>= 6.12.5, \< 6.12.9 (cvelist)

## Mitigation

- Upgrade Linux to 542ed8145e6f9392e3d0a86a0e9027d2ffd183e4 or later.
- Upgrade Linux to 6.12.9 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-54031.md
Affected: Linux >= 98d62cf0e26305dd6a1932a4054004290f4194bb, < 352f8eaaabd008f09d1e176194edc261a7304084; >= e21855091f11df80d41239dbc5f8545b772c657d, < 6a14b46052eeb83175a95baf399283860b9d94c4; >= 59a59da8de47848575eedc141a74aae57696706d, < 277f00b0c2dca8794cf4837722960bdc4174911f; >= 23a6919bb3ecf6787f06047…
Fixed in: Linux 352f8eaaabd008f09d1e176194edc261a7304084, Linux 6a14b46052eeb83175a95baf399283860b9d94c4, Linux 277f00b0c2dca8794cf4837722960bdc4174911f, Linux 607774a13764676d4b8be9c8b9c66b8cf3469043, Linux 4f49349c1963e507aa37c1ec05178faeb0103959, Linux 542ed8145e6f9392e3d0a86a0e9027d2ffd183e4, Linux 5.4.2…

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-54031 being exploited?

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 98d62cf0e26305dd6a1932a4054004290f4194bb, \< 352f8eaaabd008f09d1e176194edc261a7304084; \>= e21855091f11df80d41239dbc5f8545b772c657d, \< 6a14b46052eeb83175a95baf399283860b9d94c4; \>= 59a59da8de47848575eedc141a74aae57696706d, \< 277f00b0c2dca8794cf4837722960bdc4174911f; \>= 23a6919bb3ecf6787f060476ee6810ad55ebf9c8, \< 607774a13764676d4b8be9c8b9c66b8cf3469043; \>= 86c27603514cb8ead29857365cdd145404ee9706, \< 4f49349c1963e507aa37c1ec05178faeb0103959; \>= be4d0ac67d92e6a285cd3eeb672188d249c121b2, \< d24cbc43cc7b41a0824b0bc6ec4d8436d8d7a9c0; \>= 7ffc7481153bbabf3332c6a19b289730c7e1edf5, \< 542ed8145e6f9392e3d0a86a0e9027d2ffd183e4; Linux \>= 5.4.287, \< 5.4.289; \>= 5.10.231, \< 5.10.233; \>= 5.15.174, \< 5.15.176; \>= 6.1.120, \< 6.1.124; \>= 6.6.66, \< 6.6.70; \>= 6.12.5, \< 6.12.9.

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

Yes. Fixed in Linux 352f8eaaabd008f09d1e176194edc261a7304084, Linux 6a14b46052eeb83175a95baf399283860b9d94c4, Linux 277f00b0c2dca8794cf4837722960bdc4174911f, Linux 607774a13764676d4b8be9c8b9c66b8cf3469043, Linux 4f49349c1963e507aa37c1ec05178faeb0103959, Linux 542ed8145e6f9392e3d0a86a0e9027d2ffd183e4, Linux 5.4.289, Linux 5.10.233, Linux 5.15.176, Linux 6.1.124, Linux 6.6.70, Linux 6.12.9. Upgrade Linux to 542ed8145e6f9392e3d0a86a0e9027d2ffd183e4 or later. Upgrade Linux to 6.12.9 or later.

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

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/352f8eaaabd008f09d1e176194edc261a7304084>
- patch: <https://git.kernel.org/stable/c/6a14b46052eeb83175a95baf399283860b9d94c4>
- patch: <https://git.kernel.org/stable/c/277f00b0c2dca8794cf4837722960bdc4174911f>
- patch: <https://git.kernel.org/stable/c/607774a13764676d4b8be9c8b9c66b8cf3469043>
- patch: <https://git.kernel.org/stable/c/4f49349c1963e507aa37c1ec05178faeb0103959>
- patch: <https://git.kernel.org/stable/c/d24cbc43cc7b41a0824b0bc6ec4d8436d8d7a9c0>
- patch: <https://git.kernel.org/stable/c/542ed8145e6f9392e3d0a86a0e9027d2ffd183e4>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.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-54031>

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