Bug 2351624 (CVE-2025-21846) - CVE-2025-21846 kernel: acct: perform last write from workqueue
Summary: CVE-2025-21846 kernel: acct: perform last write from workqueue
Keywords:
Status: NEW
Alias: CVE-2025-21846
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-03-12 12:24 UTC by OSIDB Bzimport
Modified: 2025-03-13 15:11 UTC (History)
5 users (show)

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


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-03-12 12:24:07 UTC
In the Linux kernel, the following vulnerability has been resolved:

acct: perform last write from workqueue

In [1] it was reported that the acct(2) system call can be used to
trigger NULL deref in cases where it is set to write to a file that
triggers an internal lookup. This can e.g., happen when pointing acc(2)
to /sys/power/resume. At the point the where the write to this file
happens the calling task has already exited and called exit_fs(). A
lookup will thus trigger a NULL-deref when accessing current->fs.

Reorganize the code so that the the final write happens from the
workqueue but with the caller's credentials. This preserves the
(strange) permission model and has almost no regression risk.

This api should stop to exist though.

Comment 1 Mauro Matteo Cascella 2025-03-12 12:25:01 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025031211-CVE-2025-21846-25c1@gregkh/T


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