From nobody Sun Jan 29 07:15:20 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P4Myx05XHz3bQGQ for ; Sun, 29 Jan 2023 07:15:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P4Myw3kN8z4K81 for ; Sun, 29 Jan 2023 07:15:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674976520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IBQMPZZiDuPm2dDkM1l8FDolKM36qdJXyjPW/4hNAbQ=; b=nzNFgBf0ei5NOk4bi5cNZyTF2+Ag1V5E6M4b/y/2jPyX/iXVX2hqgRWxY2gTHhNXLYeljF KTy4GR2+dKG4Rv0XlOXQzsDYQ1CLCyY3vWZ4vL9Hi/8CEp5qA+hoSifgIjiKJZONpA7lU3 j/0KXcNZXP8zsn3DBOZdYt1iHzN+RIVFG74VinHgiL3dSKENBiSFf+K7ixvGZh/H4wAo+v GN7y1jw4jmSHh7p67Urin8gqVRgUh7EwVC6l9W5vKZbomXNPkBa6iKtwhLK6Wge0ykv8L2 CPqvrXX+bRZ36Lq3GXtBrYxqtGOUq5RNn/b2nrWU4kZ7LEwNNp7LEaNLKXVAeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674976520; a=rsa-sha256; cv=none; b=fQOs0e3d161qdTZ1hvT8w/Xesl53kx99GECOYR3aLWKxNfFlnjisJaMzXc2oEo0TAGMrpb 8jUBmEHId/mEyjmqGSzJBnurvejy9RljhQOV75sbzoRapeGBvPf6xbt9MhNbImLegARdyy 2xQCKj5BBTRrnggkjs/b8NExHnScXRdmdydBd2Cx0PpFyQ4HeTL/U5OU92E1UXRgQqCWMQ fvBg41ghr8n9KCM90MymqK/BEQ3bLx7VsfEj2SXsLKa8cLUnCBEVF/I4qzTScrRsv3ooKC aOvrUMK1FV94116NIn2aYtbtCwRVYsclXbPOl9lzS8fyNI5iYNfsMGsrjkNg+w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P4Myw2mK1zKL8 for ; Sun, 29 Jan 2023 07:15:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 30T7FK0d092326 for ; Sun, 29 Jan 2023 07:15:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 30T7FKMD092325 for bugs@FreeBSD.org; Sun, 29 Jan 2023 07:15:20 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 269219] cryptographic operations are not constant time anymore for armv8.4+ and amd64/icelake Date: Sun, 29 Jan 2023 07:15:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: bugs.fbsd@paepcke.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269219 --- Comment #1 from Michael Paepcke --- Hi, not sure where to track this, this might require some architecture decision, not only a simple patch. Summary: Since introduction of the armv8.4 ISA (and all following) and x86/icelake I= SA (impacts: skylake,cannonlake,cabbylake, ...) many base instructions (used by openssl,openssh,libcrypt,ossl in base/kernel/userland/ports) including AES-= NI (WTH?) are not guaranteed constant time anymore. * https://www.intel.com/content/www/us/en/developer/articles/technical/softwa= re-security-guidance/best-practices/data-operand-independent-timing-isa-gui= dance.html * https://developer.arm.com/documentation/ddi0595/2021-06/AArch64-Registers/D= IT--Data-Independent-Timing It is possible to ensure constant time execution again via setting CPU spec= ific register. I might be wrong but as fare as I can see, we do not even have the infrastructure yet, to address this (here)? * https://cgit.freebsd.org/src/tree/sys/x86/include/specialreg.h The Linux Team seems tend to disable this features by default (my personal favorite) as solution and allow to re-enable it via build-time-optimization switch. (Discussion about runtime sysctl/syscall/procfs still ongoing) * https://lore.kernel.org/lkml/YxCQzZqLZ49gLlrH@hirez.programming.kicks-ass.n= et/ Is someone already working in this. Ideas? Personal Preferences? Thank you! Michael --=20 You are receiving this mail because: You are the assignee for the bug.=