From nobody Tue Jan 18 00:06:48 2022 X-Original-To: dev-commits-src-all@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 B70151950C14; Tue, 18 Jan 2022 00:07:00 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jd8GC4xgVz3Cwq; Tue, 18 Jan 2022 00:06:59 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x833.google.com with SMTP id v7so20734709qtw.13; Mon, 17 Jan 2022 16:06:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=m8xjXP5bbaDBJjxmJCZ5lzIccqDoNeJEM5KhZklkBw8=; b=Gyz/OiNlS8Cvh9xk/uBEfHPi/4A006pKtg7zoI/JtJcOxbJEdkQLVuCskkN6hOIjj6 GRMxxghibVJSoSRCb31ZCouvANmwPp/cATOTZuRI9lKs/wNvXanQ/8jB1nQkHzY4dUd8 UIMxcdIJYhCax2cGPfQM304997xaOM3ArfMTzlKCzwMUFUgxMFgF74xy/nzwVcL99NPG A3r5JZoBXGLn/CG6h2/ZN/xzg7qcqZ6LeKWANhhRgZXqicR1Est/6Ks3DQvQ9/VE4Jdf Ck+9HVMJ6II6FJqlWSkQKkiTX3MWrgF1yur4Pw+YebvuCtFzQYGofDNO59V8IFw95OHy psjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=m8xjXP5bbaDBJjxmJCZ5lzIccqDoNeJEM5KhZklkBw8=; b=DDogUBNL9hmf84uCYr3RI2Uyw1+ieK1UiRRyA3BVBzJm/KSJwzu9XjIGpcINsnDZW5 3fQfIjr48GEJmbADKddn4z1eem4ID8Eoruj/r6cp+MpmbRga0nL4CNR7sja3+lzSporo /IyPo1o2ex7g5FAJ2qPTyk75SoDrljomBIr2Ou4IP0wFEShsrBnM8z4j95wNG7FK8U8x mp29XkhmJvLt1kmSSkOhAJrKT4XAsU7nUIi9gFPPIxB+qcMGkCl6Kwe58M2gPSaPHk9h GEN4yZgAh90shu2o2s4Ap9cI5I0LTIFXvasFTAZ+ZOEMn1NXG3+fhUOoozhxsH2LlXCw 20Cw== X-Gm-Message-State: AOAM531WmE6+E3obdtUiZ5dlBWpul87o5SBm0zps9RXDqmGLbBl0WDD0 3bKuSVAmUdJJYcPsa6LuJisC0KwuHqI= X-Google-Smtp-Source: ABdhPJw5pE5N9p5eex1FVzLhbMp62AbFSr8zaEcTearLqsny6JO56gDt0qewoF6yNu2V1Y/WW3udYw== X-Received: by 2002:ac8:4c8f:: with SMTP id j15mr15187033qtv.671.1642464411737; Mon, 17 Jan 2022 16:06:51 -0800 (PST) Received: from nuc (198-84-189-58.cpe.teksavvy.com. [198.84.189.58]) by smtp.gmail.com with ESMTPSA id d10sm5754340qtb.63.2022.01.17.16.06.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 16:06:51 -0800 (PST) Sender: Mark Johnston Date: Mon, 17 Jan 2022 19:06:48 -0500 From: Mark Johnston To: Guido Falsi Cc: John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: cfb7b942bed7 - main - cryptosoft: Use multi-block encrypt/decrypt for non-AEAD ciphers. Message-ID: References: <202201112238.20BMcBgx075881@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Jd8GC4xgVz3Cwq X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b="Gyz/OiNl"; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::833 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [0.40 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.10)[0.098]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::833:from]; MLMMJ_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N On Mon, Jan 17, 2022 at 10:30:05PM +0100, Guido Falsi wrote: > On 15/01/22 01:26, Mark Johnston wrote: > > On Fri, Jan 14, 2022 at 10:27:12PM +0100, Guido Falsi wrote: > >> On 11/01/22 23:38, John Baldwin wrote: > >>> The branch main has been updated by jhb: > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=cfb7b942bed72cb798b869d2e36e0097dbd243b2 > >>> > >>> commit cfb7b942bed72cb798b869d2e36e0097dbd243b2 > >>> Author: John Baldwin > >>> AuthorDate: 2022-01-11 22:18:57 +0000 > >>> Commit: John Baldwin > >>> CommitDate: 2022-01-11 22:18:57 +0000 > >>> > >>> cryptosoft: Use multi-block encrypt/decrypt for non-AEAD ciphers. > >>> > >>> Reviewed by: markj > >>> Sponsored by: The FreeBSD Foundation > >>> Differential Revision: https://reviews.freebsd.org/D33531 > >> > >> Hi, > >> > >> I've just updated to recent head. I have a laptop using ZFS on geli > >> setup and now it's unable to boot. > >> > >> I've seen the failure starting with git revision > >> 3284f4925f697ad7cc2aa4761ff5cf6ce98fd623 (LRO: Don't merge ACK and > >> non-ACK packets together - 01/13/22, 17:18) > >> > >> it's still there with revision fe453891d7ccc8e173d9293b67f5b4608c5378dd > >> (01/14/22 11:00:08) > >> > >> While a kernel from the binary snapshot downloaded from mirrors compiled > >> from revision ac413189f53524e489c900b3cfaa80a1552875ca (vfslist.c: > >> initialize skipvfs variable 01/05/2022) is able to boot correctly. > >> > >> The machine panics as soon as it tries to work with geli, this is why I > >> am replying to this commit message. I'm not completely sure this is the > >> commit to blame, but it sure is related. > >> > >> I have not been able to save the backtrace to file, but the last two > >> calls are to: > >> > >> crypto_cursor_segment() > >> swcr_encdec() > >> > >> so it points to the last part of this patch. > > > > I think the problem is that crypto_cursor_segment() doesn't expect to be > > called once the cursor is at the end of a buffer. It may or may not > > perform an invalid memory access in that case, depending on the > > underlying buffer type. > > > > Fixing it would complicate the cursor code, maybe it's better to just > > change cryptosoft to avoid this scenario: > > Is this being followed up? Ads I said this patch works for me and I'm > using it locally. While I'm unable to review it, as a user and > contributor I'm interested in the issue being fixed for good in the > official tree. > > If discussion is already ongoing in a publicly accessible can you point > me to it? Thanks! I committed it just now, after some private discussion with John. Thanks for the report and for testing.