Commit Graph

869 Commits (docs/security-policy-reconcile)

Author SHA1 Message Date
Mark Atwood 72f749472d docs: route vulnerability reports to secure@, not Zendesk
support@wolfssl.com feeds the Zendesk support queue. Vulnerability
reports, including embargoed ones, should not land there.

secure@wolfssl.com is the security team address and is the only UID on
the published PGP key. Reports go there; support@ is listed as general
support only.
2026-08-21 15:59:57 -07:00
Mark Atwood f8c3f96f08 docs: make SECURITY-POLICY.md the only disclosure policy
wolfSSL published two disclosure policies that disagreed. The repo named
support@wolfssl.com for reports, the website named secure@wolfssl.com, and
the report template that gates CVE consideration appeared only in the repo,
so a researcher following security.txt never saw it.

SECURITY-POLICY.md becomes the whole policy and absorbs what was
website-only: products covered, the proof-of-concept requirement,
threat-model boundaries, the safe-harbour statement, the PGP fingerprint,
and CRA obligations.

CRA text corrected. Article 14 requires notification to the coordinator
CSIRT and ENISA together through the Article 16 platform, not to ENISA
alone. EUVD publication is Article 17(5). Support period is Article 13(8).
Article 14 applies from 11 September 2026 and, under Article 69(3), covers
products already on the market.

