Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1546009lqt; Wed, 20 Mar 2024 07:15:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUr8I9xosmLtkFKyR/yaxAe4DJbu/+tCoBmla+tKTGE6jg12VXzOqs41Mpamrwk5pNxCcXC0c18dRR3zXPdKplPsL4fB7Ok2fn5h7T1Tg== X-Google-Smtp-Source: AGHT+IGrutJQsgLvneStWy3yb/VfgaovRrST06OcQkOsb9ecKSAPwb4lrf9KehIeWgVXHzAt77yp X-Received: by 2002:a05:6a00:99b:b0:6e7:3d34:404c with SMTP id u27-20020a056a00099b00b006e73d34404cmr7694325pfg.1.1710944116640; Wed, 20 Mar 2024 07:15:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710944116; cv=pass; d=google.com; s=arc-20160816; b=p5jUs4zuUyu/qfdqHp6eFp/XLPTUCth5gwAfW0XeYk8QR56X3NH0+bNYop6Rlp7xT0 rmPjRprvmgTv0IXyF3YtJO3CY2rF79Cmsk5Ta5Kwebv3mN0TyWDhmm6pdhGmXfnUhfff EVwCOPGPsPczrhJXp2I8NzX0zOtZMorDPr0EvClBZIurH6H5GN8IZuO4b49DVvfnGQNN Q2NIhIdTZke9vA5bgatAiYSRNd3OqwPNjfJG55sed3aBbPSfMtvpTVqOIQeXAb2y2kOj 6kgNx6bBxT6zQJRWymT53gPwm8Re71rg5/bPBusOjpNwV9orZS1pZ26nlgCrjQRDzSUi UE8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=pIskZTdiijOHyXJ06Sh/ccutKUyXwwsPo+SoFuzkqlc=; fh=fQlH+rSLZQ6bX7jSfWWjDoV0DJOCiIVIrCcZBT+S1Vw=; b=DslQqUcH1gpKECFch2+QXm/+wnE1QnlYPQ07AAQUZhoSUf/RtFZvxWyIHZUw2vRJWz +Je973ZjM4tcXmXqQLze1dKJnfUm2u8cqpGIZagW3k6gPoxl/CzYYqhBnZjoD0P6FjQx LE1/p0q8AJy3GdH5OYH/pSQDCeXpAxB7td0U6WEO8bgvOflwfufSQ7zAReeSRQXDDZiX 2XXv9koVb3Gat3fR0PIZwQCCNUko8O8mLioTRR7d1SqZnyWpt6OLxOGRr65OHkVBcq0k KboLoOi+uz9SgoRlE5Lus0LljV431omlWXz0Nl/SMoqYBoZRJ9BT2FybW6BUEQEA5Imd TKJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@jcline.org header.s=fm2 header.b=vfnEmlvi; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=tzsDmUAw; arc=pass (i=1 spf=pass spfdomain=jcline.org dkim=pass dkdomain=jcline.org dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-108988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108988-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j1-20020a63ec01000000b005dca5caed4bsi12195314pgh.516.2024.03.20.07.15.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 07:15:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@jcline.org header.s=fm2 header.b=vfnEmlvi; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=tzsDmUAw; arc=pass (i=1 spf=pass spfdomain=jcline.org dkim=pass dkdomain=jcline.org dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-108988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108988-linux.lists.archive=gmail.com@vger.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 4EDCDB2286C for ; Wed, 20 Mar 2024 14:13:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 697904EB45; Wed, 20 Mar 2024 14:12:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jcline.org header.i=@jcline.org header.b="vfnEmlvi"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="tzsDmUAw" Received: from fout2-smtp.messagingengine.com (fout2-smtp.messagingengine.com [103.168.172.145]) (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 C371D4AEFA; Wed, 20 Mar 2024 14:12:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710943933; cv=none; b=iQAhNw62xlDiai54LW+8TUGWm6+sPFF8lx0GOF0ssakUfohfhGCj/2Q2TzfbE+gFXyo1vE+lCmqkluBye5AjNX3/0fpzb88IZYLnvB2Wm1v+/Y2m1xfv8LD4oBqzHLvVkgy/4MTNHswEQEPC8+WckeE01E924sWcdaiX8s8VnHE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710943933; c=relaxed/simple; bh=pIskZTdiijOHyXJ06Sh/ccutKUyXwwsPo+SoFuzkqlc=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=SFR1WRVNaGPotCH4upHbcC6SnDVlsuvEHcSGw9KrDtnEyEqfRhPhptGQWfRKejQESI4GhC7zcnkQUVyigWrkAxrhFNQ6oKA0sFMBNJVhDmIjzI6uFtORGGIdzw5e9d+sf63BSjLS9TrM1rUUb4vewXiIHmvFDl3pgPR18tbcrOE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=jcline.org; spf=pass smtp.mailfrom=jcline.org; dkim=pass (2048-bit key) header.d=jcline.org header.i=@jcline.org header.b=vfnEmlvi; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=tzsDmUAw; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=jcline.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jcline.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id BF22F13800C7; Wed, 20 Mar 2024 10:12:09 -0400 (EDT) Received: from imap42 ([10.202.2.92]) by compute5.internal (MEProxy); Wed, 20 Mar 2024 10:12:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jcline.org; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1710943929; x=1711030329; bh=pIskZTdiij OHyXJ06Sh/ccutKUyXwwsPo+SoFuzkqlc=; b=vfnEmlvi3ojRCQ0sPvhEwmBEAd 8Cf02iIqn2NuIsPB1wN+izTaaRoOBZAoLdD7HQd96NJNncvqZneHp8q7r7oHHtiu 8BmkK+V40Faok5syEvkd7YZpTTkHVzNekZR18lJqWPvRoYkduoHkFAb6JihhRnWk 2FQDrXuR7oiFD5ihecoljtwsEhGNeId/3ewFvXGO4eINyGyPTGqS6DPwkYVPISw4 /u29RsCRdifN+hquSwaVECZiu1jHIpItpg/RMLDb3tRJiIdqfgtSPBXBCR3vrrSH UfP3UeEqSScc/IvqItKgtFjTprD0nxtTDBrZKoDFeO0lIlX5deNQ13rxdM5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1710943929; x=1711030329; bh=pIskZTdiijOHyXJ06Sh/ccutKUyX wwsPo+SoFuzkqlc=; b=tzsDmUAweZdIUmcRXqCGp2IHxwN0gynOAyLci20aME6X wzXkIt0NJKOWxbpLVItF4ClgainsJnP1QerAXvBsEYAeVT8aLmKu62H8oiSbQ3Yt Um+2jpcbxoKHdIxkSrMPGI50RB/Am+B5Dk18Mw+mguuc50ReVCLqu4M0wgcpbQvO y6ESCepo8zIjAx4pKr2GCMEWrX+SMG5K8FoZUcV1WdZzHE8F/YUtQF6wV8VDgLm1 p6raQGoR+zLbOMGrHMDeB3fkAe7FclSO3+MAKMCoDhZc25HdENdOIrFb9Nong3zf KMMDsx1sm4BOlb32O3ApfwC7+JwYXMLJVRKh79LFvQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrleeggdeiudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdflvghr vghmhicuvehlihhnvgdfuceojhgvrhgvmhihsehjtghlihhnvgdrohhrgheqnecuggftrf grthhtvghrnhepueevtdfhtdettdetvdegleelvedvheevjeehgfehfeeutdelleeukedv gefgieevnecuffhomhgrihhnpehshiiikhgrlhhlvghrrdgrphhpshhpohhtrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhgvrhgv mhihsehjtghlihhnvgdrohhrgh X-ME-Proxy: Feedback-ID: i7a7146c5:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 597D7BC007E; Wed, 20 Mar 2024 10:12:09 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-332-gdeb4194079-fm-20240319.002-gdeb41940 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <20240320005412.905060-1-ryasuoka@redhat.com> References: <20240320005412.905060-1-ryasuoka@redhat.com> Date: Wed, 20 Mar 2024 10:11:49 -0400 From: "Jeremy Cline" To: "Ryosuke Yasuoka" , "Krzysztof Kozlowski" , "David S . Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" , horms@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, syoshida@redhat.com, syzbot+7ea9413ea6749baf5574@syzkaller.appspotmail.com, syzbot+29b5ca705d2e0f4a44d2@syzkaller.appspotmail.com Subject: Re: [PATCH net v2] nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet Content-Type: text/plain On Tue, Mar 19, 2024, at 8:54 PM, Ryosuke Yasuoka wrote: > syzbot reported the following uninit-value access issue [1][2]: > > nci_rx_work() parses and processes received packet. When the payload > length is zero, each message type handler reads uninitialized payload > and KMSAN detects this issue. The receipt of a packet with a zero-size > payload is considered unexpected, and therefore, such packets should be > silently discarded. > > This patch resolved this issue by checking payload size before calling > each message type handler codes. > > Fixes: 6a2968aaf50c ("NFC: basic NCI protocol implementation") > Reported-and-tested-by: syzbot+7ea9413ea6749baf5574@syzkaller.appspotmail.com > Reported-and-tested-by: syzbot+29b5ca705d2e0f4a44d2@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=7ea9413ea6749baf5574 [1] > Closes: https://syzkaller.appspot.com/bug?extid=29b5ca705d2e0f4a44d2 [2] > Signed-off-by: Ryosuke Yasuoka > --- For what it's worth, Reviewed-by: Jeremy Cline