Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp613913pxv; Thu, 15 Jul 2021 11:33:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzObxY+f5w1S/FCaE04aHOeS6OkcXKlBCWwp6UF9yyLjKzUSi+qJxU2ecjSJLhGLjAOeJL X-Received: by 2002:a92:d8d1:: with SMTP id l17mr3509034ilo.187.1626373994532; Thu, 15 Jul 2021 11:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626373994; cv=none; d=google.com; s=arc-20160816; b=HGQBisTPmNDEe2EPoNC05lufdWX/lZnc0lJnGDva/YuBRYZW/tDfguSWQcZsf74J9G G8FVy+GB9uzjsRbRlk2/Hen3dkEOkUOP52Zm7qAzBbN+ayI2lxD8SEV3Kj8P67sPEvIh eNd83RFffA6fXg8BHvZY3tOVukEEfOuDv8Ese2aDkGXl5uU39szFbCZ8VsOZJU2j2r86 53OsRoAk0agf3vWbjIT0Hjki5wUL26HoUflG/WCjdQeXzh+yU100XLb0BisDexxQ3KN1 WTQ/w8OAL5aiwm8+cqa2Jr3zIkVmqNdkcjDZUAUP9OC3ia2Xl2XX+ZqIoCrNzt2+eUy6 Y2QA== 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=eB0ktyRtFKpNlshdBYV+6nGgQSTUL5s2rI1FDhUO0zY=; b=JRJTTP5/H2rLOmg5uqk4B3JIuBp5s3Sh797zGdZH+7Ucq20lj/S8+oYBM54tX/rP1k 3gWi6ht5Lz5F3ZM+77H7jmPYoycbvpAUqQhh7RXyU+WCAaVbl6ju2ZdyLSBCPqH6dsMp BWEmXg/6EwIpn4VQ5JWvyfVQ6kkbfYW4lho2JS3k4rwj+XeRWmGvhnWKNzplDrTMPsBx zyJvcXkFoMX0afURtoOPjOFFPZwhXA3XLNMbrG3Zv5JLQ1wsV1dtZxeutD5j2I0i6U3W 98SCpeEkgk0+W5GGjfG6+yxINw08GoPVssgARTrhCx7jYumMGJarYKeqruJeE69pJaG8 kpaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pXMKWUx/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si7418439jak.4.2021.07.15.11.33.02; Thu, 15 Jul 2021 11:33:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pXMKWUx/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237945AbhGOSW6 (ORCPT + 99 others); Thu, 15 Jul 2021 14:22:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:40586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231627AbhGOSW6 (ORCPT ); Thu, 15 Jul 2021 14:22:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPS id C076361178; Thu, 15 Jul 2021 18:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626373204; bh=fXdla5zPgOJytMrxkP8fqdb6FUUVZZy9At4qcGgFS3Y=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=pXMKWUx/t5iih8ISFHNAyn6zO9KspYWpwqFdlrH+TNlOUiLtUiIbn5RVsE8DS4dcH 5Mz4PLh2v4nqlpC8P0c24CaYB5U3Us8/eTeKZox2QZ23ubhjhWvPVr85HSIFUeWKP2 l52DJtsqqOZkphcIUQL36kNqXs5qa6Hjh9Wz3UjPheoWQZlH1o8Rjjx279z6eDUPz+ ZQXly5EnlMyv7KA24F3hMclNCCzDw7x76uisb+pgwHMCQgcqcpop4d+retAeCfo+nw W9sR7ibMROyPozf9RNelUfSlsUwYGBN0TrVlSu6X/x+DAF6kYbvMHhewsAVs69D8ky rszS+7zXeBLJA== Received: from pdx-korg-docbuild-2.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by pdx-korg-docbuild-2.ci.codeaurora.org (Postfix) with ESMTP id B40DD609A3; Thu, 15 Jul 2021 18:20:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH net-next] net: fix uninit-value in caif_seqpkt_sendmsg From: patchwork-bot+netdevbpf@kernel.org Message-Id: <162637320473.7858.7071261121680611982.git-patchwork-notify@kernel.org> Date: Thu, 15 Jul 2021 18:20:04 +0000 References: <20210715122204.14043-1-william.xuanziyang@huawei.com> In-Reply-To: <20210715122204.14043-1-william.xuanziyang@huawei.com> To: Ziyang Xuan Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, sjur.brandeland@stericsson.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 15 Jul 2021 20:22:04 +0800 you wrote: > When nr_segs equal to zero in iovec_from_user, the object > msg->msg_iter.iov is uninit stack memory in caif_seqpkt_sendmsg > which is defined in ___sys_sendmsg. So we cann't just judge > msg->msg_iter.iov->base directlly. We can use nr_segs to judge > msg in caif_seqpkt_sendmsg whether has data buffers. > > ===================================================== > BUG: KMSAN: uninit-value in caif_seqpkt_sendmsg+0x693/0xf60 net/caif/caif_socket.c:542 > Call Trace: > __dump_stack lib/dump_stack.c:77 [inline] > dump_stack+0x1c9/0x220 lib/dump_stack.c:118 > kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 > __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 > caif_seqpkt_sendmsg+0x693/0xf60 net/caif/caif_socket.c:542 > sock_sendmsg_nosec net/socket.c:652 [inline] > sock_sendmsg net/socket.c:672 [inline] > ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2343 > ___sys_sendmsg net/socket.c:2397 [inline] > __sys_sendmmsg+0x808/0xc90 net/socket.c:2480 > __compat_sys_sendmmsg net/compat.c:656 [inline] > > [...] Here is the summary with links: - [net-next] net: fix uninit-value in caif_seqpkt_sendmsg https://git.kernel.org/netdev/net/c/991e634360f2 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html