Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1142248lqb; Thu, 18 Apr 2024 00:59:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWErI0ENVWocNnOacQkep/aJw2Fwzzd2xQZsnOpRvZX/oPpVsVj63gdKtvMKC3QxH/itc0Im1lCWL1MEqhrPTO1Yqi3pQ4kvnBuHXILXw== X-Google-Smtp-Source: AGHT+IF2ftFj+NrIF+K6pOmEE/uODARYR0byxByyamNdT6v5jROMEfB9ItFaqQwM85fjdQw7hlDb X-Received: by 2002:a17:906:503:b0:a51:827d:c99b with SMTP id j3-20020a170906050300b00a51827dc99bmr1193860eja.14.1713427184824; Thu, 18 Apr 2024 00:59:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713427184; cv=pass; d=google.com; s=arc-20160816; b=RBD/6Z1rqyOG9rJroD6aLZ0fVM6CCMaFbG+CQq14XNgW9SodIJMV0GXEYGbhuC8kZN YlGm7lpT+SH91DZAlHm8MSNUz1cyLHz4CAdhcWt+TROmSiGQe4x/VsWrbzUM3TedOqw6 6s1aslfAAQivgjv0zL7sXGBHZUiHhtXLfSa3YuS7ny/weJwD01A7P2652GXFaC2EIORc oERSVYYspCrdIIeHwIQEx/m4lcmaIORSNoHjyEzcOOkaQs9h06v2a9qSVabVaGo6sU9J fn8EKW51JPblmwszSWuz0xO8JCe7WfWgOA3xcoheyHldD+Rm1eK0RbNbjOZ6ud3w/j5l BO4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=XghVFOhSOXYtS0ZzPlbb1ffc7Q2YWLhi8qHOjMBw5n8=; fh=oW1xIJXhQ8mu1VWxSxslUh4CBbUgpvgCU0fvSommFjw=; b=R66rbI6v0+ZW0KRgrXYGSJljPZVnJ+TBX4JqNFj/auWJndip8SsvF842v8a6cVNzst EcR+jo0xYNL9EHWv7LkEUW9sXe7ilfLJcUApmhP4U3x1AwfmizwF2CBONziET33h5+qY BGkO8qP53PSqm6qQpBJDBN4jADli9qDT14wC5QglY5z5pNqXQNm61Ah728QbT+hIDI82 1JqCYFbP3giCC50n+RmLbebbtn0usMLxbr0aA5ynt9R3I/BdL9gW99EmU8QWXVhpb7rI a5mKTnfAwAb8Yf0N/179hjyweuEd0NcOqyVd9wG97Y8lMOqg+aep55AmWWFsS+mga57M qM/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=zFlxowWd; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-149683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149683-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id se8-20020a170906ce4800b00a5565bd4d24si526384ejb.522.2024.04.18.00.59.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 00:59:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149683-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; dkim=pass header.i=@google.com header.s=20230601 header.b=zFlxowWd; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-149683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149683-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 8E6B91F22A2B for ; Thu, 18 Apr 2024 07:59:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A40041A8F; Thu, 18 Apr 2024 07:59:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="zFlxowWd" Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (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 6BA75757EE for ; Thu, 18 Apr 2024 07:59:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713427172; cv=none; b=EgbnlpuNBy9vKihhKsr3s36UDg00zLDWFLA8muoLkYkKJFJdEsDYi6pBJqvWAB9QhU3t0HJWnazYmYbobkbZurGDiwF+t9sRubI+5c+mXJHcDOtw9nrIkliGEX/fWHsGzC1TuL0HMnIvHy8qDoHb4GeF57RpFgAr865D4DM3OMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713427172; c=relaxed/simple; bh=XghVFOhSOXYtS0ZzPlbb1ffc7Q2YWLhi8qHOjMBw5n8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=kurbynThkYV+fp5xLEP6V7fHKthQzRrERXybbFYbrqHgK31xxGGtVfbehKozhGIEQG3WR+7j6hs2JiWJhGXnM6Aw+J1Fc9MAvBVLMPLZ6hboRqnpl99Euq+6vm7uAVGNgKpaW7Rh10GLvRnUrKSnzyOWUUBDiqdjPdbwu2tNzbQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=zFlxowWd; arc=none smtp.client-ip=209.85.219.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-6969388c36fso2701506d6.1 for ; Thu, 18 Apr 2024 00:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713427170; x=1714031970; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XghVFOhSOXYtS0ZzPlbb1ffc7Q2YWLhi8qHOjMBw5n8=; b=zFlxowWd5tuqKoOzB84rDNRlEQjw28s1UWYAt5asqGcj8iEY9Ne0KY2R7lxsdFPe8o 53D0gnBeydCeWH96q6lriHDpFxCJDTM7hJ+9LngA91XhiXiXhJq5f82xDaE2nqQmM2h2 2j+os80CkRLsKzW6aPJi3SEZWhIWBBqEOMjtvQ47q1jCG08HT2amQtuk9qHa86annMp0 PtWWwR5rAVT8PNNLQF/crAH5dSI5acYXdzFGO1P2QK2DhY5rkgnWcfS28bEtUhlB+5nD uD97OyXNKV3qMLog2c66SEH/EUaPLDOPUDaN51ZUbad2bnmhgcjPXksTOcjkcK+Gp9iF D3Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713427170; x=1714031970; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XghVFOhSOXYtS0ZzPlbb1ffc7Q2YWLhi8qHOjMBw5n8=; b=WzYR0+2J1qtfBInvcqWiQrBOCa2BYQH40KSfL9W71DhoLKwtiuxzL8TlNyVrnySh6f PS3dgjoUOcHUy6V/YKgTszjgzdUdnlP7O85OTXv5ksjGF0znXM45PxCnTCF+0l/r3xrI t4LUsSO81GhUD+Pz5ZtTAw8uapPUUkBcJVvKjlNv4b14CZCQ50RMjC5rG32e4UEpH4/t MUPooBzbf+xBmwaOPezkjj9T2g1Nrml8nbYloi2UAK1++6fpBDG9oEXCzFuKs3xUHY9e oMkcKMQZ6X6UDG7j6LZrHSQdIZaCa2RO2XhF6lJOb/zYQO3QDPAxop6fHACYtA1Q36vg eIdw== X-Forwarded-Encrypted: i=1; AJvYcCVh0DGhi3b/DS8pXJxwGHsv6q1k5TBSoLilLCDs7jZJllNzWKbd4h0/y9zqBVTQeSDv3piz7TfKwUEUXN68upn/NWDsu+Ow5FcKyXWd X-Gm-Message-State: AOJu0YziR3pgM4HZ6Xy5tqMUQpiP+UNudGzBMA4YBTkTwCOU4fKHPFP6 3l67KDh4/h654XUrs40I+YYmF1G8iYuoIWeL3DpM2Yhe5eWfDZYdwPvMXVEhxhZKVi9nbIB/ikU I9A/wYKTVsxb2ELdZe5YQePGb+sJzA2na83rgltUjGKdErGDrDw== X-Received: by 2002:a0c:f782:0:b0:69b:798b:e9c6 with SMTP id s2-20020a0cf782000000b0069b798be9c6mr2121417qvn.42.1713427170252; Thu, 18 Apr 2024 00:59:30 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <000000000000fe696d0615f120bb@google.com> <20240415131837.411c6e05eb7b0af077d6424a@linux-foundation.org> In-Reply-To: From: Alexander Potapenko Date: Thu, 18 Apr 2024 09:58:48 +0200 Message-ID: Subject: Re: [syzbot] [mm?] KMSAN: kernel-infoleak in bpf_probe_write_user To: Alexei Starovoitov Cc: Andrew Morton , syzbot , LKML , linux-mm , syzkaller-bugs , bpf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 16, 2024 at 5:16=E2=80=AFPM Alexei Starovoitov wrote: > > On Tue, Apr 16, 2024 at 1:52=E2=80=AFAM Alexander Potapenko wrote: > > > > On Mon, Apr 15, 2024 at 11:06=E2=80=AFPM Alexei Starovoitov > > wrote: > > > > > > Hi, > > > > > > syzbot folks, please disable such "bug" reporting. > > > The whole point of bpf is to pass such info to userspace. > > > probe_write_user, various ring buffers, bpf_*_printk-s, bpf maps > > > all serve this purpose of "infoleak". > > > > > > > Hi Alexei, > > > > From KMSAN's perspective it is fine to pass information to the > > userspace, unless it is marked as uninitialized. > > It could be that we are missing some initialization in kernel/bpf/core.= c though. > > Do you know which part of the code is supposed to initialize the stack > > in PROG_NAME? > > cap_bpf + cap_perfmon bpf program are allowed to read uninitialized stack= . Out of curiosity, is this feature supposed to be used in production kernels= ? > And recently we added > commit e8742081db7d ("bpf: Mark bpf prog stack with > kmsan_unposion_memory in interpreter mode") > to shut up syzbot. I checked that the report in question is not reproducible with this patch anymore. Let's just wait until it reaches the mainline.