SECURITY-POLICY.md and SECURITY-REPORT-TEMPLATE.md are added to EXTRA_DIST.
Neither shipped in the release archive.
2026-08-21 15:57:26 -07:00
Paul Adelsbach bded1f48c8 CI: increase timeout and fix minutes in cryptocb-only test 2026-08-21 11:48:55 -07:00
philljj 4d1bd552d0
Merge pull request #11220 from LinuxJedi/fix-se050-asn-key-to-der-guards
Fix ASN guards for RSA key DER export
2026-08-21 10:39:00 -05:00
Andrew Hutchings 9de9f6639c Limit ASN guard regression to build check
The full unit suite has an unrelated SNI runtime failure with the original ASN implementation. Keep this regression focused on configure, compile, and link, which catches the missing SetASNIntMP guard on the parent revision.
2026-08-21 13:34:29 +01:00
Andrew Hutchings 0ae2ef095f Add RSA key-to-DER ASN regression build
Exercise original ASN with RSA key export while ECC, DSA, and DH are disabled. This configuration reproduces the missing ASN helper guards fixed by the preceding commit and protects the minimal SE05x build from regression.
2026-08-21 12:55:15 +01:00
David Garske 8bffaff697 Check ECC private key scalar range on import (F-1930, F-1931) 2026-08-19 23:54:09 -04:00
philljj 437bca85a7
Merge pull request #11206 from LinuxJedi/se050_ci_pkcs7_pin
SE050 CI: update pinned simulator for PKCS7 coverage
2026-08-19 17:57:30 -05:00
philljj cd854fb323
Merge pull request #11207 from julek-wolfssl/zendesk-22347
ntp CI: build wolfSSL with OPENSSL_EXTRA_BSD and MD4
2026-08-19 15:33:58 -05:00
philljj 25d61f614a
Merge pull request #10960 from julek-wolfssl/openssh-10.4p1-ci
openssh CI: add 10.4p1 to the matrix
2026-08-19 12:00:55 -05:00
Juliusz Sosinowicz 074f904ff3 ntp CI: build wolfSSL with OPENSSL_EXTRA_BSD and MD4
The ntp 4.2.8p18 patch (wolfSSL/osp) requires wolfSSL to be built
with OPENSSL_EXTRA_BSD, which provides MD5Init/MD5Update/MD5Final,
and with MD4 for the new test suite. Neither is provided by
--enable-all. Without these flags the 4.2.8p18 job fails at
configure with a clear error.
2026-08-19 11:15:42 +00:00
David Garske c5c63c0ba5 wolfCrypt SRAM PUF: health test the raw readout before accepting it 2026-08-19 01:02:19 +02:00
philljj 83091f3ff0
Merge pull request #11179 from padelsbach/membrowse-fork-pr-checkout
Fix membrowse workflow on forks
2026-08-18 15:51:18 -05:00
Andrew Hutchings 5e0018f76b SE050 CI: update pinned simulator for PKCS7 coverage
Pin bump to the simulators commit that adds --enable-pkcs7 to the
wolfcrypt CI build, so the suite's pkcs7signed_test and
pkcs7enveloped_test regression-guard the SE050 RSA verify buffer fix
and the ECDH software-key fallback. The pinned commit is fetchable by
CI once the corresponding simulators change merges.
2026-08-18 15:09:00 +01:00
JacobBarthelmeh f4a94c24e6
Merge pull request #10990 from julek-wolfssl/cryptocb-async-poll-compile-time
Add compile-time crypto callback async poll for record ciphers
2026-08-17 11:44:31 -06:00
Juliusz Sosinowicz 2c4f624eea ci: add OpenSSH 10.4p1 to CI matrix 2026-08-17 03:16:35 +00:00
Paul Adelsbach 5494aeb78b Fix membrowse workflow on forks 2026-08-14 13:19:13 -07:00
David Garske 17821e2c31
Merge pull request #11135 from SparkiDev/sp_riscv_64
SP RISC-V 64-bit: new implementation
2026-08-14 09:23:45 -07:00
Sean Parkinson ee7a8bffc8 SP RISC-V 64-bit: new implementation
Implementation of all SP algorithms/parameters for RISC-V 64-bit CPU.
2026-08-14 11:05:08 +10:00
night1rider a56df80507 test: check RSA 4096 works when the build asks for it 2026-08-13 15:23:43 -06:00
JacobBarthelmeh 5451b2e787
Merge pull request #11124 from dgarske/cross_library_deepen_race
cross-library: recover the break-check scan base when the PR merge ref moves
2026-08-11 13:50:56 -06:00
David Garske 0a47c62ed8
Merge pull request #10718 from night1rider/AES-Key-wrap_with_padding
Aes key wrap with padding
2026-08-11 10:20:54 -07:00
JacobBarthelmeh fcf11af7a0
Merge pull request #11000 from kareem-wolfssl/zd22213
Fix multiple issues with WOLFSSL_CHECK_SIG_FAULTS + HAVE_PK_CALLBACKS.
2026-08-11 10:36:50 -06:00
David Garske 1e0fa211d0
Merge pull request #10886 from night1rider/cryptocb-hooks-rsapss-ed448-cmac
Cryptocb hooks rsapss ed448 cmac
2026-08-10 15:49:05 -07:00
night1rider 5c6112c634 Pass -m32 at make time too for the NO_64BIT key wrap build 2026-08-10 16:32:27 -06:00
night1rider 26a8ae690a Add a 32-bit NO_64BIT key wrap build to the os-check matrix 2026-08-10 15:10:46 -06:00
night1rider 2fcc341072 Add AES key wrap with padding (RFC 5649) and crypto callback support
Adds wc_AesKeyWrap_Pad/wc_AesKeyUnWrap_Pad and their _ex variants plus crypto
callback dispatch, routing blocks through wc_AesEcb* so an ECB only callback works.
2026-08-10 15:10:46 -06:00
David Garske 0aa7c7c94d cross-library: recover the break-check scan base when the PR merge ref moves 2026-08-10 13:05:00 -07:00
David Garske 14a72c96e4 wolfCrypt SRAM PUF: configurable error correction and footprint 2026-08-09 09:04:51 +02:00
night1rider 375febc944 Extend the RSA-PSS verify callback and harden the Ed448/CMAC hooks
The PSS hook can hand back the recovered block through out/outSz/outLen.
A device that reports only a verdict leaves outLen at 0; wolfSSL then
zeroes the buffer and returns saltLen + hLen, and rejects a buffer
smaller than that with RSA_BUFFER_E. A reported length is clamped to the
buffer size, and any positive handler return maps to SIG_VERIFY_E.

Move the Ed448 sign WOLFSSL_CHECK_MEM_ZERO registration below the crypto
callback hook so the device path no longer returns past it, and guard the
RSA-PSS test callback against WOLF_CRYPTO_CB_ONLY_RSA.

