feat(core): introduce TS_ACCES error code
What changed, and why it matters
This commit simply adds a new error code constant named TS_EACCES (matching the standard Unix 'permission denied' code EACCES) to the Trezor firmware's internal error-handling library. It only defines the constant and its string representation; no code actually uses it yet. There is no functional change to device behavior and no security fix or vulnerability present in the diff.
No security action needed. Treat as routine code maintenance. If reviewing for security, verify that future commits using TS_EACCES handle permission failures safely (e.g., fail closed, do not leak sensitive state).
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds a new status code TS_EACCES via ts_make(EACCES) in core/embed/rtl/inc/rtl/error_handling.h and a corresponding string mapping ‘EACCES’ in core/embed/rtl/error_handling.c. It is a pure enum/constant addition with no call sites, no logic changes, and no behavioral impact. The commit message is a feature commit marked [no changelog].
Changed components
core/embed/rtl/error_handling.ccore/embed/rtl/inc/rtl/error_handling.hInspect captured patch +3 / −0
diff --git a/core/embed/rtl/error_handling.c b/core/embed/rtl/error_handling.c
index 5d62fa19..521e9edb 100644
--- a/core/embed/rtl/error_handling.c
+++ b/core/embed/rtl/error_handling.c
@@ -48,6 +48,8 @@ const char *ts_string(ts_t status) {
return "EIO";
} else if (ts_eq(status, TS_EBADMSG)) {
return "EBADMSG";
+ } else if (ts_eq(status, TS_EACCES)) {
+ return "EACCES";
// Trezor-specific error codes
} else if (ts_eq(status, TS_ENOINIT)) {
return "ENOINIT";
diff --git a/core/embed/rtl/inc/rtl/error_handling.h b/core/embed/rtl/inc/rtl/error_handling.h
index a23a53c1..79e88b4b 100644
--- a/core/embed/rtl/inc/rtl/error_handling.h
+++ b/core/embed/rtl/inc/rtl/error_handling.h
@@ -45,6 +45,7 @@ typedef struct {
#define TS_ETIMEDOUT ts_make(ETIMEDOUT)
#define TS_EIO ts_make(EIO)
#define TS_EBADMSG ts_make(EBADMSG)
+#define TS_EACCES ts_make(EACCES)
/** List of Trezor-specific error codes with offset from 2000 to avoid mixing
* with standard errno codes */
Why this scored 15/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.