From nobody Sat Dec 02 19:29:25 2023 X-Original-To: fs@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 4SjKkG5S9zz53VHp for ; Sat, 2 Dec 2023 19:29:26 +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 4SjKkG4RdPz4Tcs for ; Sat, 2 Dec 2023 19:29:26 +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=1701545366; 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=0BCfz+WblvR0Na+JBM1Ds0NJWG087IbPkDpVjAo+3Eo=; b=vVL1SoyzIPKxBXSYu5XxeG9jFdRb5aE4WJKwGKLPldU6CcRz4phaxOETTPXWNHSPKXJW0L llw7VkCUqvgcz8pXfBjSipdD9vrlgMAd8WwKPzriJnrjEiy6lVIlIl5Hvn0CpgT03I9yOG Vl6ZuWB/fK68pWvY9GE2vEfLEeKJrtyNSSwtnzq1ZmF+othbhQ9CX5r4+YEuZSEIzVbN6e U/9/jCIeeHL+nYJNvvlE/AHff+Lqcu75tpK/9AL0TbdSrqx2DfEK7BYPXuea5MxrlW9ayC THaVvWzKz3WwlnkLiG3Cs+wk/aNhVKQGXI6oQy5PPUtkqJqfJmAKv+cLz6N35g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701545366; a=rsa-sha256; cv=none; b=eq/KMQAdeDVOVRMxIKbny8kKXj4qWMHA4SuRgS05LEdolPIKLw1r//4VEERgUY0/XfbiK+ C5O5PNRj2JvaSKkRMhQ+rL6JZ8DjR2dZan6aS+yYR4oWmEAw3oEjENjU8eIFDY5f1Sgxf1 Uw8jqDgJPhSySNrYDc5goUjpEs427X9fOQafPwqNAbP0k82nyumgx7ghUHOWO0WBw4+Nwe CZm++9aS0ebzLfOIFKNX81mxwetM+kVymEL3b0IE/JNuwGFCWw9C5YN1+sDU85sCBrKDuK GUpYDWJLL1O2iheSIFOFeyE+a9z8kowLDu+QwgHkFPsYMpFr9Q3dED9NqIy4VA== 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 4SjKkG3RvLzTgd for ; Sat, 2 Dec 2023 19:29:26 +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 3B2JTQ4P050145 for ; Sat, 2 Dec 2023 19:29:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3B2JTQjp050144 for fs@FreeBSD.org; Sat, 2 Dec 2023 19:29:26 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 275306] 14.0-RELEASE: ossl(4) causes data corruption on encrypted ZFS filesystems/volumes Date: Sat, 02 Dec 2023 19:29:25 +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: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@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: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275306 --- Comment #18 from commit-hook@FreeBSD.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D84ef0a84ecaa4f5d9bcfed3ce10c28895= 3491e7e commit 84ef0a84ecaa4f5d9bcfed3ce10c288953491e7e Author: Mark Johnston AuthorDate: 2023-11-29 17:51:55 +0000 Commit: Mark Johnston CommitDate: 2023-12-02 19:25:42 +0000 ossl: Keep mutable AES-GCM state on the stack ossl(4)'s AES-GCM implementation keeps mutable state in the session structure, together with the key schedule. This was done for convenience, as both are initialized together. However, some OCF consumers, particularly ZFS, assume that requests may be dispatched to the same session in parallel. Without serialization, this results in incorrect output. Fix the problem by explicitly copying per-session state onto the stack at the beginning of each operation. PR: 275306 Reviewed by: jhb Fixes: 9a3444d91c70 ("ossl: Add a VAES-based AES-GCM implementation for amd64") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42783 (cherry picked from commit 5c0dac0b7a012f326edab06ad85aee5ad68ff120) sys/crypto/openssl/ossl_aes.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=