CyberSecBulletin
CVE-2024-50059NVD status: Modified

Linux: Use After Free

CVE-2024-50059 is a high-severity use after free vulnerability in Linux, with a CVSS 3.1 base score of 7.0 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 5126d8f5567f49b52e21fca320eaa97977055099, b650189687822b705711f0567a65a164a314d8df, 92728fceefdaa2a0a3aae675f86193b006eeaa43 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.23% 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 5126d8f5567f49b52e21fca320eaa97977055099 or b650189687822b705711f0567a65a164a314d8df or 92728fceefdaa2a0a3aae675f86193b006eeaa43 or 3ae45be8492460a35b5aebf6acac1f1d32708946, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.10.227 or 5.15.168 or 6.1.113 or 6.6.57, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxd04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 up to, but not including, 5126d8f5567f49b52e21fca320eaa97977055099; d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 up to, but not including, b650189687822b705711f0567a65a164a314d8df; d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 up to, but not including, 92728fceefdaa2a0a3aae675f86193b006eeaa43; d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 up to, but not including, 3ae45be8492460a35b5aebf6acac1f1d32708946; d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 up to, but not including, fa840ba4bd9f3bad7f104e5b32028ee73af8b3dd; d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 up to, but not including, 177925d9c8715a897bb79eca62628862213ba956; d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 up to, but not including, e51aded92d42784313ba16c12f4f88cc4f973bbb; 4.165126d8f5567f49b52e21fca320eaa97977055099, b650189687822b705711f0567a65a164a314d8df, 92728fceefdaa2a0a3aae675f86193b006eeaa43, 3ae45be8492460a35b5aebf6acac1f1d32708946, fa840ba4bd9f3bad7f104e5b32028ee73af8b3dd, 177925d9c8715a897bb79eca62628862213ba956
LinuxLinux Kernelbefore 5.10.227; 5.11 up to, but not including, 5.15.168; 5.16 up to, but not including, 6.1.113; 6.2 up to, but not including, 6.6.57; 6.7 up to, but not including, 6.11.45.10.227, 5.15.168, 6.1.113, 6.6.57, 6.11.4

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
HighSuccess depends on conditions outside the attacker's control.
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:H/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.0HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race condition In the switchtec_ntb_add function, it can call switchtec_ntb_init_sndev function, then &sndev->check_link_status_work is bound with check_link_status_work. switchtec_ntb_link_notification may be called to start the work. If we remove the module which will call switchtec_ntb_remove to make cleanup, it will free sndev through kfree(sndev), while the work mentioned above will be used. The sequence of operations that may lead to a UAF bug is as follows: CPU0 CPU1 | check_link_status_work switchtec_ntb_remove | kfree(sndev); | | if (sndev->link_force_down) | // use sndev Fix it by ensuring that the work is canceled before proceeding with the cleanup in switchtec_ntb_remove.

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.