Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp479083rdb; Wed, 17 Jan 2024 07:48:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFS7MbEYhg0WYfhR13SuvUV4Wa+k5GNEe2cZfeQYuxBA0262y/XTft6RN6xee9m9hCkCfHh X-Received: by 2002:a05:620a:126d:b0:783:1e4c:b5e3 with SMTP id b13-20020a05620a126d00b007831e4cb5e3mr9862043qkl.88.1705506500255; Wed, 17 Jan 2024 07:48:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705506500; cv=pass; d=google.com; s=arc-20160816; b=mXT7XOfXaU94C2iu8CisgpFDgA36jRJOKfFQ8RP/28g6aysptWXuGitDQqQU5J+rZq 6GfhKD+xCAcoJe69GiVvCC6g7Fv0RlPQDYwD9cwGsqDUaoeB1Zwygzjt4L2MqkxN5mgD n/1E6gnGZjwyJ9+a0bu4djjse3YRaRvJ0Ee8TsittBVT/xcShB8yBtxhpg6h55eydnLe JIDd5f/3Oot/P8AZW0Ylse1SpNz9PWmZdaBApBOBCz22DUp0ih76TRiYVxnzJVG74uhi slbvnhxvu/CPpZkVNS5HV/Kmnrrozt/QenOhjbJpNqDlDmH9dSgrEXFkjp0oWz8bg+cm 7Drg== 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:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=MBwQPpl+zXik806WtECeSYlAHrweUHc1hm7lYkwTJFs=; fh=MnS0CDwgDSE4cAkEZrol0YngB1kraqaTfyiO1xVlPBk=; b=pgBzmrhORAJJJv2eNs1EMh2eGHbgs4z/Gu8AJUYGUHR1/QpqZ5odIqFWc0HV0kH50o Jk/UeAA/vqpQgj6cdQ1CzujSefYe/oa52B0Rx1J8hthK9tq1sSdEXaBP90Al4S1X9Em2 uQv5uRyPVOpiG8kGV0KzoDLEzxxEMFOElr92QVFzPEv86vfTfWJIwr4XJNR5X9lWtAFB lGh0cjTTnAtcqaBCCfFZjU1TIIuC4UeZy5l7dKMjlYI0+njtDV6TDp84RO10PzJnzT6L UjFNXVtJc3qMh/c/jgOIAcyp+x2G3TQDfD9nS3Fgg5yn4b0bc5TPWfhePwldqWJzD+J7 O/rQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=mozzu9K+; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-29172-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29172-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u13-20020a05620a120d00b0078310e04b6csi11507609qkj.634.2024.01.17.07.48.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 07:48:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29172-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=mozzu9K+; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-29172-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29172-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 078D31C21B89 for ; Wed, 17 Jan 2024 15:48:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 264AD22308; Wed, 17 Jan 2024 15:48:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="mozzu9K+" Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72D0C22304 for ; Wed, 17 Jan 2024 15:48:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705506485; cv=none; b=twyspKBitv8QY0eOiUpZ9bJWaq3GQp9SeaCMm4SPyHYzqoAtxbpSWcS0J+713FaB+D5AZr9wWhZDpQMAnXfIbapS8DuttswWJeG5XWzjV6i+ChBiyA3Rq8H+bZMQI6TSROtR1iYTtEZvaH3GTqIOqPXlPvSdco2vcnJ+T8VlhZc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705506485; c=relaxed/simple; bh=mu7VhaAc515ipMhWdzPtT2TPxqqmKOKMcNFGqTwz8wM=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: To:Cc:In-Reply-To:References:Subject:Message-Id:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:X-Mailer; b=kXg/+bBO5ORgUvOmcHRpGxXQKTvehO+idtKYxUIZuynqBRVRI/Vt/Ub4QPhCV9w0aOlN01SMuDZCYn2QL4jppAyh80aRHLvSoC2ioiZBq6Yso/6haSIM/G1DjyWzp6KtzqjuMXGCeT16aICoFXieb5IBvs8/9SVi5uMbJcYwzTk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=mozzu9K+; arc=none smtp.client-ip=209.85.166.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-io1-f43.google.com with SMTP id ca18e2360f4ac-7beeeb1ba87so54389539f.0 for ; Wed, 17 Jan 2024 07:48:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1705506482; x=1706111282; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MBwQPpl+zXik806WtECeSYlAHrweUHc1hm7lYkwTJFs=; b=mozzu9K+nmHJy5WeFP+F0bOU78P4JJr4xv1z1j4HKBISbL89EbcfFZf+0Xx7H/c2VA kTf9A8Xi++6dB+1h5Xuy9/asxCN+b4PQYI4DcdqjJkS6qUJpyNzF8zBvoEttVWPyN1Fr PkCiGQlXesvlySenB2Wt1BongGGycIn4kVxg9SWqnDqaJFhjltlTEJelguJTD4GzAdYo hg9rD9Fb6gd75W6YrDUNvBvFFiLy4Jwp7TbZrKj7ovSxQ9uSIbSfg/kk8K4RXJK4pUq4 2Q0eAlKluaBg9CsFolEkhHbG9ojPdnrWBmeaevZ7aRG+bAA2CWoWyyJX5OMX2IuMUPYB 3erw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705506482; x=1706111282; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MBwQPpl+zXik806WtECeSYlAHrweUHc1hm7lYkwTJFs=; b=U9JEXB4h08Fzmyg+W8xUTo6/LaAUJ+Dbz7TqJb5O4boO5ii0LGXO5tkNrhDjNvDho0 /IMkVz3WVbcz7mk+VEiVitruP4ITE4onZ0Pxv83V5esxt+GlzsYYoT0INllaMTKoIxDp /Qwc1tfet142skP9mTZ407vxZHl+PVJ/p8+GYK2xc8+G0v6GRk2KozqTJw6RJanPXJ6/ OYe2sIwaNBMNvw8kVrnV+AlPKpjpIks3ZFnzx1VkpGtkBuYrfQ704a5vQm/NEksKkQnP AiZsGwlZxujl7j7ciy3vzTCwqpouetMr0EOGbIMJOoei3zcmumEoDv2jey4wT4T4hkWy P4PQ== X-Gm-Message-State: AOJu0YyeUtsLqFtstBO8U6VSzqKJXT9pE8uwySgglkhfemnzmgByQAT0 vKbfL9vroYggrz9QdvOk0U9a510LIWUYYQ== X-Received: by 2002:a6b:5803:0:b0:7bf:4758:2a12 with SMTP id m3-20020a6b5803000000b007bf47582a12mr8519442iob.0.1705506482496; Wed, 17 Jan 2024 07:48:02 -0800 (PST) Received: from [127.0.0.1] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id c34-20020a029625000000b0046e4c2f9f5csm482353jai.28.2024.01.17.07.48.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 07:48:01 -0800 (PST) From: Jens Axboe To: Eric Dumazet Cc: linux-kernel , netdev@vger.kernel.org, Eric Dumazet , syzbot , stable@vger.kernel.org, Josef Bacik , linux-block@vger.kernel.org, nbd@other.debian.org In-Reply-To: <20240112132657.647112-1-edumazet@google.com> References: <20240112132657.647112-1-edumazet@google.com> Subject: Re: [PATCH net] nbd: always initialize struct msghdr completely Message-Id: <170550648165.620853.7074880501945877841.b4-ty@kernel.dk> Date: Wed, 17 Jan 2024 08:48:01 -0700 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="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12.5-dev-2aabd On Fri, 12 Jan 2024 13:26:57 +0000, Eric Dumazet wrote: > syzbot complains that msg->msg_get_inq value can be uninitialized [1] > > struct msghdr got many new fields recently, we should always make > sure their values is zero by default. > > [1] > BUG: KMSAN: uninit-value in tcp_recvmsg+0x686/0xac0 net/ipv4/tcp.c:2571 > tcp_recvmsg+0x686/0xac0 net/ipv4/tcp.c:2571 > inet_recvmsg+0x131/0x580 net/ipv4/af_inet.c:879 > sock_recvmsg_nosec net/socket.c:1044 [inline] > sock_recvmsg+0x12b/0x1e0 net/socket.c:1066 > __sock_xmit+0x236/0x5c0 drivers/block/nbd.c:538 > nbd_read_reply drivers/block/nbd.c:732 [inline] > recv_work+0x262/0x3100 drivers/block/nbd.c:863 > process_one_work kernel/workqueue.c:2627 [inline] > process_scheduled_works+0x104e/0x1e70 kernel/workqueue.c:2700 > worker_thread+0xf45/0x1490 kernel/workqueue.c:2781 > kthread+0x3ed/0x540 kernel/kthread.c:388 > ret_from_fork+0x66/0x80 arch/x86/kernel/process.c:147 > ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 > > [...] Applied, thanks! [1/1] nbd: always initialize struct msghdr completely commit: 78fbb92af27d0982634116c7a31065f24d092826 Best regards, -- Jens Axboe