Bug 2356295 (CVE-2025-21893) - CVE-2025-21893 kernel: keys: Fix UAF in key_put()
Summary: CVE-2025-21893 kernel: keys: Fix UAF in key_put()
Keywords:
Status: NEW
Alias: CVE-2025-21893
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-03-31 20:01 UTC by OSIDB Bzimport
Modified: 2025-06-16 07:44 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2025:9079 0 None None None 2025-06-16 07:44:08 UTC

Description OSIDB Bzimport 2025-03-31 20:01:04 UTC
In the Linux kernel, the following vulnerability has been resolved:

keys: Fix UAF in key_put()

Once a key's reference count has been reduced to 0, the garbage collector
thread may destroy it at any time and so key_put() is not allowed to touch
the key after that point.  The most key_put() is normally allowed to do is
to touch key_gc_work as that's a static global variable.

However, in an effort to speed up the reclamation of quota, this is now
done in key_put() once the key's usage is reduced to 0 - but now the code
is looking at the key after the deadline, which is forbidden.

Fix this by using a flag to indicate that a key can be gc'd now rather than
looking at the key's refcount in the garbage collector.

Comment 1 Avinash Hanwate 2025-04-01 04:01:10 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025033126-CVE-2025-21893-f2b4@gregkh/T

Comment 3 errata-xmlrpc 2025-06-16 07:44:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2025:9079 https://access.redhat.com/errata/RHSA-2025:9079


Note You need to log in before you can comment on or make changes to this bug.