---
id: CVE-2026-89759
title: 'mm/kmemleak: avoid soft lockup when scanning task stacks'
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  mm/kmemleak: avoid soft lockup when scanning task stacks

  Patch series "mm/kmemleak: avoid soft lockup when scanning task", v3.

  kmemleak_scan() scans every task stack …
severity: medium
cvss: 5.5
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'
cvssSource: vendor
cwe:
  - CWE-1050
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 <
    f1cd6c4c35243377882c47236281d03ee3be6eeb
  - >-
    Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 <
    9a1b12c06c192290b8479de48f66f1e75d89c4b7
  - >-
    Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 <
    3fc8044251de21555fb02c365fa681bab8b0db55
  - >-
    Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 <
    1838c704bcb4fd3556cf67513c6f97a39099e35c
  - >-
    Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 <
    5d10d4e19e6daa487f0cd0ea6cba472325de92f9
  - Linux 5.10
published: '2026-09-11'
updated: '2026-10-21'
sourceUpdated: '2026-10-21T12:48:36.907Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-89759'
references:
  - url: 'https://git.kernel.org/stable/c/f1cd6c4c35243377882c47236281d03ee3be6eeb'
  - url: 'https://git.kernel.org/stable/c/9a1b12c06c192290b8479de48f66f1e75d89c4b7'
  - url: 'https://git.kernel.org/stable/c/3fc8044251de21555fb02c365fa681bab8b0db55'
  - url: 'https://git.kernel.org/stable/c/1838c704bcb4fd3556cf67513c6f97a39099e35c'
  - url: 'https://git.kernel.org/stable/c/5d10d4e19e6daa487f0cd0ea6cba472325de92f9'
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-89759.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-89759'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2532495'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-89759'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-89759'
  - url: >-
      https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-89759.mbox
tags:
  - cve.org
  - csaf
  - vex
  - red-hat
epss: 0.00192
epssPercentile: 0.08796
ingestedAt: '2026-09-14T11:11:19.884Z'
---

## Overview

In the Linux kernel, the following vulnerability has been resolved:

mm/kmemleak: avoid soft lockup when scanning task stacks

Patch series "mm/kmemleak: avoid soft lockup when scanning task", v3.

kmemleak_scan() scans every task stack under one rcu_read_lock() with no
reschedule point, which can trip the soft lockup watchdog on hosts with
very many threads.

That prints the following message, depending on the workload+host
configuration:

      watchdog: BUG: soft lockup - CPU#35 stuck for 22s! [kmemleak:537]
       scan_block
       kmemleak_scan
       kmemleak_scan_thread
       kthread

Patch 1 walks the tasks with find_ge_pid() so the scan reschedules between
tasks

Patches 2-3 let the scan loops stop early once a scan is interrupted.


This patch (of 3):

kmemleak_scan() walks every thread and scans its kernel stack under a
single rcu_read_lock() with no reschedule point.  On a host with very many
threads -- amplified by KASAN/lockdep in debug builds -- this loop can hog
a CPU long enough to trip the soft lockup watchdog:

  watchdog: BUG: soft lockup - CPU#35 stuck for 22s! [kmemleak:537]
   scan_block
   kmemleak_scan
   kmemleak_scan_thread
   kthread

A cond_resched() cannot be added directly: the loop runs inside an RCU
read-side critical section.

Walk the tasks one PID at a time with find_ge_pid(), taking the RCU read
lock only to look up and pin each task.  The stack is then scanned with no
lock held, so cond_resched() runs between tasks and the scan stops early
on scan_should_stop().  This follows the next_tgid()/task_seq_get_next()
iteration pattern and keeps each RCU critical section short.

## Affected

- `Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 < f1cd6c4c35243377882c47236281d03ee3be6eeb`
- `Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 < 9a1b12c06c192290b8479de48f66f1e75d89c4b7`
- `Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 < 3fc8044251de21555fb02c365fa681bab8b0db55`
- `Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 < 1838c704bcb4fd3556cf67513c6f97a39099e35c`
- `Linux >= c4b28963fd79457315783b3b0f21c01eb88cfdc1 < 5d10d4e19e6daa487f0cd0ea6cba472325de92f9`
- `Linux 5.10`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **Red Hat VEX** · Low · affected: Red Hat Enterprise Linux 10, Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, Red Hat OpenShift Container Platform 4 · no fix planned: Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 10, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, … · updated 2026-09-15 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-89759.json)