Adds tests for the recovered-data, over-claimed-length and undersized
buffer paths, and an os-check config that builds the hooks under
WOLFSSL_CHECK_MEM_ZERO.
2026-08-08 15:14:28 -06:00
philljj e71b086fc8
Merge pull request #10724 from dgarske/ti_c25
wolfCrypt on TI C2000 C28x (LAUNCHXL-F28P55X)
2026-08-08 14:26:28 -05:00
Kareem f5ff44d76e Oops, add missing comma 2026-08-07 13:57:13 -07:00
Kareem df249bbafd Add --enable-pkcallbacks to newly added test config as the issues with --enable-all --enable-pkcallbacks are now resolved. 2026-08-07 13:57:12 -07:00
Kareem e899b18937 Address code review feedback.
Fix passing in NULL key to PK callbacks.
Fix --enable-all + TEST_PK_PRIVKEY build (DTLS and benchmark issues).
2026-08-07 13:57:12 -07:00
Kareem c64ae7fe40 Fix multiple issues with WOLFSSL_CHECK_SIG_FAULTS + HAVE_PK_CALLBACKS. 2026-08-07 13:57:12 -07:00
David Garske ea57a537c7
Merge pull request #11107 from Frauschi/gate_fix
Fix link failure with NO_SESSION_CACHE and session tickets
2026-08-07 12:16:29 -07:00
David Garske 8abc253c16 ci: name and document the three CHAR_BIT != 8 guards in ti-c2000-compile.yml 2026-08-07 12:07:42 -07:00
David Garske e2ddff61b7
Merge pull request #11105 from Frauschi/psk_fix
Send decrypt_error alert for TLS 1.3 PSK binder failures
2026-08-07 11:31:32 -07:00
David Garske 586f1ed490
Merge pull request #11096 from Frauschi/pqc_only
Support post-quantum-only (ML-KEM + ML-DSA/SLH-DSA) TLS 1.3 builds
2026-08-07 10:08:34 -07:00
Tobias Frauenschläger 41da354dc8 Add CI coverage for NO_SESSION_CACHE with session tickets
The os-check matrix had one NO_SESSION_CACHE entry, dtls13-client-minimal,
and it is client only with no session tickets. Both paths that failed to
link are server side ticket code, so nothing in the matrix covered them.

Add two entries. no-session-cache-session-ticket sets the macro directly
and enables DTLS 1.3 with WOLFSSL_DTLS_NO_HVR_ON_RESUME, covering both
call sites. It also sets HAVE_EXT_CACHE, since an external cache with no
internal one is the only configuration in which the external cache branch
of FreeSessionFromCacheOrExt() survives the preprocessor, and a build can
reach it through --enable-wpas with --enable-lowresource.

lowresource-tls13-session-ticket reaches the src/internal.c paths purely
through configure options, since --enable-lowresource defines
NO_SESSION_CACHE, which is how a user runs into this without setting any
flags by hand. It does not cover src/dtls.c, whose TlsSessionIdIsValid()
needs WOLFSSL_DTLS_NO_HVR_ON_RESUME, so the two entries are not
interchangeable.

Both disable the examples, because tests/unit.test calls
wolfSSL_get1_session() and wolfSSL_set_session(), which NO_SESSION_CACHE
compiles out. The entries are therefore compile coverage for the library.
Making the tests build in this configuration is a larger change.
2026-08-07 18:59:55 +02:00
David Garske a82f5b79c0
Merge pull request #11067 from SparkiDev/docs_user_settings_embedded_h
Documentation and embedded user_settings.h.
2026-08-07 09:14:36 -07:00
Tobias Frauenschläger ec7d2de6a2 Send decrypt_error alert for TLS 1.3 PSK binder failures
RFC 8446 Section 6.2 lists failure to validate a PSK binder under
decrypt_error, but TranslateErrorToAlert() mapped BAD_BINDER to
illegal_parameter. That told the peer its ClientHello was malformed, when
in fact the message was well formed and only the binder MAC did not match.

BAD_BINDER is also returned when no offered PSK matched and the server has
no certificate to fall back to. That reuse is deliberate, because it keeps
an unknown PSK identity indistinguishable from a failed binder, so both
conditions still map to a single alert after this change. A comment at the
return site in CheckPreSharedKeys() now records the invariant at both ends.

Splitting BAD_BINDER off illegal_parameter exposed a second path that had to
move with it. FindPsk() raised PSK_KEY_ERROR, which stays mapped to
illegal_parameter, when the server callback recognised an identity carrying
a non-zero obfuscated_ticket_age. That check ran before any binder was
derived, so on a certificate-less server the two alerts would have let an
unauthenticated peer enumerate valid PSK identities without holding a key.
The check is removed rather than made to fail differently: RFC 8446 Section
4.2.11 says that for an externally established identity an
obfuscated_ticket_age of 0 SHOULD be used and servers MUST ignore the value.
Ignoring it satisfies that requirement, closes the oracle, and lets a
conformant client that sends a non-zero age complete a handshake that was
previously rejected. test_tls13_psk_age_no_identity_oracle() asserts a known
and an unknown identity produce the same alert, with a positive control that
the known run really took the matched path.

