Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2594520rda; Wed, 25 Oct 2023 07:14:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlDWikbsNZLj/QOyi3aBxlRxtHiAJC0V/kdUqJ5CjUzlExE7gZ1lqCR/2KD5gTKyxMdili X-Received: by 2002:a25:aae9:0:b0:d9b:5428:d601 with SMTP id t96-20020a25aae9000000b00d9b5428d601mr15670130ybi.21.1698243268042; Wed, 25 Oct 2023 07:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698243268; cv=none; d=google.com; s=arc-20160816; b=xBZoFEl8rrO9TUCSiAhculbkMyuda0heLMqASkydkJLrSk4PU7Z6SA8TiJpg55QVHN PDS21w+NN0GE5y1GwOZ2FKaROV8L4LGALmhJzt9VWCQjoPZoSZuF6xvfgwr8xQaHWid9 A/ySBSgsiy9NVGC5bJuOz0ywkzulmNEMRJKEdS09YrQclt/zkF8HYuDhZahTJJZ4kXkc vEgHGdkPlWMCbtXAOB6xPQnLrhuiAYLwMAT1kiy/5hOURA/4RT72iTtbuqlVWdpEWUDT W7EHmwgJ4M4Zt0W3f0LiPEWGTgQzYvc4lZj4GT0tXb3sg2o5AOXifXZfouNp2gps8Dog K6Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=JVJLapesU8tbYt2cyfxkh1y6l5QSGilw+3lcuec9wlI=; fh=xqt8Ie6oO+KDmGw3MrRk3B1GD2sLZqGnPXyfPERkHVs=; b=KCrHkwHP2KqQc4rORGFmtnGnvMQA2CN1lXGa4DX3MHtf5cOr1WcN/ItXXqhwz0vso0 h8tnvobvfVik8c1Wy+UgODehZUhkO0iiFMSLNcKfewq9a8DFSJI3+Tddwf7S1f6nV+F2 22F0sv3s7VY5j4u6DPJOoy0c8dBkSItntfudVd80fGveb7wFTVjFfPYiz3T+ceOhedQ/ f4USmQt+qB4i3A8rqRnkdHA1Ogko3X8Nv1XjOwSOhTVYNJy9aRCpFNo5T41/VytbZPea bYIxkqfruj8TXVM0WJ+cjNDIWWVOsWjoGpLj9jsFKmysmMLFZNliRD9uqg67FSz2ffX1 /Iog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FBxMYZrT; 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 14-20020a25030e000000b00da03c34c384si4447265ybd.24.2023.10.25.07.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:14:28 -0700 (PDT) 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=FBxMYZrT; 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 AF8B38142DA7; Wed, 25 Oct 2023 07:14:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344894AbjJYOOP (ORCPT + 99 others); Wed, 25 Oct 2023 10:14:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343719AbjJYOOO (ORCPT ); Wed, 25 Oct 2023 10:14:14 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66742A4 for ; Wed, 25 Oct 2023 07:14:10 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A42B3C433C8; Wed, 25 Oct 2023 14:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698243250; bh=u8Hb+8CBmmdXR1Qra0P9J+M1NhZnHM1zSoQDSKIkf+E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FBxMYZrTnOu+I/bzIz/S2X3Xe36VpCOVt3hg8nsL2D4GTDB63LtkrugeFQpz7DZl+ AI1kUjP3apyN8JBjjK8IVo11Gv5VRBSxkn5X/3QjHF2eeJVIKwDv7XjiW++HfK4SrI +Tc8MU3kIPwG/hT8w1YXEnztFfONJJVG48TXOATncsZ/scGB49/xYzFc6tWeLUqlGQ NbOfymHXus9jGMODCz7oCaF519wB56yh6hnqSM4e8SpWs1yX0vOs7SUaB7YZ3vPBn/ fZjlI9pIWL5nmUkeZ6CdUXySUaS32LbmkByLGjoEKFhzEbjMDIcgeQQ7GTtCMQTAez HncWaUKF/CsPw== Date: Wed, 25 Oct 2023 07:14:08 -0700 From: Jakub Kicinski To: Sabrina Dubroca Cc: Hangyu Hua , borisp@nvidia.com, john.fastabend@gmail.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: tls: Fix possible NULL-pointer dereference in tls_decrypt_device() and tls_decrypt_sw() Message-ID: <20231025071408.3b33f733@kernel.org> In-Reply-To: References: <20231023080611.19244-1-hbh25y@gmail.com> <120e6c2c-6122-41db-8c46-7753e9659c70@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 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 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]); Wed, 25 Oct 2023 07:14:22 -0700 (PDT) On Wed, 25 Oct 2023 12:27:05 +0200 Sabrina Dubroca wrote: > > My bad. I only checked &msg->msg_iter's address in tls_decrypt_sw and found > > it was wrong. Do I need to make a new patch to fix the harmless bogus > > pointer? > > I don't think that's necessary, but maybe it would avoid people trying > to "fix" this code in the future. Jakub, WDYT? No strong feelings, but personally I find checks for conditions which cannot happen decrease the readability. Maybe a comment is better?