Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testwolfctypt missing embedded filesystem read-only memory test #6522

Closed
gojimmypi opened this issue Jun 19, 2023 · 1 comment
Closed

testwolfctypt missing embedded filesystem read-only memory test #6522

gojimmypi opened this issue Jun 19, 2023 · 1 comment
Assignees

Comments

@gojimmypi
Copy link
Contributor

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.

@gojimmypi
Copy link
Contributor Author

fixed in #6523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant