Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

OP-TEE/optee_os
master @ b9436f3
320
Fixes
0
CVEs
CRITICAL
Peak severity
20.0%
Coverage
Highlights
Integer Overflow: 44 prior fixes. Scrutinize any change in this area.
core/arch/arm/kernel/thread.c: most-fixed (17 issues). Treat as high-risk during review.
241 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Integer Overflow: Numerous fixes address unchecked arithmetic on untrusted sizes (ELF headers, attribute counts, page counts) leading to undersized allocations and memory corruption. This is the most frequent vulnerability class with the highest potential for code execution.
Buffer Overflow: Multiple RSA decrypt/encrypt paths lacked output-buffer length validation, allowing out-of-bounds writes when hardware reports a larger decrypted size than the caller's buffer. This is a recurring pattern across different crypto drivers.
Use-After-Free: Session and shared-memory object lifetime management is error-prone: fixes address races where a session pointer or mobj is used after its reference count drops to zero, enabling kernel memory corruption or privilege escalation.