Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp479626rdh; Thu, 23 Nov 2023 09:02:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhEOOd0TpZ/vYFid+KvhJZpmcCMUy0/a7XK4jvf1Vp2+5pLasO5p2D5t+q15j3YKvUme+6 X-Received: by 2002:a05:6870:d3c5:b0:1d7:1533:6869 with SMTP id l5-20020a056870d3c500b001d715336869mr8298386oag.31.1700758935525; Thu, 23 Nov 2023 09:02:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700758935; cv=none; d=google.com; s=arc-20160816; b=NxIl1RHp5qg61rNsVFag3u8llXmjSwSJgiWtq6MlySaEV6hGh/rxsO9E/yzE+nBLR5 XdyF2i+I3qNyeA2G+k/TxOhAE6rqDXQhrKBOAVAi2RN6xoT/Msjor+tlgAy5/YjRfVmC s7GT87irblXTa/lbrslhlgTrS9jFkZabAFvOopiN5wdtsVUoKRQrkbR8yJt9s7BuZPoa BpFh9M2V2Kky6SJUgXEsfiN2S4rSLhoeNKNTDx3RtFhMxVmb631GHgoIJVY45Ojf9M3H Ktd89/ejZdE4cIsnE8WO8VVJ5dvZfCTDuxB+SMbbhYYnrqjOclHAC4/MAgJD5zSsu3bK mr2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=hFpgnGB2tQHUMQdP2wganHV6Uqov2nA9jFARyGFqMUA=; fh=EaHtvhuU+nFf5WB1xFJUHe+sjk+LU13t4qd3bIlQtyA=; b=IMnYQLJhnOhQGHflJkc+cy4mqXXbNRruuix8dlmAHveZEbOxi00yFnyRpDxM+mvdAo 7X1dJjVHXYuhMyHUhgscUsI8ycN6iGf0rYt30XE3jemjhgIf3m/+iJjz2Lq+KYkVOSN6 jX5cNfZEZnwS9PfM9fyTkd+WyHkd9z9UrxQNsGP1iuvy3/MDMK4wxJrBxj7BCyP08og7 oeGSyUaEAO53pTRAoDrdE426vVROUt0RFoBMNKwDEmClc25F8iVjLVCBxGnWNSHv/ZIF TlE1fqKm/fCvt+CT82wV1azlA5hf94shsp976o+iNDSj3rStQ1byc8PW0ufkPPnjP2BL 89KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UthFXOJB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id pu12-20020a0568713a0c00b001f5adef2cc1si225233oac.293.2023.11.23.09.02.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 09:02:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UthFXOJB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 729E98051A20; Thu, 23 Nov 2023 09:01:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345731AbjKWRA7 (ORCPT + 99 others); Thu, 23 Nov 2023 12:00:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235201AbjKWRAU (ORCPT ); Thu, 23 Nov 2023 12:00:20 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17683D54 for ; Thu, 23 Nov 2023 09:00:27 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPS id B2783C433B7; Thu, 23 Nov 2023 17:00:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700758826; bh=c1xQdKu33/2/hzLvS6W0JiVMAuAHBG5kYzsJtKNVht4=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=UthFXOJBPFmYIunQY/p6IYFXB+AxH9hSI+ir01MRWXSYWHCudEPvLRsyb46Nv9asc ZAVXcSu2bhPlzvuXL2qu7/7aYF+uhJG78HazYUp1sce2xE1pd/31SKZeCIfhaRjorG pFt0uecXIdvg28tlTMIQqyX2ogu2JVtFeDjT+0hZOoZCRLGx31cE8yG0Puzp2sARpu WqZ9TQTygSsbIVXZRqIywzzB4hkP6kVHot1lsFNvl6Cfv0tbOtQoGKiZ0MI9SUiNHr r0Bkl+AIaRGQq4IDqFTQjCf/Yf2nRF5ukubFXz+2WRYr4jzjiSNKdGO+3lNKRBNJCe CAsRgS+zLA2Xg== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 911F5E19E3A; Thu, 23 Nov 2023 17:00:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH net] tls: fix NULL deref on tls_sw_splice_eof() with empty record From: patchwork-bot+netdevbpf@kernel.org Message-Id: <170075882659.541.15438374448743865458.git-patchwork-notify@kernel.org> Date: Thu, 23 Nov 2023 17:00:26 +0000 References: <20231122214447.675768-1-jannh@google.com> In-Reply-To: <20231122214447.675768-1-jannh@google.com> To: Jann Horn Cc: borisp@nvidia.com, john.fastabend@gmail.com, kuba@kernel.org, davem@davemloft.net, dhowells@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 23 Nov 2023 09:01:18 -0800 (PST) Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Wed, 22 Nov 2023 22:44:47 +0100 you wrote: > syzkaller discovered that if tls_sw_splice_eof() is executed as part of > sendfile() when the plaintext/ciphertext sk_msg are empty, the send path > gets confused because the empty ciphertext buffer does not have enough > space for the encryption overhead. This causes tls_push_record() to go on > the `split = true` path (which is only supposed to be used when interacting > with an attached BPF program), and then get further confused and hit the > tls_merge_open_record() path, which then assumes that there must be at > least one populated buffer element, leading to a NULL deref. > > [...] Here is the summary with links: - [net] tls: fix NULL deref on tls_sw_splice_eof() with empty record https://git.kernel.org/netdev/net/c/53f2cb491b50 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html