feat(core): increase number of unprivileged tasks
What changed, and why it matters
This commit changes a single internal constant so the device can keep track of one extra background process when the optional app-loading feature is enabled. By itself it does not look like a security fix or vulnerability; it appears to be a straightforward capacity increase for a new feature.
No security action required; review the broader app-loading feature for correct task isolation and resource accounting.
Security signals we found
No security-relevant signals in the diff
Change is a compile-time constant adjustment gated by a feature macro
Evidence from the diff
The patch conditionally raises SYSTASK_MAX_TASKS from 2 to 3 when USE_APP_LOADING is defined. The comment already listed three logical tasks (firmware, coreapp, user app), so the change simply aligns the array/ID limit with the documented design when app loading is compiled in. There is no buffer overflow, no privilege change, and no logic change in the diff.
Changed components
core/embed/sys/task/inc/sys/systask.hInspect captured patch +4 / −0
diff --git a/core/embed/sys/task/inc/sys/systask.h b/core/embed/sys/task/inc/sys/systask.h
index 17866ded..8f68f8b1 100644
--- a/core/embed/sys/task/inc/sys/systask.h
+++ b/core/embed/sys/task/inc/sys/systask.h
@@ -116,7 +116,11 @@ typedef void (*systask_error_handler_t)(const systask_postmortem_t* pminfo);
* 2. coreapp
* 3. user app
*/
+#ifdef USE_APP_LOADING
+#define SYSTASK_MAX_TASKS 3
+#else
#define SYSTASK_MAX_TASKS 2
+#endif
/** Zero-based task ID (up SYSTASK_MAX_TASKS - 1) */
typedef uint8_t systask_id_t;
Why this scored 11/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.