Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3028245imj; Mon, 11 Feb 2019 12:33:53 -0800 (PST) X-Google-Smtp-Source: AHgI3IbFtqIDfp1Pre239C3Yfch5sfULUcOJXZDRX3Mhk0zNlaXiZyv2syjgTmNh/4IKOsUOFef8 X-Received: by 2002:a17:902:9893:: with SMTP id s19mr60793plp.165.1549917233396; Mon, 11 Feb 2019 12:33:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549917233; cv=none; d=google.com; s=arc-20160816; b=p03hc+CrmIlIQKCjV1+Z0RE84+npbP9xQlnztCLdw52fH3fEQ3UonwyIyC9e2st8+n C9ejBZEa3LbqY9BrnuRkWGcibfvO3aWvRLr6NATqrlGoiXy00WMPavRVk9KX5buZ9B1w b/alSNKmBzMppOV6+dLignXFtaAoE579dWlAiKC5XBsoH5aQNeQdi8NGtLJbhSpDKdVp 65SjUmJ5+x/YyJVuDn7KFPbPnVszbr5mr0wBOFyCPJRwux3mzFjndveeho/8kcayy0qO Vb9cy2j3mV2VKUhkmo0EcMLJvtXen6S7pce2s3r9RiuOiuZfhUGhmZRcEgw1tIy2/+g5 7rBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=j7KzIBmC+mD0WmJ57Lp32jneVRR/xS/PD5gftUI1uH8=; b=M2A+LLskMa4FprSe76ogQAYKs4oqnClvyuCs2aV399IvKMVylPGXtPU7SwTlVwj4+D 8VxBFF/LJG3Py2KgbTeNWA0g/5EJBx28g+aG39soMKFq+amC800h45OMlZQiOf7HcTPk Yrsp7XPtBP3WZsrLAHAKFVGxjy/sENsgPurG5X0XuCPPuKIvM16fTmkMbHdJZ7tKKLyw 24P0hPHRBY26ZYxvUrpYBs+JL57V0hqU+AOBkkBM+TRV7dgMj4BVbZgtz1uaEAhmYU2I 0XpjX1Au1OUTUoMQm46vFqE6RxKbLysdQ7mxa/DcSPs+lNIuwTcZuSwq4jcy0XuFhSoE wATQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e15si10564992pgg.281.2019.02.11.12.33.37; Mon, 11 Feb 2019 12:33:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731537AbfBKRcl (ORCPT + 99 others); Mon, 11 Feb 2019 12:32:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:41784 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727393AbfBKRck (ORCPT ); Mon, 11 Feb 2019 12:32:40 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 92D67AF7A; Mon, 11 Feb 2019 17:32:39 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 34B831E09A8; Mon, 11 Feb 2019 18:32:39 +0100 (CET) Date: Mon, 11 Feb 2019 18:32:39 +0100 From: Jan Kara To: Steve Magnani Cc: jack@suse.com, linux-kernel@vger.kernel.org, "Steven J . Magnani" Subject: Re: [PATCH] udf: disallow RW mount without valid integrity descriptor Message-ID: <20190211173239.GL19029@quack2.suse.cz> References: <20190211142438.16599-1-steve@digidescorp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190211142438.16599-1-steve@digidescorp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 11-02-19 08:24:38, Steve Magnani wrote: > Refuse to mount a volume read-write without a coherent Logical Volume > Integrity Descriptor, because we can't generate truly unique IDs without > one. > > This fixes a bug where all inodes created on a UDF filesystem following > mount without a coherent LVID are assigned UID 0. > > Signed-off-by: Steven J. Magnani Thanks. Added to my tree. Honza > --- > --- a/fs/udf/super.c 2018-11-16 06:43:00.622344354 -0600 > +++ b/fs/udf/super.c 2019-02-11 08:08:00.478331631 -0600 > @@ -1474,6 +1474,17 @@ static int udf_load_logicalvol(struct su > if (lvd->integritySeqExt.extLength) > udf_load_logicalvolint(sb, leea_to_cpu(lvd->integritySeqExt)); > ret = 0; > + > + if (!sbi->s_lvid_bh) { > + /* We can't generate UIDs without a valid LVID */ > + if (sb_rdonly(sb)) > + UDF_SET_FLAG(sb, UDF_FLAG_RW_INCOMPAT); > + else { > + udf_warn(sb, "Damaged or missing LVID, forcing " > + "readonly mount\n"); > + ret = -EACCES; > + } > + } > out_bh: > brelse(bh); > return ret; > -- Jan Kara SUSE Labs, CR