CyberSecBulletin
CVE-2025-22040NVD status: Analyzed

Linux: Use After Free

CVE-2025-22040 is a high-severity use after free vulnerability in Linux, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. The record lists versions 596407adb9af1ee75fe7c7529607783d31b66e7f, 3980770cb1470054e6400fd97668665975726737, 9069939d762138e232a6f79e3e1462682ed6a17d 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.72% chance of exploitation within 30 days, higher than 54% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 596407adb9af1ee75fe7c7529607783d31b66e7f or 3980770cb1470054e6400fd97668665975726737 or 9069939d762138e232a6f79e3e1462682ed6a17d or 94c281721d4ed2d972232414b91d98a6f5bdb16b, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 6.1.134 or 6.6.87 or 6.12.23 or 6.13.11, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux0626e6641f6b467447c81dd7678a69c66f7746cf up to, but not including, 596407adb9af1ee75fe7c7529607783d31b66e7f; 0626e6641f6b467447c81dd7678a69c66f7746cf up to, but not including, 3980770cb1470054e6400fd97668665975726737; 0626e6641f6b467447c81dd7678a69c66f7746cf up to, but not including, 9069939d762138e232a6f79e3e1462682ed6a17d; 0626e6641f6b467447c81dd7678a69c66f7746cf up to, but not including, 94c281721d4ed2d972232414b91d98a6f5bdb16b; 0626e6641f6b467447c81dd7678a69c66f7746cf up to, but not including, 7dfbd4c43eed91dd2548a95236908025707a8dfd; 0626e6641f6b467447c81dd7678a69c66f7746cf up to, but not including, fa4cdb8cbca7d6cb6aa13e4d8d83d1103f6345db; 5.15596407adb9af1ee75fe7c7529607783d31b66e7f, 3980770cb1470054e6400fd97668665975726737, 9069939d762138e232a6f79e3e1462682ed6a17d, 94c281721d4ed2d972232414b91d98a6f5bdb16b, 7dfbd4c43eed91dd2548a95236908025707a8dfd, fa4cdb8cbca7d6cb6aa13e4d8d83d1103f6345db
LinuxLinux Kernel5.15 up to, but not including, 6.1.134; 6.2 up to, but not including, 6.6.87; 6.7 up to, but not including, 6.12.23; 6.13 up to, but not including, 6.13.11; 6.14 up to, but not including, 6.14.26.1.134, 6.6.87, 6.12.23, 6.13.11, 6.14.2
DebianDebian Linux11.0Not stated

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
NetworkCan be exploited remotely over a network, including the internet.
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:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by CNA.

Scoring systemScoreSeverityScored by
CVSS 3.18.8HighCNA
CVSS 3.17.8HighCISA (ADP)

Official description

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix session use-after-free in multichannel connection There is a race condition between session setup and ksmbd_sessions_deregister. The session can be freed before the connection is added to channel list of session. This patch check reference count of session before freeing it.

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

Third-party and government advisories

Recent Use After Free vulnerabilities

Spotted an error? Tell us.