BUG: soft lockup in futex_time32

Status: moderation: reported on 2026/12/04 16:36
Subsystems: kernel
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+77e14870ffc200ed2f86@syzkaller.appspotmail.com
First crash: 4d01h, last: 4d01h
✨ AI cause bisection: inconclusive (AI job)
✨ AI-generated root cause summary:

CPU#1 hits a soft lockup spinning in futex_wake() -> _raw_spin_lock(&hb->lock) on a private futex hash bucket (tickets.owner = 0xa1, tickets.next = 0xa2), indicating CPU#0 acquired &hb->lock and never released it. CPU#0 fails to respond to IPI_CPU_BACKTRACE (which is a regular IRQ on ARM32 Versatile Express), meaning CPU#0 has hard IRQs disabled while holding &hb->lock, so its exact hang stack is missing from the report and the ultimate trigger remains inconclusive. Auditing all futex paths under hb->lock and raw_spin_lock_irq revealed no direct hb->lock self-deadlock or IRQ-disabled infinite loop, though it did uncover atomic-context violations where __futex_unlock_pi(), requeue_pi_wake_futex(), and exit_pi_state_list() call futex_private_hash()/futex_hash() -> futex_pivot_hash() (which takes sleeping mutex &mm->futex.phash.lock and hb_old->lock) while holding spinlocks and/or with IRQs disabled.

▶ ▼ ✨ Full AI root cause analysis
Based on kernel commit fe6ff8d5d675:

Crash Site and Observed State

