CyberSecBulletin
CVE-2025-21811NVD status: Modified

Linux: Use After Free

CVE-2025-21811 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 e1fc4a90a90ea8514246c45435662531975937d9, 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a, d8ff250e085a4c4cdda4ad1cdd234ed110393143 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.26% 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 e1fc4a90a90ea8514246c45435662531975937d9 or 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a or d8ff250e085a4c4cdda4ad1cdd234ed110393143 or 58c27fa7a610b6e8d44e6220e7dbddfbaccaf439, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.4.291 or 5.10.235 or 5.15.179 or 6.1.129, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux8c26c4e2694a163d525976e804d81cd955bbb40c up to, but not including, e1fc4a90a90ea8514246c45435662531975937d9; 8c26c4e2694a163d525976e804d81cd955bbb40c up to, but not including, 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a; 8c26c4e2694a163d525976e804d81cd955bbb40c up to, but not including, d8ff250e085a4c4cdda4ad1cdd234ed110393143; 8c26c4e2694a163d525976e804d81cd955bbb40c up to, but not including, 58c27fa7a610b6e8d44e6220e7dbddfbaccaf439; 8c26c4e2694a163d525976e804d81cd955bbb40c up to, but not including, 8e1b9201c9a24638cf09c6e1c9f224157328010b; 8c26c4e2694a163d525976e804d81cd955bbb40c up to, but not including, 4b08d23d7d1917bef4fbee8ad81372f49b006656; 8c26c4e2694a163d525976e804d81cd955bbb40c up to, but not including, c437dfac9f7a5a46ac2a5e6d6acd3059e9f68188; 8c26c4e2694a163d525976e804d81cd955bbb40c up to, but not including, 367a9bffabe08c04f6d725032cce3d891b2b9e1a; and 1 more rangese1fc4a90a90ea8514246c45435662531975937d9, 72cf688d0ce7e642b12ddc9b2a42524737ec1b4a, d8ff250e085a4c4cdda4ad1cdd234ed110393143, 58c27fa7a610b6e8d44e6220e7dbddfbaccaf439, 8e1b9201c9a24638cf09c6e1c9f224157328010b, 4b08d23d7d1917bef4fbee8ad81372f49b006656
LinuxLinux Kernel3.10 up to, but not including, 5.4.291; 5.5 up to, but not including, 5.10.235; 5.11 up to, but not including, 5.15.179; 5.16 up to, but not including, 6.1.129; 6.2 up to, but not including, 6.6.76; 6.7 up to, but not including, 6.12.13; 6.13 up to, but not including, 6.13.25.4.291, 5.10.235, 5.15.179, 6.1.129, 6.6.76, 6.12.13

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: nilfs2: protect access to buffers with no active references nilfs_lookup_dirty_data_buffers(), which iterates through the buffers attached to dirty data folios/pages, accesses the attached buffers without locking the folios/pages. For data cache, nilfs_clear_folio_dirty() may be called asynchronously when the file system degenerates to read only, so nilfs_lookup_dirty_data_buffers() still has the potential to cause use after free issues when buffers lose the protection of their dirty state midway due to this asynchronous clearing and are unintentionally freed by try_to_free_buffers(). Eliminate this race issue by adjusting the lock section in this function.

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.