From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com ([66.111.4.27]:35949 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751219AbeDVH3w (ORCPT ); Sun, 22 Apr 2018 03:29:52 -0400 Date: Sun, 22 Apr 2018 09:29:46 +0200 From: Greg KH To: Harsh Shandilya Cc: stable@vger.kernel.org, tytso@mit.edu Subject: Re: [PATCH v3 3.18.y 3/3] ext4: don't allow r/w mounts if metadata blocks overlap the superblock Message-ID: <20180422072946.GA17290@kroah.com> References: <20180422042407.5820-1-harsh@prjkt.io> <20180422042407.5820-4-harsh@prjkt.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180422042407.5820-4-harsh@prjkt.io> Sender: stable-owner@vger.kernel.org List-ID: On Sun, Apr 22, 2018 at 09:54:07AM +0530, Harsh Shandilya wrote: > From: Theodore Ts'o > > Commit 18db4b4e6fc31eda838dd1c1296d67dbcb3dc957 upstream. > > If some metadata block, such as an allocation bitmap, overlaps the > superblock, it's very likely that if the file system is mounted > read/write, the results will not be pretty. So disallow r/w mounts > for file systems corrupted in this particular way. > > Backport notes: > 3.18.y is missing bc98a42c1f7d ("VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)") > and e462ec50cb5f ("VFS: Differentiate mount flags (MS_*) from internal superblock flags") > so we simply use the sb MS_RDONLY check from pre bc98a42c1f7d in place of the sb_rdonly > function used in the upstream variant of the patch. I've also applied this to 4.9.y and 4.4.y as it is relevant there. thanks for all of these, all now queued up! greg k-h