From nobody Wed Nov 29 17:58:53 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 4SgRsB74cVz5326h for ; Wed, 29 Nov 2023 17:58:54 +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 4SgRsB63YCz4FpF for ; Wed, 29 Nov 2023 17:58:54 +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=1701280734; 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=rypvHeeTXqMFhfq9CGBpXW/d8UDygH3eS4y8kxyDDko=; b=UtwuSI0GMucnTbxmXGETT6419oj+D+h3SS5jxHMI7CNWaABwd83n5DgQ3Ki5t2fiD0PGN5 D6kEQMbxd7C9dFYM5UhOP03L1dESf1aJc7WUufoFYPXu1JiYaDCt6N/0hzPXN8p+WAgubl Fw85lvJEQnw2lSgWy15eP3vjR9Mt3YiM+6SFK9xTi+1bC4pS8NFL0JcWU5g+p5N5POSmKY J9BvqBMZJmCgsrbNFI8LZY9aFiHmtMTdGB93ZEifodJM0AQ83cxG8PrGKK/+kKCyKOquWz +Zu8eYPyPudPaobmrHWwm4QKc3op/Xx1tqK5Xwmh1IOWkJlnBMFYFJrdlTGEiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701280734; a=rsa-sha256; cv=none; b=TWQLpINCk2U4iPvD19Nx2AvguZog7GTGrjUfc047Cf7tCGvTVitYIhL9QSKSMonQRoDpfB Sxq7uaGIOVP0iop7RngEBsoE1xjNHm/kNfewNgSiy6gWUMi7onmiR0l+FXB8LpIA23T5w4 qsZaanqTvphyn5g+GXVMO8z1CTh7lv0mFIt+SZFKuLem1izp4xFhPkPoPJ7RM8j9YcRZ6r USSnWIk8FL9oN/QbGaWk6Ck7+xMcIoRYYx32efJniAOJmQEZM44ydKLVznFoxGI1pzHEO4 r+PWV1MTgrLMafqByqxfD6dktD54agwkd6A0xagQtcYXm8KctwdVzdRYk9IvnA== 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 4SgRsB574rz1GD for ; Wed, 29 Nov 2023 17:58:54 +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 3ATHwskC006561 for ; Wed, 29 Nov 2023 17:58:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3ATHwsbe006560 for fs@FreeBSD.org; Wed, 29 Nov 2023 17:58:54 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: Wed, 29 Nov 2023 17:58:53 +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 #16 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D5c0dac0b7a012f326edab06ad85aee5ad= 68ff120 commit 5c0dac0b7a012f326edab06ad85aee5ad68ff120 Author: Mark Johnston AuthorDate: 2023-11-29 17:51:55 +0000 Commit: Mark Johnston CommitDate: 2023-11-29 17:55:51 +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 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.=