The watchdog soft lockup triggers on CPU#1 (syz.4.3583, PID 19805) on a 2-CPU ARMv7 Versatile Express system (CONFIG_PREEMPT=y, CONFIG_SMP=y, CONFIG_FUTEX=y, CONFIG_FUTEX_PI=y, CONFIG_FUTEX_PRIVATE_HASH=y, with CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_ATOMIC_SLEEP, and CONFIG_PROVE_LOCKING disabled):

  • Stall location: futex_wake() (kernel/futex/waitwake.c:205) calling spin_lock(&hb->lock) -> _raw_spin_lock() (kernel/locking/spinlock.c:173) -> arch_spin_lock() (arch/arm/include/asm/spinlock.h:74).
  • Syscall context: sys_futex_time32(uaddr=0x003562f4, op=0x81 /* FUTEX_WAKE | FUTEX_PRIVATE_FLAG */, val=0xf4240) on a private futex address in syz-executor's own BSS.
  • Ticket lock state:
    • r9 = 0x8797d900 (struct futex_hash_bucket *hb)
    • r4 = 0x8797d904 (&hb->lock)
    • r3 = 0x000000a1 (tickets.owner)
    • r2 = 0x000000a2 (tickets.next)
    • CPU#1 holds ticket 0xa2 and has been spinning for 430s waiting for the single current owner (CPU#0, holding ticket 0xa1) to release &hb->lock.
  • Unresponsive holder (CPU#0): CPU#1 triggers IPI_CPU_BACKTRACE (arch/arm/kernel/smp.c:835) to CPU#0, which fails to respond after 10 seconds. Because IPI_CPU_BACKTRACE on ARM32 Versatile Express is a standard IRQ rather than a true NMI (arch/arm/kernel/smp.c:661-665), CPU#0 must have hard IRQs disabled (PSR.I = 1) while still holding &hb->lock.

Because CPU#0 never responded to IPI_CPU_BACKTRACE, its call stack is absent from the report.


Verified Findings and Checked Invariants

  1. No 2-CPU spinlock ABBA with CPU#1: CPU#1 entered futex_wake() directly from userspace holding no spinlocks and waits solely on &hb->lock with IRQs enabled. Thus CPU#0 cannot be deadlocked waiting on a lock held by CPU#1; CPU#0 must be either self-deadlocked, stuck in a non-terminating IRQ-disabled loop while holding hb->lock, or wedged inside a hardirq handler that interrupted CPU#0 while it held hb->lock.

  2. Verified CONFIG_FUTEX_PRIVATE_HASH atomic-context locking defects: In kernel/futex/core.c, futex_private_hash() (kernel/futex/core.c:239-264) and futex_hash() (kernel/futex/core.c:266-280) call futex_pivot_hash() (kernel/futex/core.c:226-237) whenever futex_private_hash_get(fph) returns false (meaning a private hash replacement is pending and the old fph is in FR_ATOMIC with mm->futex.phash.atomic == 0). futex_pivot_hash() acquires mutex_lock(&mm->futex.phash.lock) (a sleeping mutex) and calls __futex_pivot_hash() -> futex_rehash_private(), which takes spin_lock(&hb_old->lock) across all buckets of fph.

    Three futex paths invoke these functions from atomic/spinlock/IRQ-disabled contexts:

    • __futex_unlock_pi() (kernel/futex/pi.c:1276-1277) calls futex_private_hash(key.private.mm) while holding spin_lock(&hb->lock) and raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock) (IRQs disabled).
    • requeue_pi_wake_futex() (kernel/futex/requeue.c:252-253), called from futex_proxy_trylock_atomic() and futex_requeue() (kernel/futex/requeue.c:669), calls futex_private_hash(key->private.mm) while holding both hb1->lock and hb2->lock.
    • exit_pi_state_list() (kernel/futex/core.c:1381) invokes CLASS(hbr, hbr)(&key) -> futex_hash(&key) inside raw_spin_lock_irq(&curr->pi_lock) (IRQs disabled), despite guard(private_hash)(current->mm) on line 1369 (which returns NULL if no private hash existed yet when exit_pi_state_list() started).
  3. Hypotheses checked and ruled out for a direct CPU#0 hb->lock self-deadlock / loop:

    • Self-deadlock via futex_private_hash() -> futex_rehash_private(): In __futex_unlock_pi() and futex_requeue(), CLASS(hbr, hbr) already pins the current fph unless hbr.fph == NULL (global hash was in use before any private hash allocation). In that hbr.fph == NULL case, hb is a global hash bucket (&futex_queues[...]), whereas futex_rehash_private() only locks buckets in fph (old->queues[]), so hb->lock itself is not recursively acquired. Furthermore, blocking on &mm->futex.phash.lock in schedule() would context-switch rather than spin CPU#0 indefinitely with IRQs disabled.
    • PI futex / rt_mutex paths under hb->lock + raw_spin_lock_irq: Inspected attach_to_pi_state(), attach_to_pi_owner(), __attach_to_pi_owner(), pi_state_update_owner(), wake_futex_pi(), __fixup_pi_state_owner(), fixup_pi_owner(), futex_lock_pi(), __futex_unlock_pi() (kernel/futex/pi.c), futex_requeue() (kernel/futex/requeue.c), futex_wake() / futex_wait_multiple_setup() (kernel/futex/waitwake.c), futex_parse_waitv() / do_futex() (kernel/futex/syscalls.c), io_uring/futex.c, rt_mutex_start_proxy_lock() / __rt_mutex_start_proxy_lock() / rt_mutex_proxy_unlock() (kernel/locking/rtmutex_api.c), task_blocks_on_rt_mutex() / rt_mutex_adjust_prio_chain() (kernel/locking/rtmutex.c), and arch/arm/include/asm/futex.h. Checked futex_q::wake callbacks (futex_wake_mark, io_futex_wake_fn, io_futex_wakev_fn). None of these paths contain an unconditional self-deadlock on hb->lock or an unbounded IRQ-disabled loop while holding hb->lock.

What Remains Inconclusive

Without CPU#0's stack trace (lost because CPU#0 had IRQs disabled and could not service IPI_CPU_BACKTRACE), it cannot be definitively determined from this report alone what wedged CPU#0 with IRQs disabled after it acquired &hb->lockβ€”whether it was interrupted by a misbehaving hardirq while holding hb->lock, hit a race/corruption outside hb->lock, or encountered an indirect consequence of the atomic-context mutex_lock(&mm->futex.phash.lock) violations in __futex_unlock_pi() / requeue_pi_wake_futex() / exit_pi_state_list().

