From mboxrd@z Thu Jan 1 00:00:00 1970 From: AL-KERNEL To: kernel-cve@kernelcve.org Subject: [CVE-2026-31656][MODERATE 7.0] drm/i915/gt: fix refcount underflow in intel_engine_park_heartbeat Date: Thu, 30 Jul 2026 13:11:30 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AL-KERNEL-CVE: CVE-2026-31656 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: 7 X-AL-KERNEL-ActionableScore-Lower: 4 X-AL-KERNEL-Commit: 70d3e622b10092fc483e28e57b4e8c49d9cc7f68 List-Id: CVE: CVE-2026-31656 Priority: MODERATE 7.0 AL-KERNEL base severity: MODERATE KPANIC flag: YES Patch: drm/i915/gt: fix refcount underflow in intel_engine_park_heartbeat Commit: 70d3e622b10092fc483e28e57b4e8c49d9cc7f68 Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=70d3e622b10092fc483e28e57b4e8c49d9cc7f68 Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-31656 Analysis date: Thu, 30 Jul 2026 13:11:30 -0400 ActionableScore: 7 ActionableScore lower bound: 4 Actionable bucket: Strong Important candidate / Actionable Moderate at minimum Manual review required: YES Summary: A race between the i915 heartbeat worker and engine park path can double-put the same heartbeat request, causing refcount underflow and possible use-after-free, with local DoS impact and plausible but unproven privilege-escalation risk on systems exposing i915 GPU device access. ====================================================================== ABOUT THIS REPORT ====================================================================== The original Linux kernel CVE announcement for CVE-2026-31656 is available here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-31656 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-2026-31656 MODERATE CHECK WITH IMPACT FROM ORIG NN MODERATE 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-362;*CWE-416;CWE-911;Other CVSS 'AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H';BEST CVSS score: '7';DESCR 'A race in drm/i915 heartbeat handling can make the heartbeat worker and intel_engine_park_heartbeat take the same engine heartbeat systole request and call i915_request_put on it twice. This can cause a refcount underflow and a possible use after free of an i915_request object, with observed failures in refcount_warn_saturate during engine park or request retirement. For the CVSS the PR:L is used because a local user with access to i915 render or GPU device nodes may be able to submit GPU work and influence request retirement without full administrator privileges. The issue is not network reachable and requires a timing window between the heartbeat worker and engine park path, so AC:H is used. Impact is at least a local denial of service via kernel warning or crash and in the paranoid case may allow confidentiality and integrity impact due to kernel memory lifetime corruption.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Strong Important candidate / Actionable Moderate at minimum (with actual score 6) SKIP CVE-2026-31656 SKIP No affected files built, so skip this CVE NO - - unknown MAYBE OOB RACE UAF HARDWARE KPANIC - - checked ====================================================================== ACTIONABLESCORE ANALYSIS ====================================================================== ActionableScoreLower=4 ActionableScore=7 ## 1. ActionableScore * Conservative score: **4** * Paranoid score: **7** * Final recommended bucket: **Strong Important candidate / Actionable Moderate at minimum**:: ## 2. Signal breakdown Conservative signals: * **Local unprivileged trigger: +1**. On typical desktop or workstation systems, i915 render nodes may be reachable by non-root local users through DRM/GPU access. * **Memory corruption, weak race-UAF primitive: +1**. The patch describes a race where the same `i915_request` can be put twice, causing refcount underflow and possible UAF, but no controlled reclaim or overwrite primitive is shown. * **Real lifetime corruption: +1**. This is an object lifetime bug involving double `i915_request_put()` on `engine->heartbeat.systole`. * **Reliable kernel crash / strong DoS: +1**. The trace shows `refcount_warn_saturate()` in the affected path, and the bug can plausibly lead to warning, crash, or corrupted request lifetime state. * **Broad/default/common subsystem: +1**. Intel i915 is a widely deployed GPU driver on Linux client and some server systems. * **Hard or unreliable race: -1**. Triggering requires a timing window between heartbeat work, request completion or retirement, and engine parking. Paranoid additional signals: * **Memory corruption, strong corruption primitive adjustment: +1 over conservative**. Refcount underflow on a kernel request object can become more serious than a plain invalid dereference if object lifetime reuse is reachable. * **Weak LPE concern: +1**. Privilege escalation is not demonstrated, but refcount abuse in a kernel GPU request object is a manual-review class because request lifetime and GPU submission are partly user-influenced. * **GPU object API lifetime control: +1**. DRM/i915 users can shape GPU workloads and request lifecycle enough to make this more actionable than an internal-only worker race. Call-site confidence: **high**. The provided patch shows both racing paths and the lifetime operation being fixed with `xchg()`. ## 3. Reachability analysis The realistic trigger is local, not network-reachable. A local user with access to i915 DRM render or GPU device nodes may be able to submit GPU work and influence request completion, retirement, and heartbeat activity without full root privileges. Namespaces do not provide a direct network-style trigger, but container or sandbox environments that expose `/dev/dri/renderD*` could lower practical privilege requirements. The affected code path is common on systems using Intel i915 with heartbeat or hangcheck behavior enabled. Exploitation still requires winning a race between the heartbeat worker and engine park path, so reliability is not assumed. ## 4. Severity interpretation This should not be treated as an ordinary low-priority DoS-only bug. Conservatively, it is a local race leading to refcount underflow and possible UAF with likely availability impact, so manual review is recommended even if practical exploitation is hard. Paranoid triage can justify Important-candidate handling because the bug is a real kernel object lifetime corruption in a broadly deployed GPU driver, reachable from local GPU workloads, with potential but unproven LPE implications. Theoretical memory corruption potential is clear. Realistic privilege escalation evidence is not demonstrated in the patch. ## 5. One-sentence report phrase A race between the i915 heartbeat worker and engine park path can double-put the same heartbeat request, causing refcount underflow and possible use-after-free, with local DoS impact and plausible but unproven privilege-escalation risk on systems exposing i915 GPU device access. ## 6. Manual review recommendation **MANUAL CHECK REQUIRED** Reason: this is a local race with refcount underflow and possible UAF in a widely deployed kernel GPU driver, not a simple NULL dereference or resource leak. The patch does not prove an LPE primitive, but the object lifetime corruption is significant enough to avoid auto-close. ====================================================================== UPSTREAM PATCH SUMMARY ====================================================================== Patch: drm/i915/gt: fix refcount underflow in intel_engine_park_heartbeat Commit: 70d3e622b10092fc483e28e57b4e8c49d9cc7f68 Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=70d3e622b10092fc483e28e57b4e8c49d9cc7f68 Commit description: A use-after-free / refcount underflow is possible when the heartbeat worker and intel_engine_park_heartbeat() race to release the same engine->heartbeat.systole request. The heartbeat worker reads engine->heartbeat.systole and calls i915_request_put() on it when the request is complete, but clears the pointer in a separate, non-atomic step. Concurrently, a request retirement on another CPU can drop the engine wakeref to zero, triggering __engine_park() -> intel_engine_park_heartbeat(). If the heartbeat timer is pending at that point, cancel_delayed_work() returns true and intel_engine_park_heartbeat() reads the stale non-NULL systole pointer and calls i915_request_put() on it again, causing a refcount underflow: ``` <4> [487.221889] Workqueue: i915-unordered engine_retire [i915] <4> [487.222640] RIP: 0010:refcount_warn_saturate+0x68/0xb0 ... <4> [487.222707] Call Trace: <4> [487.222711] <4> [487.222716] intel_engine_park_heartbeat.part.0+0x6f/0x80 [i915] <4> [487.223115] intel_engine_park_heartbeat+0x25/0x40 [i915] <4> [487.223566] __engine_park+0xb9/0x650 [i915] <4> [487.223973] ____intel_wakeref_put_last+0x2e/0xb0 [i915] <4> [487.224408] __intel_wakeref_put_last+0x72/0x90 [i915] <4> [487.224797] intel_context_exit_engine+0x7c/0x80 [i915] <4> [487.225238] intel_context_exit+0xf1/0x1b0 [i915] <4> [487.225695] i915_request_retire.part.0+0x1b9/0x530 [i915] <4> [487.226178] i915_request_retire+0x1c/0x40 [i915] <4> [487.226625] engine_retire+0x122/0x180 [i915] <4> [487.227037] process_one_work+0x239/0x760 <4> [487.227060] worker_thread+0x200/0x3f0 <4> [487.227068] ? __pfx_worker_thread+0x10/0x10 <4> [487.227075] kthread+0x10d/0x150 <4> [487.227083] ? __pfx_kthread+0x10/0x10 <4> [487.227092] ret_from_fork+0x3d4/0x480 <4> [487.227099] ? __pfx_kthread+0x10/0x10 <4> [487.227107] ret_from_fork_asm+0x1a/0x30 <4> [487.227141] ``` Fix this by replacing the non-atomic pointer read + separate clear with xchg() in both racing paths. xchg() is a single indivisible hardware instruction that atomically reads the old pointer and writes NULL. This guarantees only one of the two concurrent callers obtains the non-NULL pointer and performs the put, the other gets NULL and skips it. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/15880 Fixes: 058179e ("drm/i915/gt: Replace hangcheck by heartbeats") Cc: # v5.5+ Signed-off-by: Sebastian Brzezinka Reviewed-by: Krzysztof Karas Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/d4c1c14255688dd07cc8044973c4f032a8d1559e.1775038106.git.sebastian.brzezinka@intel.com (cherry picked from commit 13238dc ) Signed-off-by: Joonas Lahtinen Signed-off-by: Greg Kroah-Hartman Changed files: drivers/gpu/drm/i915/gt/intel_engine_heartbeat.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=70d3e622b10092fc483e28e57b4e8c49d9cc7f68 ====================================================================== DETAILED REPORT METHODOLOGY ====================================================================== The original Linux kernel CVE announcement for CVE-2026-31656 can be found here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-31656 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:L/I:L/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: 7 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).