<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>fips · Paolo Stivanin</title><link>https://paolostivanin.github.io/tags/fips/</link><description>Security QA engineer. FIPS, Common Criteria, openQA, and flaky tests.</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Fri, 04 Dec 2026 14:45:00 +0100</lastBuildDate><atom:link href="https://paolostivanin.github.io/tags/fips/index.xml" rel="self" type="application/rss+xml"/><item><title>What SLE 16 negotiates when nobody configures anything</title><link>https://paolostivanin.github.io/work/what-sle-16-negotiates-when-nobody-configures-anything/</link><pubDate>Fri, 04 Dec 2026 14:45:00 +0100</pubDate><guid>https://paolostivanin.github.io/work/what-sle-16-negotiates-when-nobody-configures-anything/</guid><category>security</category><category>openqa</category><category>opensuse</category><category>hackweek</category><category>fips</category><category>pqc</category><description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Every post-quantum test we had sets the algorithm explicitly, so&#10;none of them would notice a changed default. For my&#10;&lt;a href="https://hackweek.opensuse.org/26/projects/fips-and-pqc-crypto-surface-tracker-for-sle-16-snapshot-diff-and-coverage-in-openqa"&gt;Hack Week 26 project&lt;/a&gt;&#10;I wrote an openQA test that runs handshakes between the system's crypto stacks&#10;with untouched configurations, then turns on FIPS mode in the same VM and runs&#10;them again. With FIPS off, TLS on SLE 16.1 negotiates hybrid ML-KEM almost&#10;everywhere. With FIPS on, SSH and stunnel lose post-quantum key exchange. The&#10;test is in review as&#10;&lt;a href="https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/27526"&gt;#27526&lt;/a&gt;.&#10;The runs produced two new bugs and new evidence on two existing ones.&lt;/p&gt;&#10;&lt;h2 id="what-was-missing"&gt;What was missing&lt;/h2&gt;&#10;&lt;p&gt;SLE 16 ships ML-KEM in OpenSSL 3.5, GnuTLS 3.8.10, NSS 3.125 and OpenSSH 10.&#10;We test all of them, and every test forces the group or the key exchange. That&#10;proves the algorithm works. It does not prove anyone uses it. The default comes&#10;from the library, the system crypto-policy or a list hard-coded in the&#10;application, and a change in any of them is silent. Nothing compared the&#10;system with FIPS off and on either.&lt;/p&gt;&#10;&lt;h2 id="what-the-test-does"&gt;What the test does&lt;/h2&gt;&#10;&lt;p&gt;The job records a crypto fingerprint: a JSON file with what OpenSSL, OpenSSH,&#10;GnuTLS, the kernel's &lt;code&gt;/proc/crypto&lt;/code&gt;, the crypto-policy back-ends, stunnel and&#10;Postfix offer and use by default. Then it runs 17 client/server pairs on&#10;127.0.0.1 (OpenSSL, GnuTLS, NSS, stunnel, Go, curl, python, OpenSSH, libssh)&#10;and records the group each pair negotiates. It enables FIPS kernel mode,&#10;reboots, does both again and diffs the two fingerprints.&lt;/p&gt;&#10;&lt;p&gt;The FIPS diff is over 500 lines on SLE 16, almost all expected: algorithms that&#10;are not FIPS approved disappear. Each expected change has an entry with a&#10;reason in an approvals file, and any other change fails the job:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nt"&gt;&amp;#34;scope&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;fips_off-vs-fips_kernel&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;&amp;#34;path&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;kernel_fips_disabled&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;&amp;#34;op&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;+&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;value&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;ecdh-nist-p192&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;ecdsa-nist-p192&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;reason&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;P-192 is not FIPS approved&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;37 entries cover SLE 16.0 and 16.1 on x86_64, aarch64 and s390x.&lt;/p&gt;&#10;&lt;h2 id="what-it-found"&gt;What it found&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Client -&amp;gt; server&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;16.0&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;16.1&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;FIPS on (both)&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;OpenSSL, curl, python, NSS, GnuTLS&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;X25519MLKEM768&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;X25519MLKEM768&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;SecP256r1MLKEM768&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Go&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;X25519MLKEM768&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;X25519MLKEM768&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;X25519MLKEM768&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;stunnel&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;X25519&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;X25519MLKEM768&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;P-256&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;GnuTLS with &lt;code&gt;NORMAL&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;P-256&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;P-256&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;P-256&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;OpenSSH&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;sntrup761x25519&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;sntrup761x25519&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;ecdh-nistp256&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;curl sftp (libssh)&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;curve25519&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;curve25519&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;ecdh-nistp256&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;With FIPS off, the stacks that read the system policy agree on X25519MLKEM768.&#10;stunnel 5.74 on 16.0 has its own classical list; 5.76 on 16.1 adds the hybrid.&#10;GnuTLS with its built-in &lt;code&gt;NORMAL&lt;/code&gt; priority stays on P-256. libssh 0.11.5 has no&#10;ML-KEM. OpenSSH picks sntrup761x25519 because the crypto-policy puts it before&#10;mlkem768x25519; with &lt;code&gt;ssh -F none&lt;/code&gt; it picks ML-KEM.&lt;/p&gt;&#10;&lt;p&gt;With FIPS on, TLS moves to SecP256r1MLKEM768 (P-256 plus ML-KEM) and stays&#10;post-quantum. OpenSSH falls back to ecdh-sha2-nistp256: its FIPS mode has no&#10;ML-KEM key exchange. stunnel hard-codes P-256, P-384 and P-521 when&#10;&lt;code&gt;fips = yes&lt;/code&gt;. Go keeps X25519MLKEM768: it has its own FIPS switch. The kernel&#10;diff also showed &lt;code&gt;ecb(cipher_null)&lt;/code&gt; disabled with &lt;code&gt;fips=1&lt;/code&gt;, a known bug that&#10;breaks IPsec in FIPS mode, now seen on 16.1 too.&lt;/p&gt;&#10;&lt;h2 id="the-first-bug-draft-was-wrong"&gt;The first bug draft was wrong&lt;/h2&gt;&#10;&lt;p&gt;On s390x, the curl sftp probe failed on 16.1 with &amp;quot;Could not set remote port&amp;quot;.&#10;curl 8.20 to 8.23 passes the port to libssh as a 16-bit value, and libssh reads&#10;it as an &lt;code&gt;int&lt;/code&gt;. On a big-endian CPU that reads the wrong bytes: ports from&#10;32768 up are rejected, and below that the host key is checked against the wrong&#10;port in &lt;code&gt;known_hosts&lt;/code&gt;. The fix is in curl 8.24.0&#10;(&lt;a href="https://github.com/curl/curl/issues/24112"&gt;curl#24112&lt;/a&gt;), and&#10;&lt;a href="https://src.fedoraproject.org/rpms/curl/c/3a83306219af243ad9b1383d11323915ff5395b5"&gt;Fedora hit the same bug&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;The AI agent's first bug draft claimed that every sftp URL fails on s390x. Its&#10;reproducer used port 22 with &lt;code&gt;-k&lt;/code&gt;, which would have passed. s390x jobs see&#10;infrastructure failures often enough that I asked for proof first. The failure&#10;then reproduced under qemu-s390x in a container, the curl and libssh sources&#10;matched the shipped binaries, and the openQA history showed no infrastructure&#10;pattern. Those checks found the 32767/32768 boundary, and the bug went out with&#10;a reproducer that works.&lt;/p&gt;&#10;&lt;h2 id="what-the-review-changed"&gt;What the review changed&lt;/h2&gt;&#10;&lt;p&gt;When a module fails, openQA can revert the VM to the last good snapshot, which&#10;would have deleted the FIPS-off fingerprint the second run diffs against. The&#10;module now keeps it.&lt;/p&gt;&#10;&lt;p&gt;The approvals got stricter. &lt;code&gt;/proc/crypto&lt;/code&gt; drivers depend on the CPU, so they&#10;stay approved as a block, but an algorithm may only disappear if the kernel&#10;logs it as disabled due to FIPS. Fixes are reported too: an approval whose bug&#10;no longer matches anything, or a known gap that now negotiates a post-quantum&#10;group. Neither fails the job, so the update with the fix stays green.&lt;/p&gt;&#10;&lt;h2 id="result"&gt;Result&lt;/h2&gt;&#10;&lt;p&gt;The verification runs passed on SLE 16.0 and 16.1 on all three architectures.&#10;The job turns red only when something new changes. None of the four bugs is&#10;public.&lt;/p&gt;&#10;&lt;p&gt;The FIPS-off half also runs on Tumbleweed: the&#10;&lt;a href="https://openqa.opensuse.org/tests/6381690"&gt;verification run&lt;/a&gt; on&#10;openqa.opensuse.org passed, and the Tumbleweed job group gets it after the&#10;merge. Last year a crypto-policy change on Tumbleweed&#10;&lt;a href="https://bugzilla.suse.com/show_bug.cgi?id=1255093"&gt;disabled the X25519 key exchanges in SSH&lt;/a&gt;.&#10;The test would catch that kind of change on the first snapshot.&lt;/p&gt;&#10;&lt;p&gt;Not covered yet: Java and strongSwan. For Postfix the test records the&#10;configured group list, not a live handshake.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;p&gt;&lt;strong&gt;How this was made&lt;/strong&gt;&lt;br&gt;&#10;AI help: an AI agent compared the fingerprints and matrices of all runs, sorted&#10;the FIPS diffs into the approvals baseline, ran the qemu-s390x checks behind the&#10;curl bug, and replayed the stricter checks against the stored runs before the&#10;new verification runs.&lt;br&gt;&#10;Code: reviewed line by line by me, like any other patch, and checked in&#10;verification runs.&lt;/p&gt;&#10;</description></item></channel></rss>