One thing worth checking is the output buffer size and stack usage. Make sure outSign is large enough for a 2048-bit RSA signature (256 bytes) and that *inOutSignBufSize reflects the actual buffer capacity. Also, verify that sizeof(hash) is 32 bytes and check the return value of each wolfSSL function. If the issue persists, try increasing the stack size and reviewing the compiler's stack protection settings. Sharing the buffer declarations and relevant build configuration may help identify the root cause.
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferencesStable Releases - download stable product releases.
Development Branch - latest development branch on GitHub.
wolfSSL Manual - wolfSSL (formerly CyaSSL) product manual and API reference.