CVE-2024-50212: lib: alloc_tag_module_unload must wait for pending kfree_rcu calls

Published Nov 9, 2024
·
Updated

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

lib: alloctagmoduleunload must wait for pending kfreercu calls

Ben Greear reports following splat: ------------[ cut here ]------------ net/netfilter/nfnatcore.c:1114 module nfnat func:nfnatregisterfn has 256 allocated at module unload WARNING: CPU: 1 PID: 10421 at lib/alloctag.c:168 alloctagmoduleunload+0x22b/0x3f0 Modules linked in: nfnat(-) btrfs ufs qnx4 hfsplus hfs minix vfat msdos fat ... Hardware name: Default string Default string/SKYBAY, BIOS 5.12 08/04/2020 RIP: 0010:alloctagmoduleunload+0x22b/0x3f0 codetagunloadmodule+0x19b/0x2a0 ? codetagloadmodule+0x80/0x80

nfnat module exit calls kfreercu on those addresses, but the free operation is likely still pending by the time alloctag checks for leaks.

Wait for outstanding kfreercu operations to complete before checking resolves this warning.

Reproducer: unshare -n iptables-nft -t nat -A PREROUTING -p tcp grep nfnat /proc/allocinfo # will list 4 allocations rmmod nftchainnat rmmod nfnat # will WARN.

[akpm@linux-foundation.org: add comment]

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

6 affected componentsFixes available
Linux Linux kernel
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1
Linux Linux kernel>=6.10<6.11.7
Linux Linux kernel=6.12-rc1
Linux Linux kernel=6.12-rc2
Linux Linux kernel=6.12-rc3

Event History

Nov 9, 2024
CVE Published
via MITRE·10:14 AM
Data Sourced
via MITRE·10:14 AM
Description
Data Sourced
via NVD·11:15 AM
Description
Data Sourced
via NVD·11:15 AM
RemedySeverityWeaknessAffected Software
Feb 20, 2025
Data Sourced
via Launchpad·12:49 AM
Description
Apr 1, 2025
Data Sourced
via Ubuntu·12:59 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-50212?

CVE-2024-50212 has been classified with a medium severity level.

2

How do I fix CVE-2024-50212?

To fix CVE-2024-50212, update to a patched version of the Linux kernel as specified in the advisory.

3

What systems are affected by CVE-2024-50212?

CVE-2024-50212 affects various versions of the Linux kernel, particularly those prior to the fixed releases.

4

What is the nature of CVE-2024-50212?

CVE-2024-50212 involves a race condition related to the allocation and unloading of kernel modules.

5

Who reported the CVE-2024-50212 vulnerability?

The vulnerability CVE-2024-50212 was reported by Ben Greear.

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