Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp207889lqg; Wed, 10 Apr 2024 23:20:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzg4Dtif3MtOliW/oQW5EUW+XS6anZD8+udf5Hbd/3MY3OqyblH31/XKfAgroJXZ2x5j2a2HSKmKn9yV8yaG4MkI5OhVHkPH3O33vrYg== X-Google-Smtp-Source: AGHT+IE0kjbWLDxY3tl7Mfe7QxreCA+aS0a5iNJGwXYOyukK3OBfGIbzmhyn0qGZqiREqmbYjK1G X-Received: by 2002:a17:906:1844:b0:a51:e5c7:55b7 with SMTP id w4-20020a170906184400b00a51e5c755b7mr2505757eje.47.1712816457260; Wed, 10 Apr 2024 23:20:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712816457; cv=pass; d=google.com; s=arc-20160816; b=NDb+6sTNNJOcLVR/S7cd2nOO8gIcS3bkUmsPNIfU1Uvv6EiJO5i1UIVgEs+3XUtfWG e4TyMj6/HO1ymlJ3cGnTZ9DKgGb8c2T469xF72w02ipU8rowrJf3y7pDPSgIU/juz32R l86QcNn+jT2oujN8l9GXfvoZ76RQZFuNQhV9sHwmz37qy0+XJHb/B7v7JC1asMtggrAr rOHZtD/Q3LlcarVGEf0c2egBalvtDbxjfFHfzP+PUqthnMY55ooUJAZLwWB/GiobMK7J CUhMhS6NJFitp0WlSkyrRpBqTe+wzSJUcSI4V4mg/qNn+M6ziH33UoTcFlG2bGx2P5Ov LajQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=dV21BWGe2ufgawa50AocOZVeA8TiHinbeJSrkanC5Ds=; fh=0ERYEAvmVpFCE0cfbqmH2Jc2HoMnuv8LRwkGRaA6G0o=; b=Fs/xP7YHmjH31YLtv1WUmt2+l06vlppmRRTrwMQ58NUkZXQfW/zxsOW6osUckUGfYi UbhkXBW1Zt8+fA9Jrjwd615BFxvJ7uXWz8nb9fCVKi/R7YRJykEx43pNU9mEH0gmYyLV Q5OsufW0I60XgNDYEhPtzvw6V6clfo2HPpZihP1t1pO0ST+sE/f/pczdz03UG/DaFxF6 rFklT0I0s0HD0Qm63a3aagH7kDMqwEx/3RWX8mQHRbGbVuFZUlUQ6BNaT2YLLqZWxXbv PXh7BxBirtANmJJX5QGGWUSwCA+o0r1EpCu5NwhsrEL4U84+TZK2n82lScynq5PXModZ Q/BA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cJNS5Xvh; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-139843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ji4-20020a170907980400b00a51d2dadd18si438277ejc.549.2024.04.10.23.20.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 23:20:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cJNS5Xvh; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-139843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CF68B1F21FCF for ; Thu, 11 Apr 2024 06:20:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9521413C806; Thu, 11 Apr 2024 06:20:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cJNS5Xvh" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA4DE13CABF for ; Thu, 11 Apr 2024 06:20:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712816431; cv=none; b=UaYr53hGm4G/cSimzAZA1SxL5OT44cDlm2q3Up1q7m5O1eM4sqG/il9lEakju1dvXlf/QaTRJH21fVouXY9yUmArIhX75RnPY1PuYneYeCXn1WiZriopIHPUBOAqP/QdB0xyo45Etu+GErU0GJ7ATyTBROpdwfHADkSFBY+bCbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712816431; c=relaxed/simple; bh=3QrXsH4rkf8GAhPmF0phCe/NHT9Nq5V7cv+MZiPf1H0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=sZVl6kqab6Dl22S/DcEiVGK928pLwwc22iJekDG3Q8min6vbfhLSO9oa17ND/mtWdDLUr55AeFbjK3oB1Bb+E8/wACIoo0BROOcv1M2I2PkCSFrcjhtQZzvvgNVwYIbhfhPUYvuXvSSOkT0+v8RaUpixvzOrOR6GEwwd8DdFOm0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=cJNS5Xvh; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712816428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=dV21BWGe2ufgawa50AocOZVeA8TiHinbeJSrkanC5Ds=; b=cJNS5XvhMAzctMMH+i9sLDV7LICmQTA+bSraAHtcD1K1y+HPvg8iKs79l9WxkgOUkYy4hC swAZMRhqY/T4zhxv7Qnk0jj94h0pIAXPiWs31pB/vF217kxA9tATtRHzHBHfP+QpFcn+yy TtnnYYUjvYRMUh83C/BShu0QbwQw2EE= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-512-XIZow07iMkWyPiwPuNuOVQ-1; Thu, 11 Apr 2024 02:20:26 -0400 X-MC-Unique: XIZow07iMkWyPiwPuNuOVQ-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-346b68157cdso126955f8f.0 for ; Wed, 10 Apr 2024 23:20:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712816425; x=1713421225; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dV21BWGe2ufgawa50AocOZVeA8TiHinbeJSrkanC5Ds=; b=oIJggbO2Wl8IeWDUzfUq9Q8N16GeDxdUAvKyz4yWm2yzI+85VImGZr/lZJAMQtbV8e TM7Isd+S33CptBWhtsouRQ8b20788fYfX3QyN6kuI7pCOQGOlKHrQ7HMGibbRFIVdkjI sBTHyA8J025bQlumAVIyLbf+T1gfxFiffVr2oTczSc2fTyPjWfGtdmCEahX5aajKTW/s AZIZqN/4RNYthxYL/lfXUknhiUMlxkNSBZhxuC/Lbs0vNSRvNJWZa5mz/yfWfCKRGOk1 smc2rLWag5hTTz4wRg4xouJChplyjEHo7TrzO7ey+s4BIf8cS4T/E2U3E1Yd6DE4y2r4 bdZA== X-Forwarded-Encrypted: i=1; AJvYcCUT41V+zgM+WZwLmBY8zv40dR/APgfjNLu6NTOcNbcMM1Xj6oYeVOrRpctg7yMgDEaW9Ce1GSFTIY53LSQqDg/2n6d+V00gkPka1xIH X-Gm-Message-State: AOJu0Ywz3aIAnhFa8HMSUo9cK53Y7ItRocJBTvyiTXGiCRadMzQJnZev rzAK4cefP1tcJ3s8HTHNAt+e6zv335VLuYcaQ9A7gN/VfpdOpBniRHzmDPl1yv8qIPrMtqwl3cL 5PMNgUnr6tLWLZnSem/B6V7qOdxfqpPiSpOBff8oozQgsBuDFi2C4wyfc3WmlxA== X-Received: by 2002:a05:600c:1c01:b0:416:5339:d114 with SMTP id j1-20020a05600c1c0100b004165339d114mr3213791wms.1.1712816425408; Wed, 10 Apr 2024 23:20:25 -0700 (PDT) X-Received: by 2002:a05:600c:1c01:b0:416:5339:d114 with SMTP id j1-20020a05600c1c0100b004165339d114mr3213765wms.1.1712816424906; Wed, 10 Apr 2024 23:20:24 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-235-217.dyn.eolo.it. [146.241.235.217]) by smtp.gmail.com with ESMTPSA id ay21-20020a05600c1e1500b00417da7db6b8sm738907wmb.31.2024.04.10.23.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 23:20:24 -0700 (PDT) Message-ID: <504f49cd5322d14d7c0d23d90f1cd7cc41721cf8.camel@redhat.com> Subject: Re: [PATCH net] crypto: chtls: Fix possible null pointer dereferences From: Paolo Abeni To: Aleksandr Mishin , Atul Gupta Cc: Ayush Sawal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , David Ahern , Michael Werner , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Date: Thu, 11 Apr 2024 08:20:23 +0200 In-Reply-To: <20240409090507.21441-1-amishin@t-argos.ru> References: <20240409090507.21441-1-amishin@t-argos.ru> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9Sm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LqR1XKujlTuUTpoyT3xwAzkmSxN1nABoutHEO/N87fpIbpbZaIdinF7b9srwUvDOKsywfs5HMiUZhLKoZzCcU/AEFjQsPTATACGsWf3JYPnWxL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2024-04-09 at 12:05 +0300, Aleksandr Mishin wrote: > In chtls_pass_accept_rpl() and chtls_select_mss() __sk_dst_get() may > return NULL which is later dereferenced. Fix this bug by adding NULL chec= k. >=20 > Found by Linux Verification Center (linuxtesting.org) with SVACE. Indeed a more describing changelog would be better given the patch needs to go much fourther then adding a missing check. > Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") > Signed-off-by: Aleksandr Mishin > --- > .../chelsio/inline_crypto/chtls/chtls_cm.c | 24 +++++++++++++------ > 1 file changed, 17 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c = b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c > index 6f6525983130..6d88cbc9fbb0 100644 > --- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c > +++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c > @@ -939,15 +939,15 @@ static void chtls_accept_rpl_arp_failure(void *hand= le, > sock_put(sk); > } > =20 > -static unsigned int chtls_select_mss(const struct chtls_sock *csk, > +static bool chtls_select_mss(const struct chtls_sock *csk, > unsigned int pmtu, > - struct cpl_pass_accept_req *req) > + struct cpl_pass_accept_req *req, > + unsigned int *mtu_idx) Bad indentation above. More importantly, what about returning a negative value on failure and avoid the additional parameter? It should also generate a smaller diffstat. > { > struct chtls_dev *cdev; > struct dst_entry *dst; > unsigned int tcpoptsz; > unsigned int iphdrsz; > - unsigned int mtu_idx; > struct tcp_sock *tp; > unsigned int mss; > struct sock *sk; > @@ -955,6 +955,9 @@ static unsigned int chtls_select_mss(const struct cht= ls_sock *csk, > mss =3D ntohs(req->tcpopt.mss); > sk =3D csk->sk; > dst =3D __sk_dst_get(sk); > + if (!dst) > + return false; > + > cdev =3D csk->cdev; > tp =3D tcp_sk(sk); > tcpoptsz =3D 0; [...] > static unsigned int select_rcv_wscale(int space, int wscale_ok, int win_= clamp) > @@ -1016,8 +1019,13 @@ static void chtls_pass_accept_rpl(struct sk_buff *= skb, > struct sock *sk; > u32 opt2, hlen; > u64 opt0; > + struct dst_entry *dst; Please respect the reverst x-mass tree order. > sk =3D skb->sk; > + dst =3D __sk_dst_get(sk); > + if (!dst) > + return; > + > tp =3D tcp_sk(sk); > csk =3D sk->sk_user_data; > csk->tid =3D tid; Thanks, Paolo