Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2715520lqz; Wed, 3 Apr 2024 06:43:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDVpB3faCfLOnnImm6KcBa0oewEt++rob2lzsLhzB60im+EE137dzNTroAABIQ3msFpGfoRlu9siDA1xEZlPwOGHDO7TwiLqppEEyHAw== X-Google-Smtp-Source: AGHT+IGEtsq3gI71sKt7g2gP6W244TXQ7EQ+lAtPoE96zjYWUsI9Q/UptNpF7Nv1ER9cl6e/Iak/ X-Received: by 2002:a17:906:a290:b0:a47:134d:2fc8 with SMTP id i16-20020a170906a29000b00a47134d2fc8mr2305759ejz.10.1712151811676; Wed, 03 Apr 2024 06:43:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712151811; cv=pass; d=google.com; s=arc-20160816; b=XlnI1WunjaYlWaYnJXTGz0/rh1M3r+D4K37LVEFfcYkXIPE64gU7TIZTaJ7/h/Majk qcBVGlFWvZ2s9dfPRYmjVKNkkQkJFFkw9n8LEqWFlISPSpFG5+lXUsAELFEnspATwoYC 9ZbfutgPXSKyGh5fzoBpt+h56aVMlVxdLOYnHrL6+rl6E8VYasvA2LDCdnjynSfXj9x9 QbtJ6oWhnU9NRvsNGmcf5hG+OBbqzG0lkPz2IGpK/PWsedsvkc+e098VOUbIyYoRBKvT 0dOlfp33duag8Ny/Ouu1+LlZ9Hy6+kw8JdyhA+MAdfkm+QJ5l2bPEh0I7ld8ten0jJzZ nW6w== 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 :date:subject:cc:to:from; bh=uEn9i+yZ0OxW5ekZjurqBOCmSsCJNqftGrFJlHV4v5c=; fh=UbhnAgbWqlClJQH3bMF3B+eV9+td6ivwsTozAjXflhI=; b=AwRFrRWv0i3j5EfWFke6um2xH2OepTH0pbFAB8QbFKRsdhWdgwVNc2/k2DyzP/6lu3 nxBepgEenlJcZ+piPLaaFV5TapIoBZvBYlPKr36H7NTdE1OQDqvxISkmEiCG+Ik/saX5 KM/8GuYseOql2V80ko8MpNYF1E7Ek0IJsrXfwAGS/8nw4uGYZVrOnelErGUbmr9z8EK+ OJYAY5KpIOnw5nXqkJ2JUgPZzUnlawE1sr9zkMK9HS1paNdnnoJORiQUzz8Om8o9gpeO lR9wV27vjV8MoE/R9qwUBarnrNbZ0rs6mDb59f4WRMwmrtbP9YY9eyBwdrVoiwQ+4E4/ kuTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=fintech.ru); spf=pass (google.com: domain of linux-kernel+bounces-129851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129851-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 11-20020a50874b000000b0056c240d121fsi7003699edv.358.2024.04.03.06.43.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 06:43:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=fintech.ru); spf=pass (google.com: domain of linux-kernel+bounces-129851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129851-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2CED31F2C52D for ; Wed, 3 Apr 2024 13:35:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65E3C148826; Wed, 3 Apr 2024 13:34:45 +0000 (UTC) Received: from exchange.fintech.ru (exchange.fintech.ru [195.54.195.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6593A1419BA for ; Wed, 3 Apr 2024 13:34:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.54.195.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712151284; cv=none; b=rtHoPU1s4Q9nFR9xRMjm+LqGYeEf7T/6l64bR9op8kDbtx0hwMekQ0GlEE55HUrK6f/0M8Lw+OEKwfiXmRU+9kmPEVRutS0b3ltSyRFtg7M+J/oXVC67wSGg3ALw3SfSErZhP3DnUjLMH5x38mkJI3cZZKao0yHD3TiIBVG2gGw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712151284; c=relaxed/simple; bh=Uhg9IjwFN5pZbBEmeO1zYD0ndeXFaKI0Ar6X/oyg7/I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=T2xiV2VppdLFNbEPca+4JOl1y54dOQrwzJqM2IByqaRslr71WYaXZwuv1DGWmG00MmBfesMw7r0igu860EkmaJxejQLkBtsoiwbdSQ4PLf8ts+cHrBvm7J1Z52Q2tcvhYYd/u6yf6WfQj+zvtpNO2ZI/PO1CNrckfq7911jvMgc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru; spf=pass smtp.mailfrom=fintech.ru; arc=none smtp.client-ip=195.54.195.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fintech.ru Received: from Ex16-01.fintech.ru (10.0.10.18) by exchange.fintech.ru (195.54.195.159) with Microsoft SMTP Server (TLS) id 14.3.498.0; Wed, 3 Apr 2024 16:33:28 +0300 Received: from localhost (10.0.253.138) by Ex16-01.fintech.ru (10.0.10.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 3 Apr 2024 16:33:27 +0300 From: Nikita Zhandarovich To: CC: Nikita Zhandarovich , , Subject: Re: [syzbot] [v9fs?] KMSAN: uninit-value in p9_client_rpc (2) Date: Wed, 3 Apr 2024 06:33:01 -0700 Message-ID: <20240403133301.14177-1-n.zhandarovich@fintech.ru> X-Mailer: git-send-email 2.25.1 In-Reply-To: <000000000000a77e580614ded85a@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: Ex16-02.fintech.ru (10.0.10.19) To Ex16-01.fintech.ru (10.0.10.18) If p9_check_errors() fails in p9_client_rpc(), req->rc.tag won't be initialized and trace_9p_client_res() will try to print it before exiting with error, triggering KMSAN. Fix it by having id and tag fields inited with zero values. Please test. #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master net/9p/client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/9p/client.c b/net/9p/client.c index e265a0ca6bdd..a9d613af7455 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -235,6 +235,8 @@ static int p9_fcall_init(struct p9_client *c, struct p9_fcall *fc, if (!fc->sdata) return -ENOMEM; fc->capacity = alloc_msize; + fc->id = 0; + fc->tag = 0; return 0; }