Received: by 10.192.165.148 with SMTP id m20csp3111361imm; Mon, 23 Apr 2018 00:16:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Fo5abnz/OtpGSnn54dXdnWNlR8yAtKW74JvHYvbIHK49DCZ2zN5Jj/7DkmnwfCfN+nSbU X-Received: by 2002:a17:902:7185:: with SMTP id b5-v6mr19487509pll.221.1524467810818; Mon, 23 Apr 2018 00:16:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524467810; cv=none; d=google.com; s=arc-20160816; b=GZ7meNn4O2AkjroDHTmMHzDIsnFDAlvlHG92ELigzWXx1ApvpDk+t+3oh1AxvcRd2B KeElgXbOo1uzVrT8OPzEH3VQybF7O78Y2fZcprhPofGiGGyj11/WjO11WlUUVejSDgN0 owI5WuY9aXv8UHhn869S7ao8u3Yh2kPWIWNUpubnPD1UNSmF6AMG0NS1u7piUFQPrZso kNrngrU+EU7QCrYXZBu1maQkHcivkuHzyFxfvutrd5gLiZp3ulIFKw/spfTw9HUBNBD8 vrUHSKzWMfIWL6UyAqpGpXGxe/idf0vzpExnL9PjWNQnmfBDLfBBvI06/2jtGoz31cX3 Lo8w== 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:to :from:date:arc-authentication-results; bh=b/S0NMraUH4O9eCdKIDMtlDmHkUeTy7X5LxKSlirtvU=; b=DsGouyImmBnflW5DFlqY2h1bn62cOy4a2NsQEDKViHytvvwi1Ev7eLnDZi9NN5l79H FnJgvfzw8J9ITwu6AfV6jVxCQcxFkwG/tI0un5RqvFS3D3a5SP10c4+N3kbyH8SV6GP6 TNJPAilK/KLhqPOXVwRGf2gAaWH2KqVqGzcexZRfOPreh+OgSolaEsg0cs6p3tTg66F1 5fSC1ZhF+Wqe5uK4/oJG/psMllxaMu63shvAGPs0j+g7woEUeL9M+R2XIuOb7XJ1UkcC kSlwu9jM42FBPnysM+iA8KQUECZqPMabhhQVGX90K9OXw0FJQx18Es6KLszP8upow1Dv TZaQ== 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 a17-v6si11709659plm.151.2018.04.23.00.16.36; Mon, 23 Apr 2018 00:16:50 -0700 (PDT) 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 S1754029AbeDWHN6 (ORCPT + 99 others); Mon, 23 Apr 2018 03:13:58 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60110 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752787AbeDWHN4 (ORCPT ); Mon, 23 Apr 2018 03:13:56 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id AC1F0D69; Mon, 23 Apr 2018 07:13:55 +0000 (UTC) Date: Mon, 23 Apr 2018 09:13:50 +0200 From: Greg Kroah-Hartman To: "Theodore Y. Ts'o" , Ben Hutchings , stable@vger.kernel.org, Wen Xu , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4.9 37/95] ext4: add validity checks for bitmap block numbers Message-ID: <20180423071350.GB28186@kroah.com> References: <20180422135210.432103639@linuxfoundation.org> <20180422135211.941652389@linuxfoundation.org> <30c688b5783a5779811ce68893b7001390b9e200.camel@decadent.org.uk> <20180423060352.GA8194@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180423060352.GA8194@thunk.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 23, 2018 at 02:03:52AM -0400, Theodore Y. Ts'o wrote: > On Sun, Apr 22, 2018 at 10:54:23PM +0100, Ben Hutchings wrote: > > > offset = blk - group_first_block; > > > - if (!ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data)) > > > + if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize || > > > + !ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data)) > > > > Isn't sb->s_blocksize a count of bytes? If so, doesn't that mean that > > we should be comparing with sb->s_blocksize * 8? > > Yes, nice catch, Ben! Can we temporarily drop this patch from the > stable queue until I can get a fix in? > > In practice this shouldn't be a problem because of the default ext4 > layout with flex_bg. But we should definitely get this fixed before > we let this flow into the stable kernel. Now dropped from all queues. When you submit the fix, can you also tag it for stable so I know to pick this one back up? thanks, greg k-h