AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 65 Bitcoin

fix(core): validate unprivileged task psp

Public commit record

What the developer wrote

Authored by cepetr

57/100 · Thin
fix(core): validate unprivileged task psp

[no changelog]
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds a safety check inside the Trezor hardware wallet's core task scheduler. Before saving a task's state during a context switch, the operating system now verifies that the task's stack pointer points to a valid location within its assigned stack. Without this check, a malicious or buggy unprivileged task could set its stack pointer outside its stack, causing the kernel to overwrite sensitive memory (including other tasks' data or kernel structures) when saving registers. The fix detects this and kills the offending task instead.

Recommended action

Treat as a security fix. Review whether similar validation is needed for other context-switch paths or architectures, and consider whether the static 'Invalid PSP' message and __LINE__ reporting provide adequate logging. Because the commit has no changelog entry, verify it is included in release notes and backported to affected firmware branches.

Security signals we found

01

Kernel writes to user-controlled pointer without bounds validation (pre-patch)

02

Privilege escalation / memory corruption via forged PSP in unprivileged task

03

Addition of explicit PSP range validation before context save

04

Task termination on validation failure

05

Kernel task exempted from check (MSP path)

06

No changelog entry despite security-relevant fix

Risk score

Why this scored 65/100

Our methodology →
Potential impact 22/30
Exploitability 14/25
Stealth signal 8/15
Affected reach 10/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.