CyberSecBulletin
CVE-2024-39502NVD status: Modified

Linux: Use After Free

CVE-2024-39502 is a high-severity use after free vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 0d19267cb150e8f76ade210e16ee820a77f684e7, ff9c2a9426ecf5b9631e9fd74993b357262387d6, 8edd18dab443863e9e48f084e7f123fca3065e4e as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.31% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 0d19267cb150e8f76ade210e16ee820a77f684e7 or ff9c2a9426ecf5b9631e9fd74993b357262387d6 or 8edd18dab443863e9e48f084e7f123fca3065e4e or 60cd714871cd5a683353a355cbb17a685245cf84, whichever matches your release line, or a later version.
  2. Update RUGGEDCOM RST2428P to V3.1 or a later version.
  3. Update SCALANCE XCM-/XRM-/XCH-/XRH-300 family to V3.1 or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux0f3154e6bcb354968cc04f7cd86ce466f7b9a814 up to, but not including, 0d19267cb150e8f76ade210e16ee820a77f684e7; 0f3154e6bcb354968cc04f7cd86ce466f7b9a814 up to, but not including, ff9c2a9426ecf5b9631e9fd74993b357262387d6; 0f3154e6bcb354968cc04f7cd86ce466f7b9a814 up to, but not including, 8edd18dab443863e9e48f084e7f123fca3065e4e; 0f3154e6bcb354968cc04f7cd86ce466f7b9a814 up to, but not including, 60cd714871cd5a683353a355cbb17a685245cf84; 0f3154e6bcb354968cc04f7cd86ce466f7b9a814 up to, but not including, 183ebc167a8a19e916b885d4bb61a3491991bfa5; 0f3154e6bcb354968cc04f7cd86ce466f7b9a814 up to, but not including, a87d72b37b9ec2c1e18fe36b09241d8b30334a2e; 0f3154e6bcb354968cc04f7cd86ce466f7b9a814 up to, but not including, 79f18a41dd056115d685f3b0a419c7cd40055e13; 5.40d19267cb150e8f76ade210e16ee820a77f684e7, ff9c2a9426ecf5b9631e9fd74993b357262387d6, 8edd18dab443863e9e48f084e7f123fca3065e4e, 60cd714871cd5a683353a355cbb17a685245cf84, 183ebc167a8a19e916b885d4bb61a3491991bfa5, a87d72b37b9ec2c1e18fe36b09241d8b30334a2e
SiemensRUGGEDCOM RST2428Pbefore V3.1V3.1
SiemensSCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 familyNot specified in the recordNot stated
SiemensSCALANCE XCM-/XRM-/XCH-/XRH-300 familybefore V3.1V3.1
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystembefore V1.1.1V1.1.1
LinuxLinux Kernel5.4 up to, but not including, 5.4.279; 5.5 up to, but not including, 5.10.221; 5.11 up to, but not including, 5.15.162; 5.16 up to, but not including, 6.1.95; 6.2 up to, but not including, 6.6.35; 6.7 up to, but not including, 6.9.6; 6.105.4.279, 5.10.221, 5.15.162, 6.1.95, 6.6.35, 6.9.6

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.8HighCNA
CVSS 3.17.8HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: ionic: fix use after netif_napi_del() When queues are started, netif_napi_add() and napi_enable() are called. If there are 4 queues and only 3 queues are used for the current configuration, only 3 queues' napi should be registered and enabled. The ionic_qcq_enable() checks whether the .poll pointer is not NULL for enabling only the using queue' napi. Unused queues' napi will not be registered by netif_napi_add(), so the .poll pointer indicates NULL. But it couldn't distinguish whether the napi was unregistered or not because netif_napi_del() doesn't reset the .poll pointer to NULL. So, ionic_qcq_enable() calls napi_enable() for the queue, which was unregistered by netif_napi_del(). Reproducer: ethtool -L <interface name> rx 1 tx 1 combined 0 ethtool -L <interface name> rx 0 tx 0 combined 1 ethtool -L <interface name> rx 0 tx 0 combined 4 Splat looks like: kernel BUG at net/core/dev.c:6666! Oops: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 3 PID: 1057 Comm: kworker/3:3 Not tainted 6.10.0-rc2+ #16 Workqueue: events ionic_lif_deferred_work [ionic] RIP: 0010:napi_enable+0x3b/0x40 Code: 48 89 c2 48 83 e2 f6 80 b9 61 09 00 00 00 74 0d 48 83 bf 60 01 00 00 00 74 03 80 ce 01 f0 4f RSP: 0018:ffffb6ed83227d48 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff97560cda0828 RCX: 0000000000000029 RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff97560cda0a28 RBP: ffffb6ed83227d50 R08: 0000000000000400 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000 R13: ffff97560ce3c1a0 R14: 0000000000000000 R15: ffff975613ba0a20 FS: 0000000000000000(0000) GS:ffff975d5f780000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8f734ee200 CR3: 0000000103e50000 CR4: 00000000007506f0 PKRU: 55555554 Call Trace: <TASK> ? die+0x33/0x90 ? do_trap+0xd9/0x100 ? napi_enable+0x3b/0x40 ? do_error_trap+0x83/0xb0 ? napi_enable+0x3b/0x40 ? napi_enable+0x3b/0x40 ? exc_invalid_op+0x4e/0x70 ? napi_enable+0x3b/0x40 ? asm_exc_invalid_op+0x16/0x20 ? napi_enable+0x3b/0x40 ionic_qcq_enable+0xb7/0x180 [ionic 59bdfc8a035436e1c4224ff7d10789e3f14643f8] ionic_start_queues+0xc4/0x290 [ionic 59bdfc8a035436e1c4224ff7d10789e3f14643f8] ionic_link_status_check+0x11c/0x170 [ionic 59bdfc8a035436e1c4224ff7d10789e3f14643f8] ionic_lif_deferred_work+0x129/0x280 [ionic 59bdfc8a035436e1c4224ff7d10789e3f14643f8] process_one_work+0x145/0x360 worker_thread+0x2bb/0x3d0 ? __pfx_worker_thread+0x10/0x10 kthread+0xcc/0x100 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2d/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Use After Free

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.

How developers prevent this class of flaw

  • Choose a language that provides automatic memory management.
  • When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.

More Use After Free vulnerabilities (CWE-416)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Use After Free vulnerabilities

Spotted an error? Tell us.