CyberSecBulletin
CVE-2024-50280NVD status: Modified

Linux: Use After Free

CVE-2024-50280 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 40fac0271c7aedf60d81ed8214e80851e5b26312, d154b333a5667b6c1b213a11a41ad7aaccd10c3d, 5a754d3c771280f2d06bf8ab716d6a0d36ca256e 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.25% 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 40fac0271c7aedf60d81ed8214e80851e5b26312 or d154b333a5667b6c1b213a11a41ad7aaccd10c3d or 5a754d3c771280f2d06bf8ab716d6a0d36ca256e or 8cc12dab635333c4ea28e72d7b947be7d0543c2c, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.10 or 4.15 or 4.20 or 5.5, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux2b17026685a270b2beaf1cdd9857fcedd3505c7e up to, but not including, 40fac0271c7aedf60d81ed8214e80851e5b26312; d2a0b298ebf83ab6236f66788a3541e91ce75a70 up to, but not including, d154b333a5667b6c1b213a11a41ad7aaccd10c3d; 6a3e412c2ab131c54945327a7676b006f000a209 up to, but not including, 5a754d3c771280f2d06bf8ab716d6a0d36ca256e; 6a459d8edbdbe7b24db42a5a9f21e6aa9e00c2aa up to, but not including, 8cc12dab635333c4ea28e72d7b947be7d0543c2c; 6a459d8edbdbe7b24db42a5a9f21e6aa9e00c2aa up to, but not including, aee3ecda73ce13af7c3e556383342b57e6bd0718; 6a459d8edbdbe7b24db42a5a9f21e6aa9e00c2aa up to, but not including, 135496c208ba26fd68cdef10b64ed7a91ac9a7ff; 034cbc8d3b47a56acd89453c29632a9c117de09d; 993406104d2b28fe470126a062ad37a1e21e792e; and 12 more ranges40fac0271c7aedf60d81ed8214e80851e5b26312, d154b333a5667b6c1b213a11a41ad7aaccd10c3d, 5a754d3c771280f2d06bf8ab716d6a0d36ca256e, 8cc12dab635333c4ea28e72d7b947be7d0543c2c, aee3ecda73ce13af7c3e556383342b57e6bd0718, 135496c208ba26fd68cdef10b64ed7a91ac9a7ff
LinuxLinux Kernel4.9.337 up to, but not including, 4.10; 4.14.303 up to, but not including, 4.15; 4.19.270 up to, but not including, 4.20; 5.4.229 up to, but not including, 5.5; 5.10.163 up to, but not including, 5.11; 5.15.87 up to, but not including, 5.16; 6.0.18 up to, but not including, 6.1; 6.1.4 up to, but not including, 6.1.117; and 3 more ranges4.10, 4.15, 4.20, 5.5, 5.11, 5.16

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 CISA (ADP).

Official description

In the Linux kernel, the following vulnerability has been resolved: dm cache: fix flushing uninitialized delayed_work on cache_ctr error An unexpected WARN_ON from flush_work() may occur when cache creation fails, caused by destroying the uninitialized delayed_work waker in the error path of cache_create(). For example, the warning appears on the superblock checksum error. Reproduce steps: dmsetup create cmeta --table "0 8192 linear /dev/sdc 0" dmsetup create cdata --table "0 65536 linear /dev/sdc 8192" dmsetup create corig --table "0 524288 linear /dev/sdc 262144" dd if=/dev/urandom of=/dev/mapper/cmeta bs=4k count=1 oflag=direct dmsetup create cache --table "0 524288 cache /dev/mapper/cmeta \ /dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0" Kernel logs: (snip) WARNING: CPU: 0 PID: 84 at kernel/workqueue.c:4178 __flush_work+0x5d4/0x890 Fix by pulling out the cancel_delayed_work_sync() from the constructor's error path. This patch doesn't affect the use-after-free fix for concurrent dm_resume and dm_destroy (commit 6a459d8edbdb ("dm cache: Fix UAF in destroy()")) as cache_dtr is not changed.

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: total).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Use After Free vulnerabilities

Spotted an error? Tell us.