mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(bitscrambler): reject malformed program headers
Validate BitScrambler program headers against the supported format and hardware limits before using header-derived instruction and LUT sizes. Also add regression coverage for malformed headers and document that the program blob must come from a trusted assembler output.
This commit is contained in:
@@ -70,6 +70,11 @@ void bitscrambler_free(bitscrambler_handle_t handle);
|
||||
/**
|
||||
* @brief Load a BitScrambler binary program into BitScrambler memory
|
||||
*
|
||||
* @note The program blob is expected to come from a trusted BitScrambler assembler
|
||||
* output. This API validates the header fields against hardware limits, but it
|
||||
* does not take an explicit blob length and therefore cannot verify that an
|
||||
* arbitrary caller-supplied buffer is complete.
|
||||
*
|
||||
* @param handle BitScrambler handle
|
||||
* @param program Binary program to load
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user