fix(core): fix FLASH region overflow on T2T1
What changed, and why it matters
This commit changes how a memory buffer section named .buf is handled during the build process for the Trezor Model T (T2T1) hardware wallet. By marking it as NOLOAD, the linker no longer includes this uninitialized buffer in the firmware image file, which prevents the firmware from exceeding its allowed flash storage region. This is a build/linker fix that avoids a firmware size overflow; it does not by itself appear to be an exploitable vulnerability, but overflowing a flash region could in some cases cause build failures, boot issues, or undefined behavior if an oversized image were written to the device.
Treat as a reliability/build-fix commit rather than a security patch. Verify that firmware builds for T2T1 now fit within the allocated FLASH region and that runtime behavior of the .buf section is unchanged (RAM is still allocated correctly). No urgent security response is indicated based solely on this diff, but monitor issue #7792 for any additional context.
Security signals we found
Linker script change affecting firmware image size and memory layout
FLASH region overflow prevented by excluding uninitialized RAM buffer from firmware image
Issue #7792 referenced but no security advisory language in commit
NOLOAD attribute correctly applied to uninitialized RAM section
Evidence from the diff
The patch modifies core/embed/sys/linker/stm32f4/firmware.ld, changing the .buf section declaration from ‘.buf : ALIGN(4)’ to ‘.buf (NOLOAD) : ALIGN(4)’. The .buf section is placed in AUX1_RAM and contains uninitialized/global buffers. Without NOLOAD, the linker reserves space in the firmware image (FLASH) for this section’s contents even though the section is loaded into RAM. On T2T1, this caused the firmware image to exceed its allocated FLASH region. Marking it NOLOAD tells the linker not to emit initialized content for this section into the firmware binary, reducing image size and preventing the region overflow. The fix is consistent with how uninitialized RAM sections should be handled.
Changed components
core/embed/sys/linker/stm32f4/firmware.ldTrezor Model T (T2T1) firmware linker configuration.buf section in AUX1_RAMInspect captured patch +1 / −1
### core/embed/sys/linker/stm32f4/firmware.ld
@@ -65,7 +65,7 @@ SECTIONS {
. = ALIGN(4);
} >AUX1_RAM
- .buf : ALIGN(4) {
+ .buf (NOLOAD) : ALIGN(4) {
*(.buf*);
. = ALIGN(4);
} >AUX1_RAMWhy this scored 44/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.