Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp859887lqo; Fri, 10 May 2024 19:06:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfOYbiWHV4H7BgAqqjFiKyjDEA1F3ZgXUnJkjgz1w5VIefZtFSE8Sbxg27lroNlMxY3D47rmxNIxbHZwztPobzcDMO4SHo4Q364587Fw== X-Google-Smtp-Source: AGHT+IHf68uQOxI4kcuH+XYoRgf30bKWJcpz+GErXsnjA4yhEsjMQtLRWx4EAuMjM0cjyW8cWF46 X-Received: by 2002:a05:6a20:5b19:b0:1af:be8c:d15a with SMTP id adf61e73a8af0-1afde1c5735mr4985029637.52.1715393189272; Fri, 10 May 2024 19:06:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715393189; cv=pass; d=google.com; s=arc-20160816; b=fwOR3F0ggfJGay6h8SNLrqMlTsHCx7NhijpGDq+wndfKt+kHUI6VO5zHXsvOi/dCeW 3BOZ/JYqiJHSqNm4ZuSIzjjY5BOeu4As4m2KuSrJAK23Jhx+1eUucFF5MD8JWmIULMCD MQEVo32kqucBoXPjXTbGwGCjiB6htqj2kIHD8YgashEdj5goBuBO7I8y8LTRfm42kzWW 2RN3oYIx51gnQLYXkmMFteJzNx2P2QMoGxkBUG+j+xGX/UYg1w1OOLbqPhn3Qc8IiL7k TcePo2S37owc+mdQOlC9lBqvXYoulkLy53xkRFpRnR/82BtdbtrIuxl/Ylrp8YB+py/z ZRtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=x3HL2ySMvExTOaOp7eDb5A7n6kVUSNe86nishZw/MiM=; fh=EF3UtRjFDJzaJUuaxoeStXdz65KgBSrYMEh6DIdi7kY=; b=w/QHhG3A4DWhqy2Baj6ULZK7aMwLj/YK+QTkeEDo8NI0H/CJ1pKsNyaDPapMh+asKM 6tDMioaZJPuSishK888LaMJsrEOovr9oxg6ebhUBzDoTM3UjRcwQXTFiWptZl6shokJJ a9hReEH0vgG1McICsld/cAlOo37bKr1Tr26YIU+V89wtfBDQvfOKNiWKPVTGW4Va8Vpy Bp8RTvSypMwtyBOXuGLwKWhAIPgFhurTAA+9TZ5H6+gMOqAuYSJfWemMk51O8HZkFgir +DtS0YPTJrnvVdCrC2zyN0U5L+wUNZ3akr7J/Rt+Dba6/JpsSsMbHWXTnw7/rq68jicr t2vA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pqcoFL+V; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176371-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176371-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628868c15si6922781a91.28.2024.05.10.19.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 19:06:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176371-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pqcoFL+V; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176371-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176371-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D2A4DB22ECE for ; Sat, 11 May 2024 02:06:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D999214F98; Sat, 11 May 2024 02:06:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pqcoFL+V" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0A25A611E; Sat, 11 May 2024 02:06:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715393175; cv=none; b=In/f5R0amzYFbYPDO7chtGpbuHQuokmsv+b5cNvT+KLijUrqV6Nlgh0vCeuMvq/YcaWV6fYqrS1bGonuTlzUH4FhqnOQIBi51++lRKYa18DUyxpRljlnyR1edwvpzXo6qnYze8zDnCjWSAB+aLEF9gBUL2uMzlGYwAeWV3Rqyl8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715393175; c=relaxed/simple; bh=gaEDpwoRE7YrdemX74x+O4RlWvRr7swVJqWOPuQ0nT8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bl2MRLCHiwB4ot830jLbev1tA17n/kg0PblLELZdTl9COGzOinAqaN57dTZa9iB/k/8Yq0aei6Sk704DqJoYLs6+lW7RXohs2SsaVm5wlf1etEo4DQxiYsSSYs5zke9I3g6Y2djs01vuX3PTONRrTxpIDUTBwxFGmvYZwxw4NYo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pqcoFL+V; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7261BC113CC; Sat, 11 May 2024 02:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715393174; bh=gaEDpwoRE7YrdemX74x+O4RlWvRr7swVJqWOPuQ0nT8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pqcoFL+VlKHWtHKexREWKscbXMsEeMhNILBdmQpilhFisDh/qohXX6qiONHa1J7mA SgXrRID1wzxYfm+QHMEPrb4L3cjwpdN3b+JHgohd7zM0wHDzSsNTLbFpsC/lk+UowK 2M+taJPNhTHs1P10EV4KU9IMokGC/bYW6jPluoWhPvjZxrPYtK9t/fmBg89ARb3TvB zErwqvymfCLNLs+mhg/6f2dPS0B0m7DimG2QZB9ckae3X4P8S+yIWlWtdNxEV9U1jq B3RN4tuQ2Fs2VGKbogX6eZxBvTm8jkuj/QOO3JQQvnVFTa3+go8ktAEKPG0a3qc96B Vd+knz5bIfntg== Date: Fri, 10 May 2024 19:06:13 -0700 From: Jakub Kicinski To: Ryosuke Yasuoka Cc: krzk@kernel.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, syoshida@redhat.com, syzbot+d7b4dc6cd50410152534@syzkaller.appspotmail.com Subject: Re: [PATCH net v4] nfc: nci: Fix uninit-value in nci_rx_work Message-ID: <20240510190613.72838bf0@kernel.org> In-Reply-To: <20240509113036.362290-1-ryasuoka@redhat.com> References: <20240509113036.362290-1-ryasuoka@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 9 May 2024 20:30:33 +0900 Ryosuke Yasuoka wrote: > - if (!nci_plen(skb->data)) { > + if (!skb->len) { > kfree_skb(skb); > - kcov_remote_stop(); > - break; > + continue; the change from break to continue looks unrelated > } > - nci_ntf_packet(ndev, skb); > + if (nci_valid_size(skb, NCI_CTRL_HDR_SIZE)) > + if (nci_valid_size(skb, NCI_DATA_HDR_SIZE)) #define NCI_CTRL_HDR_SIZE 3 #define NCI_DATA_HDR_SIZE 3 you can add a BUILD_BUG_ON(NCI_CTRL_HDR_SIZE == NCI_DATA_HDR_SIZE) and save all the code duplication.