mirror of
https://github.com/espressif/esp-idf.git
synced 2026-07-15 15:33:02 +03:00
TEE secure-service handlers had two bugs letting REE bypass pointer-region validation: 1. valid_addr = instead of valid_addr &= in AEAD encrypt/decrypt and DS sign handlers, clobbering prior failed checks. Impact: REE writes to TEE DRAM via DS signature output, or reads TEE DRAM via AEAD output. 2. data->rsa_length dereferenced before data is validated in DS sign and DS start_sign handlers. Fix: use &= for subsequent checks, add early return after initial data pointer check in DS handlers.