All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/iperf3: fix build with LibreSSL
@ 2026-10-20  8:15 Yegor Yefremov
  2026-10-20  9:06 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Yegor Yefremov @ 2026-10-20  8:15 UTC (permalink / raw)
  To: buildroot

iperf3 3.22 added a new "goto errreturn" to decrypt_rsa_message(), on
a code path that is common to all OpenSSL versions, but the
errreturn label is only defined when OPENSSL_VERSION_MAJOR >= 3.
LibreSSL does not define OPENSSL_VERSION_MAJOR, so the build fails
with:

iperf_auth.c: In function 'decrypt_rsa_message':
iperf_auth.c:343:9: error: label 'errreturn' used but not defined
  343 |         goto errreturn;   /* or: return 0; — never read more than output_buffer_len bytes */
      |         ^~~~

Backport the upstream commit that defines the label unconditionally.

This issue has been present since commit cb129a641b40 ("package/iperf3:
security bump version to 3.22"), as the broken code first appeared in
iperf 3.22. That commit is not part of any release nor of any
maintenance branch yet, so only master is affected, but this fix
should go along with the 3.22 bump if it gets backported.

Fixes:
https://autobuild.buildroot.org/results/6ed8f60f56f7fcd11eaa1ba160837275b8113e1a

Fixes: cb129a641b403cfc4c1b2ea9280b966e19837b62 ("package/iperf3: security bump version to 3.22")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 ...penSSL-version-check-in-iperf_auth.c.patch | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch

diff --git a/package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch b/package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch
new file mode 100644
index 0000000000..45b581e5a7
--- /dev/null
+++ b/package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch
@@ -0,0 +1,29 @@
+From 96208f2e413d7fddc19e6888be5fbd2acdb04606 Mon Sep 17 00:00:00 2001
+From: Peter G <55786000+WatcherOfTheSkies@users.noreply.github.com>
+Date: Wed, 30 Sep 2026 12:27:43 +0100
+Subject: [PATCH] Remove OpenSSL version check in iperf_auth.c
+
+Removed conditional compilation for OpenSSL version check.
+
+Upstream: https://github.com/esnet/iperf/commit/96208f2e413d7fddc19e6888be5fbd2acdb04606
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+---
+ src/iperf_auth.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/iperf_auth.c b/src/iperf_auth.c
+index 51d1a1b6e..cf0bd7449 100644
+--- a/src/iperf_auth.c
++++ b/src/iperf_auth.c
+@@ -380,11 +380,9 @@ int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedt
+ 
+     return plaintext_len;
+ 
+-#if OPENSSL_VERSION_MAJOR >= 3
+   errreturn:
+     fprintf(stderr, "%s\n", ERR_error_string(ERR_get_error(), NULL));
+     return 0;
+-#endif
+ }
+ 
+ int encode_auth_setting(const char *username, const char *password, EVP_PKEY *public_key, char **authtoken, int use_pkcs1_padding){
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH] package/iperf3: fix build with LibreSSL
  2026-10-20  8:15 [Buildroot] [PATCH] package/iperf3: fix build with LibreSSL Yegor Yefremov
@ 2026-10-20  9:06 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-20  9:06 UTC (permalink / raw)
  To: Yegor Yefremov; +Cc: buildroot

On Tue, Oct 20, 2026 at 10:15:57AM +0200, Yegor Yefremov wrote:
> iperf3 3.22 added a new "goto errreturn" to decrypt_rsa_message(), on
> a code path that is common to all OpenSSL versions, but the
> errreturn label is only defined when OPENSSL_VERSION_MAJOR >= 3.
> LibreSSL does not define OPENSSL_VERSION_MAJOR, so the build fails
> with:
> 
> iperf_auth.c: In function 'decrypt_rsa_message':
> iperf_auth.c:343:9: error: label 'errreturn' used but not defined
>   343 |         goto errreturn;   /* or: return 0; — never read more than output_buffer_len bytes */
>       |         ^~~~
> 
> Backport the upstream commit that defines the label unconditionally.
> 
> This issue has been present since commit cb129a641b40 ("package/iperf3:
> security bump version to 3.22"), as the broken code first appeared in
> iperf 3.22. That commit is not part of any release nor of any
> maintenance branch yet, so only master is affected, but this fix
> should go along with the 3.22 bump if it gets backported.
> 
> Fixes:
> https://autobuild.buildroot.org/results/6ed8f60f56f7fcd11eaa1ba160837275b8113e1a
> 
> Fixes: cb129a641b403cfc4c1b2ea9280b966e19837b62 ("package/iperf3: security bump version to 3.22")
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Applied to master, thanks!

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-20  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20  8:15 [Buildroot] [PATCH] package/iperf3: fix build with LibreSSL Yegor Yefremov
2026-10-20  9:06 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.