Also removes an unreachable branch in CheckPreSharedKeys(). Since commit
089f1f7c9 added the earlier !*usingPSK certificate check, the later
certificate check and its BAD_BINDER return can no longer be reached. A
build with certificates returns BAD_BINDER earlier when none is loaded, and
a NO_CERTS build returns it unconditionally. The remaining branch now falls
through to the shared exit so WOLFSSL_LEAVE() is emitted on the certificate
fallback path as well.

Adds an os-check-linux configuration, tls13-psk-no-certs. psk.yml already
covers NO_CERTS with TLS 1.3 PSK through static-psk-lowresource-tls13, but
that config disables DH, so it only reaches the psk_ke branch. This one
leaves DH enabled and covers psk_dhe_ke under NO_CERTS.

Applications that inspect wolfSSL_get_alert_history() will observe alert 51
instead of 47 for these conditions. The affected tests are updated.
2026-08-07 15:07:51 +02:00
Tobias Frauenschläger f5f3dd4c6e Support post-quantum-only (ML-KEM + ML-DSA/SLH-DSA) TLS 1.3 builds
Allow a quantum-safe-only TLS 1.3 stack - ML-KEM key exchange with ML-DSA or
SLH-DSA authentication - with RSA, ECC and DH all disabled (the CNSA 2.0 /
EO 14412 posture).

- Treat a usable standalone ML-KEM group as a valid key exchange and
  Falcon/ML-DSA/SLH-DSA as valid authentication, so the "no cipher suites"
  #errors no longer fire (ssl.c, internal.h), and extend the CopyDecodedToX509
  pkCurveOID guard to match the struct member guards (internal.c).
- asn.c: guard the RSA/ECC-only certificate signing helpers so cert generation
  compiles with RSA and ECC disabled, while keeping MakeSignatureCb available
  for the WOLFSSL_CERT_SIGN_CB (TPM/HSM) offload path.
- tls.c: advertise the psk_dhe_ke exchange mode when a standalone ML-KEM group
  is usable on the client side, that is when the build has both key generation
  and decapsulation. Without it an ML-KEM-only build fell back to psk_ke, the
  resumption key schedules diverged, and the first AEAD record failed to
  authenticate (AES_GCM_AUTH_E), breaking session-ticket resumption.
- tls13.c: hoist the hashAlgo void cast in EncodeSigAlg out of the Ed25519 and
  Ed448 cases so a build with no classic signature algorithm still marks the
  parameter used.
- Examples and tests: add ML-DSA and SLH-DSA certificate selection (gated on
  NO_RSA so it only applies in true PQC-only builds) and default to TLS 1.3
  when no classic auth is built in and a post-quantum signature is available
  (test.h, client/server/echo*, test_tls13.c). SLH-DSA uses the SHAKE-128s leaf
  certificates and their shared 128s root.
- CI: add PQC-only entries to the pq-all.json config list (ML-DSA and SLH-DSA),
  each exercising the build, a full TLS 1.3 handshake, and ML-KEM-only
  session-ticket resumption.

Whether a build can authenticate with a post-quantum certificate is three
separate questions - is the algorithm compiled in, are test credentials wired
up for the enabled parameter set, and can this build sign - so test.h answers
them with three tiers of macro rather than testing WOLFSSL_HAVE_MLDSA and
WOLFSSL_HAVE_SLHDSA directly:

- TEST_HAVE_MLDSA_CERT_FILES / TEST_HAVE_SLHDSA_CERT_FILES: the credential
  paths name real files. ML-DSA needs an enabled parameter level; SLH-DSA needs
  a 128s parameter set, since both families share a 128s root and only those
  certificates are wired up, and PEM decoding, since the entity certificates
  ship as PEM only. Loading a certificate needs verification support alone, so
  test_tls13.c uses this tier - it only needs a certificate on the context.
- TEST_HAVE_MLDSA_CERTS / TEST_HAVE_SLHDSA_CERTS: the above, plus the ability
  to sign. A verify-only build derives WOLFSSL_MLDSA_NO_SIGN and drops private
  key support entirely, so it can neither load the key nor produce a
  CertificateVerify. The example credential ladders use this tier.