▶ ▼ ✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
5dfba70b bisect-cause IsRelease: ❌ ❓ BUG: soft lockup in futex_time32 2026/11/30 16:07 2026/11/30 16:07 2026/11/30 16:56 ba8e13b2
286fd6bb assessment-security DenialOfService: βœ… Exploitable: ❌ FilesystemTrigger: ❌ FuzzingArtifact: ❌ MemoryCorruption: ❌ NetworkNeedsSetup: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: βœ… UserNamespace: βœ… VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ BUG: soft lockup in futex_time32 2026/11/30 15:51 2026/11/30 15:51 2026/11/30 16:30 ba8e13b2
▶ ▼ Similar bugs (1)
Kernel Title Rank πŸ›ˆ Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in futex_time32 kernel 1 1 353d 353d 0/30 auto-obsoleted due to no activity on 2026/03/15 17:08

Sample crash report:
wireguard: wg1: Handshake for peer 23 (127.0.0.1:20003) did not complete after 5 seconds, retrying (try 9)
net_ratelimit: 18 callbacks suppressed
wireguard: wg2: Sending keepalive packet to peer 24 ([::1]:20001/0%0)
watchdog: BUG: soft lockup - CPU#1 stuck for 430s! [syz.4.3583:19805]
Modules linked in:
CPU: 1 UID: 0 PID: 19805 Comm: syz.4.3583 Not tainted syzkaller #0 PREEMPT 
Hardware name: ARM-Versatile Express
PC is at arch_spin_lock arch/arm/include/asm/spinlock.h:74 [inline]
PC is at do_raw_spin_lock include/linux/spinlock.h:188 [inline]
PC is at __raw_spin_lock include/linux/spinlock_api_smp.h:191 [inline]
PC is at _raw_spin_lock+0x40/0x58 kernel/locking/spinlock.c:173
LR is at get_lock_parent_ip include/linux/ftrace.h:1184 [inline]
LR is at preempt_latency_start kernel/sched/core.c:6066 [inline]
LR is at preempt_count_add+0x12c/0x150 kernel/sched/core.c:6096
pc : [<81c25624>]    lr : [<80293b5c>]    psr: 80000013
sp : dfae5ea8  ip : dfae5e80  fp : dfae5ebc
r10: 00000000  r9 : 8797d900  r8 : dfae5ec8
r7 : ffffffff  r6 : 00000000  r5 : 000f4240  r4 : 8797d904
r3 : 000000a1  r2 : 000000a2  r1 : 00000000  r0 : 00000000
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 30c5387d  Table: 88db1180  DAC: 00000000
Call trace: 
[<81c255e4>] (_raw_spin_lock) from [<8036102c>] (spin_lock include/linux/spinlock.h:347 [inline])
[<81c255e4>] (_raw_spin_lock) from [<8036102c>] (futex_wake+0x160/0x25c kernel/futex/waitwake.c:205)
 r5:000f4240 r4:00000001
[<80360ecc>] (futex_wake) from [<8035d9cc>] (do_futex+0x194/0x1d0 kernel/futex/syscalls.c:138)
 r10:000000f0 r9:00000001 r8:83d93fc0 r7:000f4240 r6:003562f4 r5:00000081
 r4:000f4240
[<8035d838>] (do_futex) from [<8035e2a0>] (__do_sys_futex_time32 kernel/futex/syscalls.c:524 [inline])
[<8035d838>] (do_futex) from [<8035e2a0>] (sys_futex_time32+0x11c/0x1bc kernel/futex/syscalls.c:507)
 r4:00000000
[<8035e184>] (sys_futex_time32) from [<80200060>] (ret_fast_syscall+0x0/0x1c arch/arm/mm/proc-v7.S:67)
Exception stack(0xdfae5fa8 to 0xdfae5ff0)
5fa0:                   00139c28 ffffffff 003562f4 00000081 000f4240 00000000
5fc0: 00139c28 ffffffff 76fca7d4 000000f0 00340000 00000000 00000001 76fca0dc
5fe0: 76fc9f38 76fc9f28 00022bf4 00138890
 r9:83d93fc0 r8:8020029c r7:000000f0 r6:76fca7d4 r5:ffffffff r4:00139c28
Sending NMI from CPU 1 to CPUs 0:
After 10 seconds, these CPUS still haven't responded to the NMI: 0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/30 15:51 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux master fe6ff8d5d675 f1f6b8bf .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm32 BUG: soft lockup in futex_time32
* Struck through repros no longer work on HEAD.