From mboxrd@z Thu Jan 1 00:00:00 1970 From: AL-KERNEL To: kernel-cve@kernelcve.org Subject: [CVE-2025-39866][MODERATE 7.0] fs: writeback: fix use-after-free in __mark_inode_dirty() [ Upstream Date: Mon, 12 Oct 2026 21:24:02 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AL-KERNEL-CVE: CVE-2025-39866 X-AL-KERNEL-Priority: MODERATE 7.0 X-AL-KERNEL-Severity: MODERATE 7.0 X-AL-KERNEL-Base-Severity: MODERATE X-AL-KERNEL-KPANIC: YES X-AL-KERNEL-ActionableScore: 5 X-AL-KERNEL-ActionableScore-Lower: 4 X-AL-KERNEL-Commit: b187c976111960e6e54a6b1fff724f6e3d39406c List-Id: CVE: CVE-2025-39866 Priority: MODERATE 7.0 AL-KERNEL base severity: MODERATE KPANIC flag: YES Patch: fs: writeback: fix use-after-free in __mark_inode_dirty() [ Upstream Commit: b187c976111960e6e54a6b1fff724f6e3d39406c Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b187c976111960e6e54a6b1fff724f6e3d39406c Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2025-39866 Analysis date: Mon, 12 Oct 2026 21:24:02 -0400 ActionableScore: 5 ActionableScore lower bound: 4 Actionable bucket: Actionable Moderate / Strong Important candidate requiring manual review Manual review required: YES Summary: No one-sentence report phrase was found. ====================================================================== ABOUT THIS REPORT ====================================================================== The original Linux kernel CVE announcement for CVE-2025-39866 is available here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2025-39866 The original announcement does not normally provide a security severity estimate, CVSS assessment, or enough information to determine whether the reported kernel bug represents a practically relevant security issue. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. It combines an autonomous classifier with LLM-assisted technical analysis and a separate ActionableScore mechanism. The purpose of this report is to prioritize Linux kernel CVEs before manual review, identify cases that require prompt investigation, and support automatic closure of issues that are unlikely to have meaningful security impact. Published priority for this report: MODERATE 7.0 Manual review required: YES A detailed explanation of the methodology and priority rules is included at the end of this message. ====================================================================== AL-KERNEL CLASSIFICATION RESULT ====================================================================== CVE-2025-39866 MODERATE https://www.kernelcve.org/list/?q=CVE-2025-39866 CHECK WITH IMPACT FROM ORIG NN MODERATE | AEGIS IMPACT MODERATE_KPANIC AEGIS_AS=4 LEGACY=MODERATE_KPANIC RESULT=SAME (legacy and Aegis reconciliation agree; DECISION: both MODERATE_KPANIC) Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H';*CWE-416;CWE-362;CWE-667;Other CVSS 'AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H';BEST CVSS score: '7';DESCR 'A race in __mark_inode_dirty can retain a pointer to an old bdi_writeback while inode_switch_wbs_work_fn switches the inode to a new writeback context and releases the old object. A later call to wb_wakeup_delayed can dereference the freed object and cause a kernel use after free. The demonstrated impact is a local kernel crash, while reuse of the freed kernel object may potentially permit confidentiality or integrity impact and privilege escalation if an attacker can influence memory reuse. For the CVSS the PR:L value is used because a local user process can reach the dirty inode path through ordinary file writes, although reliable triggering also depends on concurrent writeback context switching. AC:H reflects the timing dependent race window. The issue is not directly network reachable. Impact is at least a local denial of service via kernel crash and in the worst case may include confidentiality and integrity compromise due to kernel memory corruption. Manual review is required to determine whether the freed bdi_writeback allocation can be reclaimed with attacker influenced data.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Actionable Moderate / Strong Important candidate requiring manual review (with actual score 5) MAYBE LOCK DISK RACE UAF HARDWARE LINUS KPANIC KPANIC INCREASED_TO_HIGH_BASED_ON_GUESSCVSS DECREASED_TO_MODERATE7_BASED_ON_FALSEPOSCHECKOFDH - - checked ====================================================================== ACTIONABLESCORE ANALYSIS ====================================================================== ActionableScore=5 ActionableScoreLower=4 PrimitiveClass=CLASS_B RealUAF=YES HostAdminRequired=UNKNOWN NamespaceScopedPrivilege=UNKNOWN ImportantCandidate=YES ManualReview=REQUIRED AutoDowngradeAllowed=NO RequiresHostUID0=UNKNOWN AuthorizationDecisionBypass=NO ProtectedResourceImpact=NONE B4PendingReview=NO B4PendingConfirmed=NO 1. ActionableScore * Raw conservative score: 4 * Conservative score: 4 * Raw paranoid score: 4 * Paranoid score: 5 * Paranoid REAL UAF FLOOR 5 applied: 4 -> 5 because the freed active `bdi_writeback` object is passed into nontrivial writeback wakeup processing rather than used only by a shallow cleanup dereference. * Final recommended bucket: **Actionable Moderate / Strong Important candidate requiring manual review**:: 2. Signal breakdown * +2 Real UAF. `inode_switch_wbs_work_fn()` can replace `inode->i_wb`, drop the final references through `wb_put_many()`, and release the old `bdi_writeback` before `__mark_inode_dirty()` finishes using it. * +1 Reliable kernel fault or strong DoS. The supplied trace demonstrates a fault in `__mark_inode_dirty()`, and the stale pointer subsequently reaches `wb_wakeup_delayed()`. * +1 Important filesystem path. The defect affects inode dirtying and writeback, including ordinary ext4 write processing. * +0 Local unprivileged trigger. An ordinary `write()` reaches one side of the race, but the evidence does not prove that an ordinary user can drive the complete writeback-switching sequence. * +0 Race penalty. No negative point is applied merely because this is a race. The report demonstrates the interleaving occurring in practice and does not establish that it is an exceptionally narrow one-shot race. * +0 Structured stale-object leverage. Not separately awarded because attacker-controlled reclaim, replacement contents, or useful control over fields consumed by `wb_wakeup_delayed()` is not established. * +0 Strong or weak LPE leverage. The concrete UAF is preserved, but no controlled reclaim, directed write, callback control, credential corruption, or privilege escalation chain is shown. * +0 Extra Availability. The same kernel fault is not counted twice. * +0 Confidentiality or Integrity. Neither disclosure nor attacker-directed modification is established. * +0 B5-R. There is no retry-accumulated heap OOB write. * +0 B3-PENDING. There is no demonstrated shared-backing write or COW ownership violation. * +0 B4-PENDING. No authorization decision changes from DENY to ALLOW. Repeated-release checks: * The worker can drop the final references and end the old `bdi_writeback` lifetime. * The stale `wb` reference survives in `__mark_inode_dirty()`. * The later operation is a dereference and call to `wb_wakeup_delayed()`, not a demonstrated second `put`, release, free, or refcount decrement on the same reference. * Concrete repeated release or refcount +1 was not awarded. * Paranoid repeated-refcount leverage +1 was not awarded. * FLOOR 5 was applied for active structured post-lifetime processing, not for repeated release. 3. Reachability analysis A local file write reaches `vfs_write()`, `file_modified()`, and ultimately `__mark_inode_dirty()`. Triggering the UAF additionally requires concurrent switching of the inode between writeback contexts and release of the old `bdi_writeback`. The supplied evidence does not establish whether an ordinary user can independently cause the complete switch-and-release sequence. It also does not prove that host-admin-equivalent privilege is required. Therefore `HostAdminRequired=UNKNOWN`. Cgroup writeback and writeback-context migration may involve cgroup configuration or delegation, but the relevant namespace and delegation checks are not supplied. The complete sequence cannot be classified as namespace-scoped, so `NamespaceScopedPrivilege=UNKNOWN`. No network trigger or special hardware prerequisite is established. The race occurred in a real workload, but attacker-controlled repeatability remains unresolved. 4. Primitive and severity interpretation The exact primitive is a real post-lifetime use of an active structured `bdi_writeback` object. The old object can be released by `cgwb_release()`, after which `__mark_inode_dirty()` reads through the stale pointer and invokes `wb_wakeup_delayed()` with it. This is not fixed stale storage and is not a cleanup-only destructor dereference. It occurs in the active inode dirtying path and passes the freed object into writeback wakeup processing. However, the evidence does not establish controlled reclaim, attacker-shaped replacement data, arbitrary read or write, callback hijacking, or privilege escalation. This is `CLASS_B`, not `CLASS_A`. The demonstrated consequence is a kernel fault and denial of service. Stronger exploitation is plausible enough to require inspection of `bdi_writeback` allocation reuse and the operations performed by `wb_wakeup_delayed()`, but it is not established. `ImportantCandidate=YES` reflects unresolved exploitation leverage in a non-cleanup active-object UAF. `AutoDowngradeAllowed=NO` prevents automatic closure before the stale workqueue and object-reuse behavior is examined. This does not independently prove Important severity. 5. One-sentence report phrase A race between inode dirtying and writeback-context switching can release an old bdi_writeback before wb_wakeup_delayed uses it, causing an active-object kernel use-after-free and a demonstrated local crash with unresolved post-reuse exploitation potential. 6. Manual review recommendation MANUAL CHECK REQUIRED Review `wb_wakeup_delayed()` field accesses, embedded workqueue state, `bdi_writeback` slab reuse, and whether a below-host-admin actor can repeatedly drive both sides of the race. 7. Call-site confidence Call-site confidence: medium ====================================================================== UPSTREAM PATCH SUMMARY ====================================================================== Patch: fs: writeback: fix use-after-free in __mark_inode_dirty() [ Upstream Commit: b187c976111960e6e54a6b1fff724f6e3d39406c Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b187c976111960e6e54a6b1fff724f6e3d39406c Changed files: fs/fs-writeback.c Diff excerpt: Not included in this email. See the upstream URL for the full patch. Full patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b187c976111960e6e54a6b1fff724f6e3d39406c ====================================================================== DETAILED REPORT METHODOLOGY ====================================================================== The original Linux kernel CVE announcement for CVE-2025-39866 can be found here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2025-39866 The original CVE announcement normally does not include a security-level estimate. In particular, it may not contain a CVSS assessment, an impact level, or enough information to determine whether the reported bug is a practically relevant security issue. One purpose of this parallel CVE list is to provide that missing technical and prioritization information. The original goal of the AL-KERNEL project was to prioritize Linux kernel CVE analysis automatically before manual review. The system can also help identify non-security issues that may be suitable for automatic closure. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. The first analysis stage combines an autonomous classifier with additional LLM-based analysis. The autonomous classifier runs locally on a CPU and is based on a backpropagation neural network. Together, these mechanisms produce a technical vulnerability description, identify likely weakness types, estimate CVSS severity, and provide input for ActionableScore. Two CVSS estimates are retained because incomplete kernel vulnerability information often permits more than one defensible interpretation: Conservative CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H The Best / paranoid CVSS score: 7 The conservative vector represents a lower-impact interpretation. The Best/paranoid vector intentionally represents a plausible upper-bound interpretation and should not automatically be treated as demonstrated real-world impact. CVSS may also need to be adjusted for a particular Linux deployment, because actual reachability, privileges, enabled kernel configuration, hardware, namespaces, exposed device nodes, and other environmental conditions can differ significantly between systems. A separate ActionableScore mechanism evaluates practical remediation urgency. Its analysis may include reachability, attack prerequisites, subsystem exposure, memory-corruption characteristics, denial-of-service reliability, and possible confidentiality, integrity, or privilege-escalation impact. Conservative ActionableScore: 4 Paranoid ActionableScore: 5 The final base severity is taken directly from the second tab-separated field of the AL-KERNEL classification result. ActionableScore does not replace or independently override that final AL-KERNEL decision, and if ActionableScore adjusted impact level of ALKERNEL, then you would see self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7. For an AL-KERNEL result of MODERATE, this report uses the following additional presentation split: ActionableScore below 5 -> MODERATE REGULAR ActionableScore 5 or more -> MODERATE 7.0 The distinction between MODERATE REGULAR and MODERATE 7.0 makes it possible to identify Moderate issues that should receive manual analysis and fixes before lower-priority MODERATE REGULAR issues. In many cases, MODERATE REGULAR fixes may wait for a later rebase or routine update. There is one override in which MODERATE REGULAR becomes MODERATE 7.0 even when the ActionableScore is below 5. When the AL-KERNEL result contains the KPANIC flag, a MODERATE result is always presented as MODERATE 7.0. The KPANIC flag selected with few regexps without usage of AI at all, so it helps to detect cases when Kernel Crash happens and similar (to filter False-Negative results from the LLM usage). KPANIC indicates that a reliable kernel crash, kernel panic, or similarly serious kernel availability impact was identified by the classification workflow. AL-KERNEL base severity for this report: MODERATE KPANIC detected for this report: YES Published priority for this report (same as in Subject): MODERATE 7.0 These results are intended to support engineering triage. They are machine-generated estimates, and cases marked for manual review should be validated by a human security engineer before final disposition. For more info read docs linked from here: https://kernelcve.org/ (and you can submit you own patch there to generate such a report for non-existant CVE-id yet). Note that in many cases this AI tool selects higher severity, than real is (means you can expect Importants instead of Moderate 7.0 or Moderates 7.0 instead of regular Moderates). If you see such cases, please use reply email interface to add additional manual analyses info to this particular CVE. And please, please, let me know when you see Lows instead of Importants or Important instead of Low (because particular for such cases I need to tune this AI tool to make it better for this one and next similar). My contact email for such notifications is alexanjelausa@gmail.com (and both send reply to CVE record itself too and see "reply" button below for howto reply).