Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2406562rdb; Mon, 5 Feb 2024 05:52:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL5JAYpDGrmhwfP5SpMwg77hsEgqcP/lMt8Z5bk+oWu+YXrRfoiPDhMUISiTeL0N6l5j3N X-Received: by 2002:a05:622a:1653:b0:42a:96ef:6deb with SMTP id y19-20020a05622a165300b0042a96ef6debmr7717662qtj.61.1707141131509; Mon, 05 Feb 2024 05:52:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707141131; cv=pass; d=google.com; s=arc-20160816; b=b9DIDlKxx6Bw75mFFCnWzl8HPwQLuTR2UCkLyeGxmiXDdPLlIGLGJ+oPvqjce9qQwE OdODp/+AjB/ixY/PV49mYC/QJKOfLrXPRH8b6nYj5gLs4vL7/SsRDEEzb/+62MVnqTLQ BeEjNsJL41SYkrIV+IrJE/cy5OJ84Mo76kuaZ4vDlfnvVv0wvm6ZPO/aGWxmhuRzmVFm tus9x+SMyPeM32kqbCbiQe/84+TMdOV894Lnsp/504trNZnQADJbW1qdgrpzi8wBp9p/ +zKPwdIulzFAa31U1AsxN/RppRlh/1oIjHaEKcl8A4PYdooAaTxPugLkOuggpQgPjaTD s/Xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=2Xv/TMPnZ6ACI/uw5nCEWZWMTiYPSRlxi3KzNmIW+M8=; fh=SQPPv7oZE27ZNmuLzGQRKLVTw7VHfLD59A73Scp3O/w=; b=T4BSeavFgzHQnDSAMM7WXpL2KHBVK5UGY5mfZ5vbBYxbR+JOczHDQsGEMVUm+G3+Ey uJ9ceZHeJkGNxehJrhTeH+hcmcB+xfM9x+X8A5FVh7G/lwLUASV/7wB7X55jbqTwBkMa 0eOG3V1YGtlGWAym1aS8XLvfOka+gZsq+PF+26gNqxMiv93WJMlEXj+whLK9d0c1nl0r yU40COodQqSep+c/v2BLAFot2X1cumcwb/17/QqE2yrUSx5nwTLbVmUN2p6ZjOrR6z7e lmzTH/LJmJSDEsBq97xtl07aYWOjLBiAMtyAFHnUGy4QsT2IzlJFvtPrCrueRuUdSsn+ a11A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=NcuWp1nl; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-nfs+bounces-1788-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1788-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu X-Forwarded-Encrypted: i=1; AJvYcCUJwJnd2QUu3JKeTZgmIR8vG7ZTe4EWWnBSb2I7JwWedLtsEh10rGuZaaZ4Cz+dzlEfti7dTDBSVwqpS4+CkHxD6i3wEWK18+A3nxC9Gg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h1-20020ac87d41000000b0042a87f5c338si8829424qtb.63.2024.02.05.05.52.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 05:52:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1788-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=NcuWp1nl; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-nfs+bounces-1788-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1788-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu 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 277981C23F8B for ; Mon, 5 Feb 2024 13:52:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B27F120B3E; Mon, 5 Feb 2024 13:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="NcuWp1nl" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 799A2210ED for ; Mon, 5 Feb 2024 13:52:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707141129; cv=none; b=FWy1bcybj5B7Z7jpfa0In68bDzWlWd/XeCUTGhsONIEdeh0KDmu8S0DGAlgDw7bSprYnHVv+jEaYQnfJoSxqrqwnSb587w0LULAyQD+jOQ16OnvxU5iRuZpiKamD+3C7OjetMc/8QyuOnMVz7HJ/EBwcmC2dgVpqtuRpCUAo6k8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707141129; c=relaxed/simple; bh=2Xv/TMPnZ6ACI/uw5nCEWZWMTiYPSRlxi3KzNmIW+M8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=mXqnADBOZUmH5ZmcTy3ZXiizoK+poimBz9Yv0lld9RSuxI89dVkPpaAONiqyK+K6yhpz7yzmMYFVoO59bIHZkWKu1o8HcXVPFdUkWW2baPPib3jfovfQVkvwNgOn881Vir9su+xFezqm09e0L8kdYUm0rrr8ViDPL0XaCSkb8aw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu; spf=pass smtp.mailfrom=szeredi.hu; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b=NcuWp1nl; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=szeredi.hu Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5113303e664so4569926e87.0 for ; Mon, 05 Feb 2024 05:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1707141125; x=1707745925; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2Xv/TMPnZ6ACI/uw5nCEWZWMTiYPSRlxi3KzNmIW+M8=; b=NcuWp1nlWvOmKDC+Us3xfB23YsW8RgUJlLlIRMYExr0fBNaaUQJBoDuLQn6Hzgd7ux 5mS8g5eqer8E27aG2gtEBQlGEYw6eCfqtfGJ/JcpLxVKxlgtFL5dNs41yfVDg7eHBsN6 ziM2eIdru4OyBQneL4aO4SU8i+lLz0z5AlCvU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707141125; x=1707745925; h=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=2Xv/TMPnZ6ACI/uw5nCEWZWMTiYPSRlxi3KzNmIW+M8=; b=muxFlvPpifzAhz7rnL+AxA3eTYSlctSishvI9qVsgjTbzcJ9ePbtod+ylAi3P4nQU1 8p8Azh0jqkge5mJ9oMuHDD1iWhTXIs++difTKtlVRMfLxliITpjSySIQnv9nrs7v+cch J9RKNIkaDjtEQDGa2+maTlO7mntibzBm5IdaJOfeLXzZdbKkrN0MybbLwMJDP1kYhyQU 24pH5YOYWDKoWAWLVSZpn61BBfwf0XudIlRxROahNAEkD38mmJ9scEalG9SkF+jGPkis 5XCFvkaplIaqAonO8eCt9UOn1cE8Rp8x2fAZVTGor4SDpqUsPj+XFAB1aPcVH6Nh0oEL 9gOA== X-Gm-Message-State: AOJu0YwK+JOesNDx5nfrqzvxnDBfAvOEJM/b+SBJSRl8nFH0GY++goz+ cmg9L3Hl/Z6tzqhXJmtyvI75RSDbVB1H4J//wPMa+q+jYLxpmw9p9TFaRlwVNBsfC0zRkEspFAK yJ+1XLyHeiIbZOEYHwNP1eaYRgGcuUMxmEjYXlw== X-Received: by 2002:a05:6512:3b8b:b0:511:3e58:3cff with SMTP id g11-20020a0565123b8b00b005113e583cffmr6188837lfv.16.1707141125271; Mon, 05 Feb 2024 05:52:05 -0800 (PST) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240204021436.GH2087318@ZenIV> <20240204021739.1157830-1-viro@zeniv.linux.org.uk> <20240204021739.1157830-11-viro@zeniv.linux.org.uk> <20240205-gesponnen-mahnmal-ad1aef11676a@brauner> In-Reply-To: <20240205-gesponnen-mahnmal-ad1aef11676a@brauner> From: Miklos Szeredi Date: Mon, 5 Feb 2024 14:51:53 +0100 Message-ID: Subject: Re: [PATCH 11/13] fuse: fix UAF in rcu pathwalks To: Christian Brauner Cc: Al Viro , linux-fsdevel@vger.kernel.org, Linus Torvalds , linux-ext4@vger.kernel.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Mon, 5 Feb 2024 at 13:31, Christian Brauner wrote: > > On Sun, Feb 04, 2024 at 02:17:37AM +0000, Al Viro wrote: > > ->permission(), ->get_link() and ->inode_get_acl() might dereference > > ->s_fs_info (and, in case of ->permission(), ->s_fs_info->fc->user_ns > > as well) when called from rcu pathwalk. > > > > Freeing ->s_fs_info->fc is rcu-delayed; we need to make freeing ->s_fs_info > > and dropping ->user_ns rcu-delayed too. > > > > Signed-off-by: Al Viro > > --- > > Reviewed-by: Christian Brauner Acked-by: Miklos Szeredi