Bug 2416812 - gnutls & Gnome-Software
Summary: gnutls & Gnome-Software
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gnutls
Version: 43
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Alexander Sosedkin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2416615 2416681 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-11-24 18:37 UTC by bbtuxi
Modified: 2025-12-12 04:00 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-2653 0 None None None 2025-12-12 04:00:28 UTC

Description bbtuxi 2025-11-24 18:37:51 UTC
`gnutls-3.8.11-1`: SIGILL in `lc_kyber_768_dec` (ML-KEM) on legacy x86\_64 hardware

**Component:**
`gnutls`

**Version:**
`gnutls-3.8.11-1.fc43.x86_64`

**Description of Problem:**
After updating to `gnutls-3.8.11-1.fc43`, `gnome-software` (and potentially other clients performing TLS handshakes) crashes immediately with `SIGILL` (Illegal Instruction) on hardware lacking AVX2 support.

The crash occurs within the `lc_kyber_768_dec` function. This indicates an issue with the Post-Quantum Cryptography (ML-KEM/Kyber) implementation. It appears the library was compiled assuming newer instruction sets (likely AVX2, BMI2, or ADX) are present, or it fails to perform a proper runtime check to fall back to a compatible implementation on CPUs where these instructions are disabled or missing.

**System Details:**

  * **OS:** Fedora 43 (Rawhide)
  * **Package:** `gnutls-3.8.11-1.fc43.x86_64`
  * **CPU:** Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
  * **Architecture:** x86\_64 (Note: This Pentium model lacks AVX/AVX2 instructions)

**Steps to Reproduce:**

1.  Boot on a system with an x86-64 CPU that lacks AVX2 support (e.g., Intel Pentium G series).
2.  Update to `gnutls-3.8.11-1.fc43`.
3.  Launch `gnome-software` or initiate a TLS handshake involving PQC.

**Actual Results:**
The application crashes immediately. The process exits with code 132 (SIGILL).

**Stack Trace / Analysis:**
Coredump analysis shows the crash in thread 1 performing a TLS handshake:

```text
Program terminated with signal SIGILL, Illegal instruction.
#0  0x00007fbc8949662f in lc_kyber_768_dec () from /lib64/libgnutls.so.30

Stack trace:
#0  0x00007fbc8949662f lc_kyber_768_dec (libgnutls.so.30 + 0x9662f)
#1  0x00007fbc8957d6c5 ml_kem_decaps (libgnutls.so.30 + 0x17d6c5)
...
#8  0x00007fbc8941aff6 gnutls_handshake (libgnutls.so.30 + 0x1aff6)
```

**Workaround:**
Downgrading to the previous version resolves the issue:

```bash
# 1. Downgrade to the working version
sudo dnf downgrade gnutls-3.8.10-3.fc43

# 2. Lock the package to prevent it from being updated again
sudo dnf versionlock add gnutls-3.8.10-3.fc43
```



Sorry, I used AI to help write parts of this bug report.

Reproducible: Always

Comment 1 Alexander Sosedkin 2025-11-24 18:55:08 UTC
lc_ is leancrypto (https://github.com/smuellerDD/leancrypto),
so it's likely the 1.5.0 -> 1.6.0 leancrypto update in
https://src.fedoraproject.org/rpms/gnutls/c/000d285047d7fa5eebf2b159e3890882a51ef80e
that causes the regression.

https://github.com/smuellerDD/leancrypto/blob/master/ml-kem/src/README.md
claims the selection to use AVX2 is done at runtime.

A temporary workaround could be building disabling x86_64_asm altogether.

Comment 2 Alexander Sosedkin 2025-11-24 19:22:48 UTC
Unfortunately it's kinda late over here, so I can't investigate deeper today,
but I've kicked off a quick f43 scratch-build with -Ddisable-asm=enabled:
https://koji.fedoraproject.org/koji/taskinfo?taskID=139261176
It'd be appreciated if you could test this brutish work-around on your hardware
once/if the build finishes successfully.

--- a/gnutls.spec
+++ b/gnutls.spec
@@ -330,3 +330,5 @@ meson setup -Dprefix="$PWD/install" -Dlibdir="$PWD/install/lib" \
         -Daes_kw=disabled -Dapps=disabled \
+        -Ddisable-asm=true \
         _build
+# the reason for -Ddisable-asm=true being bz2416812
 meson compile -C _build

Comment 3 Alexander Sosedkin 2025-11-24 19:33:46 UTC
s/-Ddisable-asm=enabled/-Ddisable-asm=true/

... seems like it built successfully; the RPMs you're after are linked to at https://koji.fedoraproject.org/koji/taskinfo?taskID=139261244

Comment 4 bbtuxi 2025-11-24 20:18:53 UTC
I think it works! I just installed the package using sudo rpm -i --force gnutls-3.8.11-5.fc43.x86_64.rpm, and Gnome Software launches now :) 

Should I try anything else? 

I'm still a Linux beginner, and without the AI, I would never have been able to locate the error. 

Thank you very much for your effort!

Comment 5 Alexander Sosedkin 2025-11-25 08:21:38 UTC
> I think it works! I just installed the package using sudo rpm -i --force gnutls-3.8.11-5.fc43.x86_64.rpm, and Gnome Software launches now :)

Thank you for confirming, unfortunately that's quite a big hammer we should only use as a temporary measure.

> Should I try anything else?

It'd be nice if you could also test a proper fix later, once we or leancrypto get to the root cause.

Comment 6 Daiki Ueno 2025-11-25 08:41:58 UTC
*** Bug 2416615 has been marked as a duplicate of this bug. ***

Comment 7 Daiki Ueno 2025-11-25 08:42:38 UTC
*** Bug 2416681 has been marked as a duplicate of this bug. ***

Comment 8 Alexander Sosedkin 2025-11-25 10:14:57 UTC
In the meantime, disabling hardware acceleration in
https://src.fedoraproject.org/rpms/gnutls/pull-request/175 (rawhide)
https://src.fedoraproject.org/rpms/gnutls/pull-request/176 (f43)

Comment 9 Alexander Sosedkin 2025-11-25 13:04:47 UTC
Bodhi update https://bodhi.fedoraproject.org/updates/FEDORA-2025-7c520ffe0c

I heard testing and voting on these makes it quicker to reach users.

Comment 10 Alexander Sosedkin 2025-11-25 18:43:54 UTC
Thanks for the testing, the update disabling hardware acceleration in leancrypto should hit the repos now.

Reported upstream to the best of my abilities: https://github.com/smuellerDD/leancrypto/issues/43

Comment 11 bbtuxi 2025-11-27 07:01:33 UTC
I've contacted the developer of leancrypto and offered my help with testing. Thanks for your temporary fix :) Let's see what he replies. 

Best regards


Note You need to log in before you can comment on or make changes to this bug.