Created attachment 269454 [details] 0001-security-mbedtls4-update-4.0.0-to-4.1.0.patch
Sorry, accidentally removed it
Hi, Thank you for your submission. I have tested the patch in Poudriere (14.3-RELEASE-p9, amd64, main(2d6221ae7df3)) and it seems OK including `make test`. I need to ask for approval from my mentors first. Thanks.
PLIST from order: include/tf-psa-crypto/version.h include/tf-psa-crypto/private/crypto_adjust_config_auto_enabled.h
Are you sure security/mbedtls4/files/patch-library_CMakeLists.txt is still needed?
> PLIST from order: PLIST wrong order:
Created attachment 269457 [details] build fail without files/patch-library_CMakeLists.txt patch
(In reply to Vladimir Druzenko from comment #4) https://github.com/Mbed-TLS/mbedtls/blob/03334868372d9ab34d0b25dfa0a316c5b79d556b/library/CMakeLists.txt#L364(In reply to Vladimir Druzenko from comment #4)
Created attachment 269458 [details] 0001-security-mbedtls4-update-4.0.0-to-4.1.0.patch
(In reply to Paavo-Einari Kaipila from comment #8) `sort pkg-plist` (if it's right way) still makes some adjustments to this patch.
(In reply to Paavo-Einari Kaipila from comment #7) It's strange that the upstream haven't added a patch with a fix yet: https://github.com/Mbed-TLS/mbedtls/issues/10627 https://github.com/Mbed-TLS/mbedtls/pull/10631
Created attachment 269460 [details] 0001-security-mbedtls4-update-4.0.0-to-4.1.0.patch
(In reply to Paavo-Einari Kaipila from comment #11) Still the same :/ diff --git a/security/mbedtls4/pkg-plist b/security/mbedtls4/pkg-plist index 318783df18b2..a3950fa69d55 100644 --- a/security/mbedtls4/pkg-plist +++ b/security/mbedtls4/pkg-plist @@ -49,9 +49,10 @@ include/mbedtls/oid.h include/mbedtls/pem.h include/mbedtls/pk.h include/mbedtls/pkcs7.h -include/mbedtls/platform.h include/mbedtls/platform_time.h include/mbedtls/platform_util.h +include/mbedtls/platform.h +include/mbedtls/private_access.h include/mbedtls/private/aes.h include/mbedtls/private/aria.h include/mbedtls/private/bignum.h @@ -88,21 +89,19 @@ include/mbedtls/private/sha1.h include/mbedtls/private/sha256.h include/mbedtls/private/sha3.h include/mbedtls/private/sha512.h -include/mbedtls/private_access.h include/mbedtls/psa_util.h -include/mbedtls/ssl.h include/mbedtls/ssl_cache.h include/mbedtls/ssl_ciphersuites.h include/mbedtls/ssl_cookie.h include/mbedtls/ssl_ticket.h +include/mbedtls/ssl.h include/mbedtls/threading.h include/mbedtls/timing.h include/mbedtls/version.h -include/mbedtls/x509.h include/mbedtls/x509_crl.h include/mbedtls/x509_crt.h include/mbedtls/x509_csr.h -include/psa/crypto.h +include/mbedtls/x509.h include/psa/crypto_compat.h include/psa/crypto_config.h include/psa/crypto_driver_common.h @@ -116,6 +115,7 @@ include/psa/crypto_sizes.h include/psa/crypto_struct.h include/psa/crypto_types.h include/psa/crypto_values.h +include/psa/crypto.h include/tf-psa-crypto/build_info.h include/tf-psa-crypto/private/crypto_adjust_config_auto_enabled.h include/tf-psa-crypto/private/crypto_adjust_config_dependencies.h
(In reply to Yusuf Yaman from comment #12) sort pkg-plist > pkg-plist.sorted diff -u pkg-plist pkg-plist.sorted doesn't return anything here
Created attachment 269461 [details] 0001-security-mbedtls4-Update-4.0.0-4.1.0.patch (nxjoseph) It's strange, maybe patches got mixed up? Can you try my patch to see if sorting is needed?
(In reply to Yusuf Yaman from comment #14) This one does print seemingly the same diff as in message 12
Comment on attachment 269461 [details] 0001-security-mbedtls4-Update-4.0.0-4.1.0.patch (nxjoseph) (In reply to Paavo-Einari Kaipila from comment #15) Oh... I found the culprit with help of Vladimir, I see that the problem arised because probably we use different locales. My locale is "en_US.UTF-8", making it "C", no problem with sorting in your patch. $ env LANG=C sort -c pkg-plist yusuf@freebsd:~/doc/git/ports/security/mbedtls4 $ echo $? 0 $ env LANG=en_US.UTF-8 sort -c pkg-plist sort: pkg-plist:53: disorder: include/mbedtls/platform_time.h yusuf@freebsd:~/doc/git/ports/security/mbedtls4 $ echo $? 1 Sorry, I did not know locale could affect like such...
in pkg-plist DISTVERSION resolves to 4.1.0, correct order is: lib/libmbedcrypto.so.18 lib/libmbedcrypto.so.4.1.0 instead of lib/libmbedcrypto.so.18 lib/libmbedcrypto.so.%%DISTVERSION%%
(In reply to Yusuf Yaman from comment #17) Isn't that the same order?
(In reply to Paavo-Einari Kaipila from comment #18) Sorry, i've made typo. What I try to say is the lower-number library.so must come first then the library.so.%%DISTVERSION%%.
(In reply to Yusuf Yaman from comment #19) Well, that depends on sorting rules. According to default (C) rules, %%DISTVERSION%% comes first.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0f67f38ce6bf226f8a8414c6950d5f90e75499e9 commit 0f67f38ce6bf226f8a8414c6950d5f90e75499e9 Author: Paavo-Einari Kaipila <pkaipila@gmail.com> AuthorDate: 2026-04-07 14:37:12 +0000 Commit: Yusuf Yaman <nxjoseph@FreeBSD.org> CommitDate: 2026-04-10 16:40:20 +0000 security/mbedtls4: Update 4.0.0 => 4.1.0 (security) While here, sort pkg-plist. Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-4.1.0 PR: 294301 Reported by: Paavo-Einari Kaipila <pkaipila@gmail.com> (maintainer) Approved by: osa, vvd (mentors) MFH: 2026Q2 Security: CVE-2026-25833 Security: CVE-2026-25834 security/mbedtls4/Makefile | 3 +-- security/mbedtls4/distinfo | 6 ++--- security/mbedtls4/pkg-plist | 65 +++++++++++++++++++++++---------------------- 3 files changed, 37 insertions(+), 37 deletions(-)
A commit in branch 2026Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=798c1e2680cf84f9185644e44077b56526ef505a commit 798c1e2680cf84f9185644e44077b56526ef505a Author: Paavo-Einari Kaipila <pkaipila@gmail.com> AuthorDate: 2026-04-07 14:37:12 +0000 Commit: Yusuf Yaman <nxjoseph@FreeBSD.org> CommitDate: 2026-04-10 16:48:18 +0000 security/mbedtls4: Update 4.0.0 => 4.1.0 (security) While here, sort pkg-plist. Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-4.1.0 PR: 294301 Reported by: Paavo-Einari Kaipila <pkaipila@gmail.com> (maintainer) Approved by: osa, vvd (mentors) MFH: 2026Q2 Security: CVE-2026-25833 Security: CVE-2026-25834 (cherry picked from commit 0f67f38ce6bf226f8a8414c6950d5f90e75499e9) security/mbedtls4/Makefile | 3 +-- security/mbedtls4/distinfo | 6 ++--- security/mbedtls4/pkg-plist | 65 +++++++++++++++++++++++---------------------- 3 files changed, 37 insertions(+), 37 deletions(-)
Committed, thanks!