- TEST_HAVE_PQC_CERT_AUTH: either of those, plus WOLFSSL_TLS13. Both algorithms
  are TLS 1.3 only, so folding the version into the macro keeps the version
  defaults and the PSK fallbacks in the client, server and echo examples from
  disagreeing. Falcon is deliberately absent, having no credentials in the
  ladders, so a Falcon-only build keeps the historic TLS 1.2 PSK behavior.

A build that fails a gate now falls back to PSK instead of naming credentials
it cannot use, which removes two hard #errors that were reachable from
configure: --enable-slhdsa with only non-128s parameter sets broke every build
that includes test.h, even ones with RSA and ECC enabled that would never touch
an SLH-DSA credential.

Also in the credential material and the configurations this opens up:

- test.h: pair the DER ML-DSA certificate with mldsa<N>-key.der. The
  mldsa<N>_priv-only.der files are standalone PKCS#8 encoding vectors from an
  unrelated key pair, so a build without PEM decoding presented a certificate
  and signed with a key that did not match it, and the peer rejected the
  CertificateVerify.
- echoserver.c: load the SLH-DSA key with CERT_FILETYPE like every neighboring
  branch, rather than hardcoding WOLFSSL_FILETYPE_PEM against a certificate
  loaded in the build-dependent format.
- internal.c, tls13.c, ssl_load.c: mark ssl, sigOut, keyType and keySz used.
  Every reader of these sits in a per-algorithm block, so a build with no
  signing algorithm at all left them unused and -Werror rejected the library.
- tests/api.c: skip test_wolfSSL_PKCS8 unless RSA, ECC or PEM decoding is
  available. With none of them every key-loading body compiles out, leaving the
  file locals unused and nothing for the test to do.
2026-08-07 08:14:26 +02:00
Tobias Frauenschläger b1e01d6d64 Fix PKCS12 PBKDF mp variant buffer size to include password block
The mp API variant of wc_PKCS12_PBKDF_ex builds a working buffer holding
D || S || P, but totalLen was computed as dLen + sLen and so left out the
password block entirely. The fill loop writes pLen bytes starting at
S + sLen, which is past the end of the buffer, and DoPKCS12Hash was called
with the short length so the password was never absorbed into the digest.
A build with this variant enabled therefore derived the same key for every
password over a given salt, and overflowed the heap allocation or the
static buffer by pLen bytes depending on the salt length.

Sum dLen with iLen instead, matching the non-mp variant. That corrects the
allocation size, the hash input length, the I update bound and the
ForceZero coverage in one place.

Fixes F-7306.
2026-08-07 08:11:23 +02:00
Tobias Frauenschläger 9533a8182a Fix RSA_W_ENC verify guard in signature wrapper
The DigestInfo length extraction in wc_SignatureVerifyHash was compiled
only when WOLFSSL_RSA_PUBLIC_ONLY was not defined, but the block depends
on ASN.1 support, not on private key support. In a public only build the
RSA verify path stays reachable and wc_SignatureVerify still DER encodes
the digest, so the length check fell through to the plain digest size
comparison and rejected every valid signature with BAD_LENGTH_E. The
same guard also broke compilation with NO_ASN and RSA enabled, since
asn.h is not included in that case and GetSequence and GetOctetString
are undeclared.

Guard the block on NO_ASN instead, matching the DER encode call site in
wc_SignatureVerify.

Fixes F-7412.
2026-08-07 08:11:23 +02:00
Sean Parkinson f9038b7809 Documentation and embedded user_settings.h.
Added documentation of the defines for algorithms and assembly code and math.
user_settings_embedded.h has configuration defines at the top that are set to
0 for off and 1 for on. Setting these turns on the appropriate defines.
2026-08-07 15:07:27 +10:00
David Garske 80d2969348
Merge pull request #11098 from Frauschi/script_fix
Fix CI flakes from ccache saturation and stale schedule estimates
2026-08-06 18:31:03 -07:00
David Garske b7dd5bb06e Peer review fixes 2026-08-06 16:56:10 -07:00
David Garske f067cd88a2 types/ci: scope 16-bit word64 to WIDE_BYTE and add portable split-64 Keccak host test 2026-08-06 16:56:10 -07:00
David Garske 4f2fd9c23c test/benchmark/ci: CHAR_BIT != 8 test vectors, NO_MALLOC benchmark, TI C2000 compile CI and docs 2026-08-06 16:56:10 -07:00