From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 23ADE1FF09C for ; Mon, 02 Nov 2026 15:07:52 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id DB8CC217C4; Mon, 02 Nov 2026 15:07:48 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 02 Nov 2026 15:07:36 +0100 Message-Id: Subject: Re: [PATCH common 0/2] ticket: sign RSA tickets with SHA-256 To: "Mark Atwood" , X-Mailer: aerc 0.20.0 References: In-Reply-To: From: "Shannon Sterz" X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793628456171 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.661 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JVEDKEP3Y4ZAVJNHDLQYC2YARHEKNDJJ X-Message-ID-Hash: JVEDKEP3Y4ZAVJNHDLQYC2YARHEKNDJJ X-MailFrom: s.sterz@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri Oct 23, 2026 at 8:36 PM CEST, Mark Atwood wrote: > RSA tickets are currently signed with SHA-1, because that is the > Crypt::OpenSSL::RSA default. NIST SP 800-131A Rev. 2 disallows SHA-1 for > creating signatures. With a FIPS provider that enforces this, such as > wolfProvider or the OpenSSL FIPS provider with its signature digest > check enabled, the signing call fails and nobody can log in. > > The change is split in two so that it can be staged for clusters with > mixed versions, where an updated node forwards its tickets to nodes > that are not updated yet: > > 1/2 makes verification accept SHA-256 as well as SHA-1. It changes no > issued ticket and can be applied right away. > 2/2 switches signing to SHA-256. Nodes without 1/2 reject the new > tickets, so this should go in once 1/2 has been in a released > version for a while, for example with the next major release. > > The SHA-1 verification fallback can be dropped in a later major release, > once no supported version signs with SHA-1 anymore. Tickets are only > valid for two hours, so it does not need to cover old tickets, only > nodes running old versions. > > Tested with "make check" on Debian trixie with the build dependencies > from pve-no-subscription. The new test fails on master for the SHA-256 > cases and, with only 1/2 applied, for the signing checks of 2/2. I also > checked a ticket issued with the series applied with > "openssl dgst -sha256 -verify", which accepts it, and with -sha1, which > rejects it. > > A separate patch for pve-access-control removes the leftover SHA-1 CSRF > token fallback there. > > Mark Atwood (2): > ticket: accept RSA tickets signed with SHA-256 > ticket: sign RSA tickets with SHA-256 > > src/PVE/Ticket.pm | 19 ++++++++- > test/Makefile | 1 + > test/ticket_test.pl | 102 ++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 121 insertions(+), 1 deletion(-) > create mode 100755 test/ticket_test.pl > > > base-commit: d3e8405874f43e4a128a11d7ce829102fda2eefd Hey Mark, thank you for these patches, one small note up-front: these patches will also affect PMG as it uses the `PVE::Ticket` module for its tickets as well. This should maybe be mentioned in the commit messages. Noted a few smaller things on the patches. IMO nothing that needs to hold up at least the first patch here. The second patch could be re-written so that we can possibly apply it sooner, too. See my comment there. Note that these patches no longer apply as a ticket test module has been applied since. Thanks again!