CVE-2024-39503

netfilter: ipset: Fix race between namespace cleanup and gc in the list:set type

State
Published
Severity
7.8 High
Published
Jul 12, 2024
Updated
Oct 15, 2026
Reserved
Jun 25, 2024

Read the record on cve.org

Description

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

netfilter: ipset: Fix race between namespace cleanup and gc in the list:set type

Lion Ackermann reported that there is a race condition between namespace cleanup in ipset and the garbage collection of the list:set type. The namespace cleanup can destroy the list:set type of sets while the gc of the set type is waiting to run in rcu cleanup. The latter uses data from the destroyed set which thus leads use after free. The patch contains the following parts:

- When destroying all sets, first remove the garbage collectors, then wait if needed and then destroy the sets. - Fix the badly ordered "wait then remove gc" for the destroy a single set case. - Fix the missing rcu locking in the list:set type in the userspace test case. - Use proper RCU list handlings in the list:set type.

The patch depends on c1193d9bbbd3 (netfilter: ipset: Add list flush to cancel_gc).

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • c7f2733e5011bfd136f1ca93497394d43aa76225 to before c0761d1f1ce1d5b85b5e82bbb714df12de1aa8c3Affected
  • a24d5f2ac8ef702a58e55ec276aad29b4bd97e05 to before 93b53c202b51a69e42ca57f5a183f7e008e19f83Affected
  • c2dc077d8f722a1c73a24e674f925602ee5ece49 to before 0f1bb77c6d837c9513943bc7c08f04c5cc5c6568Affected
  • 653bc5e6d9995d7d5f497c665b321875a626161c to before 390b353d1a1da3e9c6c0fd14fe650d69063c95d6Affected
  • b93a6756a01f4fd2f329a39216f9824c56a66397 to before 2ba35b37f780c6410bb4bba9c3072596d8576702Affected
  • 97f7cf1cd80eeed3b7c808b7c12463295c751001 to before 90ae20d47de602198eb69e6cd7a3db3420abfc08Affected
  • 97f7cf1cd80eeed3b7c808b7c12463295c751001 to before 4e7aaa6b82d63e8ddcbfb56b4fd3d014ca586f10Affected
  • 970709a67696b100a57b33af1a3d75fc34b747ebAffected
  • 5.4.269 to before 5.4.279Affected
  • 5.10.210 to before 5.10.221Affected
  • 5.15.149 to before 5.15.162Affected
  • 6.1.79 to before 6.1.95Affected
  • 6.6.18 to before 6.6.35Affected
  • 6.7.6 to before 6.8Affected
LinuxLinux
  • 6.8Affected
  • before 6.8Not affected
  • 5.4.279 through 5.4.*Not affected
  • 5.10.221 through 5.10.*Not affected
  • 5.15.162 through 5.15.*Not affected
  • 6.1.95 through 6.1.*Not affected
  • 6.6.35 through 6.6.*Not affected
  • 6.9.6 through 6.9.*Not affected
  • 6.10 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.