Reducing stack memory consumption
- Dominant language
- C
- Stars
- 108
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Description
### Description
When using the mbedtls library on certain embedded platforms, a stack-allocated buffer (`buf` in `mbedtls_rsa_rsassa_pss_verify_ext`) provokes a stack overflow. The platform in question is LittleKernel running on ARM, where we unfortunately don't have the option of increasing the stack alotted to the kernel. Changing the `buf` variable to have static storage duration resolves this, but then the function becomes thread un-safe which is not desirable.
### Issue request type
[ ] Question
[x] Enhancement
[ ] Bug
Contributor guide
Research direction
Start at mbedtls_rsa_rsassa_pss_verify_ext and inspect how its stack-allocated buf contributes to overflow on LittleKernel running on ARM. Determine a thread-safe way to reduce stack consumption without static shared storage, then verify the RSA-PSS verification behavior on the affected platform. Note that development has moved to Mbed TLS and this repository receives no further updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cryptography, embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100