CVE-2024-54031: netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext

Published Jan 15, 2025
·
Updated

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

netfilter: nftsethash: unaligned atomic read on struct nftsetext

Access to genmask field in struct nftsetext 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]=UNSIGNEDMODULE [ 72.170720] Hardware name: QEMU QEMU Virtual Machine, BIOS edk2-stable202302-for-qemu 03/01/2023 [ 72.171192] Workqueue: eventspowerefficient nftrhashgc [nftables] [ 72.171552] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) [ 72.171915] pc : nftrhashgc+0x200/0x2d8 [nftables] [ 72.172166] lr : nftrhashgc+0x128/0x2d8 [nftables] [ 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] nftrhashgc+0x200/0x2d8 [nftables] (P) [ 72.176653] processonework+0x178/0x3d0 [ 72.176831] workerthread+0x200/0x3f0 [ 72.176995] kthread+0xe8/0xf8 [ 72.177130] retfromfork+0x10/0x20 [ 72.177289] Code: 54fff984 d503201f d2800080 91003261 (f820303f) [ 72.177557] ---[ end trace 0000000000000000 ]---

Align struct nftsetext 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 x8664.

Affected Software

15 affected componentsFixes available
Linux Kernel
Linux Linux kernel>=5.4.287<5.4.289
Linux Linux kernel>=5.10.231<5.10.233
Linux Linux kernel>=5.15.174<5.15.176
Linux Linux kernel>=6.1.120<6.1.124
Linux Linux kernel>=6.6.66<6.6.70
Linux Linux kernel>=6.12.5<6.12.9
Linux Linux kernel=6.13-rc2
Linux Linux kernel=6.13-rc3
Linux Linux kernel=6.13-rc4
Linux Linux kernel=6.13-rc5
debian/linux<6.1.124-1
6.1.124-1
debian/linux<6.12.9-1
6.12.9-1
debian/linux<6.12.9-1
6.12.9-1
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 6.1.124-1
  2. Upgrade

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

    Fixed in 6.12.9-1
  3. Upgrade

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

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1
  4. Compensating control

    Align the Linux kernel netfilter struct nft_set_ext to word size to prevent unaligned atomic reads of its genmask field in nft_set_hash.

Event History

Jan 15, 2025
CVE Published
via MITRE·01:10 PM
Data Sourced
via MITRE·01:10 PM
Description
Data Sourced
via NVD·01:15 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·01:15 PM
DescriptionSeverityAffected Software

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-54031?

CVE-2024-54031 is classified as a high-severity vulnerability due to its potential impact on system stability and security.

2

How do I fix CVE-2024-54031?

To address CVE-2024-54031, update the Linux kernel to the latest version where the vulnerability has been patched.

3

What type of systems are affected by CVE-2024-54031?

CVE-2024-54031 affects systems running vulnerable versions of the Linux kernel that implement the netfilter framework.

4

What is the nature of the issue in CVE-2024-54031?

The vulnerability involves an unaligned atomic read in the struct nft_set_ext of the Linux kernel's netfilter subsystem.

5

Is there a known exploit for CVE-2024-54031?

As of now, there are no publicly disclosed exploits for CVE-2024-54031, but it remains important to apply necessary updates.

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