Several undefined symbols when building with -Wundef #682

Open
opened 2026-02-02 21:32:46 -06:00 by glinders · 0 comments
glinders commented 2026-02-02 21:32:46 -06:00 (Migrated from github.com)

WARNING: if the bug you are reporting has or may have security implications,
we ask that you report it privately to
mbed-tls-security@lists.trustedfirmware.org
so that we can prepare and release a fix before publishing the details.
See SECURITY.md.

Summary

In our project we build with compiler option -Wundef. This results in several undefined symbols.
Some affected files:

  • TF-PSA-Crypto/drivers/builtin/src/bignum_core.c (UINT_MAX, ULONG_MAX, ULLONG_MAX)
  • TF-PSA-Crypto/framework/tests/src/pk_helpers.c (MBEDTLS_ECDSA_MAX_LEN)
  • TF-PSA-Crypto/drivers/builtin/src/pkcs5.c (UINT_MAX)

System information

TF-PSA-Crypto version (number or commit id): latest
Operating system and version: Ubuntu 24.04
Configuration (if not default, please attach crypto_config.h): default
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): see below
Additional environment information:

Expected behavior

The build completes without errors when using compiler option -Wundef

Actual behavior

*WARNING: if the actual behaviour suggests memory corruption (like a crash or an error
from a memory checker), then the bug should be assumed to have security
implications (until proven otherwise), and we ask what you report it privately,
see the note at the top of this template.

Build fails with error: "MBEDTLS_ECDSA_MAX_LEN" is not defined

Steps to reproduce

from TF-PSA-Crypto repo:
cd ..
mkdir test
cd test
CC="/usr/bin/cc -Wundef" cmake ../TF-PSA-Crypto/ && cmake --build .

Additional information

**WARNING:** if the bug you are reporting has or may have security implications, we ask that you report it privately to <mbed-tls-security@lists.trustedfirmware.org> so that we can prepare and release a fix before publishing the details. See [SECURITY.md](https://github.com/Mbed-TLS/TF-PSA-Crypto/blob/development/SECURITY.md). ### Summary In our project we build with compiler option -Wundef. This results in several undefined symbols. Some affected files: - TF-PSA-Crypto/drivers/builtin/src/bignum_core.c (UINT_MAX, ULONG_MAX, ULLONG_MAX) - TF-PSA-Crypto/framework/tests/src/pk_helpers.c (MBEDTLS_ECDSA_MAX_LEN) - TF-PSA-Crypto/drivers/builtin/src/pkcs5.c (UINT_MAX) ### System information TF-PSA-Crypto version (number or commit id): latest Operating system and version: Ubuntu 24.04 Configuration (if not default, please attach `crypto_config.h`): default Compiler and options (if you used a pre-built binary, please indicate how you obtained it): see below Additional environment information: ### Expected behavior The build completes without errors when using compiler option -Wundef ### Actual behavior **WARNING:* if the actual behaviour suggests memory corruption (like a crash or an error from a memory checker), then the bug should be assumed to have security implications (until proven otherwise), and we ask what you report it privately, see the note at the top of this template. Build fails with error: "MBEDTLS_ECDSA_MAX_LEN" is not defined ### Steps to reproduce from TF-PSA-Crypto repo: cd .. mkdir test cd test CC="/usr/bin/cc -Wundef" cmake ../TF-PSA-Crypto/ && cmake --build . ### Additional information
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto#682
No description provided.