-
Notifications
You must be signed in to change notification settings - Fork 896
Closed
Labels
Description
Version
latest master
Description
On an embedded read-only Linux kernel filesystem such as the ESP32-S3 Xtensa example the testwolfcrypt memory test will return a successful result, but the next base64_test() may unexpectedly fail during a memory access operation. The reason for that failure is completely unrelated to base64 testing.
Specifically, when this const byte good[]
array is accessed in Base64_SkipNewline():
WOLFSSL_SMALL_STACK_STATIC const byte good[] = "A+Gd\0\0\0";
... this error occured:
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
seedrng: can't create directory '/var/lib/seedrng': Read-only file system
Starting network: OK
Welcome to Buildroot
buildroot login: root
~ # cd /opt
/opt # ./testwolfcrypt
Math: Multi-Precision: Wolf(SP) word-size=32 bits=3072 sp_int.c
------------------------------------------------------------------------------
ESP32-S3 Xtensa 1.0a wolfSSL version 5.6.3
-----------------------[ 28.161920] Caught unhandled exception in 'testwolfcrypt' (pid = 63, pc = 0x42e3c7e2) - should not happen
[ 28.161920] EXCCAUSE is 3
[ 28.175088] 3a 37 32 03 00 e0 a0 34 3c f5 90 80 54 e0 60 54 90 95 c0 8a 87 6a 67 40 aa 20 d2 08 00 32 41 30
-------------------------------------------------------
error test passed!
MEMORY test passed!
Illegal instruction
There should be a memory test that explicitly catches this.