Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1815778rwd; Thu, 15 Jun 2023 16:31:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5U1HdbZw+JkE7UFL0fYTKNZNXByf409/c12PMiY3X8dLRTwONcaMzTPNBGA+ezYqhwE7BI X-Received: by 2002:a05:6a00:15cc:b0:655:89f1:2db8 with SMTP id o12-20020a056a0015cc00b0065589f12db8mr653657pfu.16.1686871894780; Thu, 15 Jun 2023 16:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686871894; cv=none; d=google.com; s=arc-20160816; b=nI6xvgnw9wNV7kmOUrVZ4Oi4jqjMWkVuNRErqZzVGxvXX+Ob8RYAQ5kcb2nmBW2hNT Qhq7HEL6J8nbTHxg/C5hJon6WF8n/f1nGYBahTtg3XjtFoa9XEraBebRxGcxLa3IsdtC Ms+Bxt89bGENzj/6RcqRxwaFK+W3mphSU23KhUdI3+9TSXhIUc7gmlgfcp2YoHjSSVqV ERN3GmpyGpORFEuwIhMzCx4RbUEoBX1NNDJTfKsr+AOLcGSFK/66ouYJOH+mcM6s7hCa 8/OrOeTgRFB8rNotZ4ZGL6FB8YWW4ssbs1zgktNkN0/1vLYhppzF++zPnA7o+52Q1S0N 1Izg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JheLVD7TgrrvPlKIUUj5StkKxZqSq86+H9+pZtscafQ=; b=0Gr1iZzdopqF54Wl9Fl0MrEuZc3LpcpNl3rnuYRXe8D5AmiURJfXAQM+8s+pFgX5Mv FCR5qW/jF9/GoqZyDv6Ad7bmMn/ndJkU6jUYAIA7KO7khQwILE0GrCQhzX1biV5F5WoH HOgBHhiYghyd8QWIyierJvFm8rqJhX9vgqMcRtWJ4vSuQ8X9jFs7PTIJQ0YHzi7TVq9p ZpLU3okQMw99AkSgR4U9JwhVBpLa0bVHwD4NpMeArvB+x45eSE6VNKEa6eBfZCWovVih SqVFvqdyV2uNoWF1ozDVqnWAZ2eM1BiayyXXt7bhcXT1IAI3GaCRFqgTIiSHHsS2uKMx 7DoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=Lr3zDrvg; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r2-20020aa79622000000b00666ae7e325asi783350pfg.191.2023.06.15.16.31.16; Thu, 15 Jun 2023 16:31:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=Lr3zDrvg; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239840AbjFOX0I (ORCPT + 99 others); Thu, 15 Jun 2023 19:26:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240517AbjFOXZz (ORCPT ); Thu, 15 Jun 2023 19:25:55 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E88B2D67 for ; Thu, 15 Jun 2023 16:25:26 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-54fba092ef5so153961a12.2 for ; Thu, 15 Jun 2023 16:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20221208.gappssmtp.com; s=20221208; t=1686871455; x=1689463455; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=JheLVD7TgrrvPlKIUUj5StkKxZqSq86+H9+pZtscafQ=; b=Lr3zDrvg2YjLbg3wAQHAeQdra8CjJ+8zvzS/D1LsCH8dUK4gEAlyx3fK6Lg92tUKyV DA0u9/ttDd/fo4+MWQB1byPxmwICujA1bPmNPkCKf+2mc2toD/KHIY/50jB4gfhrs1pp VjplEv4s/j0PdsCtMu5X2Yy1KWyLM9fSBoCJVP6SnMYLiYzDtS5EPOa9YobyjTRTltnX 1F81vewiLpjmqN7kneuUF835bmjj9UtxBlfLEZIrSy9EkUbnpyBPdp4geNyGZ2Gks8OE 3rc/7EfmOPDTwUmOm34+UtkjxAoo3jFKAlMPudGHc/zvR5qRusPLZmwwMWC2ufKPlxZ8 kJnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686871455; x=1689463455; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JheLVD7TgrrvPlKIUUj5StkKxZqSq86+H9+pZtscafQ=; b=Bhzxt3ovZB5VCbjRLKFtAlCMaqzuRSlfcl1+VCb2j1cnf6XWSpRwYO6QGGHG3CjJsn gdqzd+jFQVP3rHa2gJz5mXNGoB5CZhoJEZ6vibGkno3kFbyagclWmgn90ra7/NjbLbus Y+ubfyPyQyQX1U3/yG/tS5B+9DpMXyNhdM4RL01fL7N4No/eVn+AnobstZBzwgUgPoje flaYg8O34ZXm2R8t1t29+SMO3Kvw2noyQWUy0QpdjRXUN4D7541jzowCnPKqpv3uuhvn UWamg7tf0BUF7KNMe1E9hIzfVxtNO1PXG5M7vOoWhE2+RmkEQ+3OjLbi7h5SsWfshEH6 R46g== X-Gm-Message-State: AC+VfDzZvkIWOK0gLhp8KbZMJJhlJ+vozmxFkRH3LBpLFwWfw08f9JI2 3iEhhWuC0E9ENNd1P2zRACUz/g== X-Received: by 2002:a17:903:32c1:b0:1ab:7fb:aac1 with SMTP id i1-20020a17090332c100b001ab07fbaac1mr531142plr.24.1686871455650; Thu, 15 Jun 2023 16:24:15 -0700 (PDT) Received: from dread.disaster.area (pa49-180-13-202.pa.nsw.optusnet.com.au. [49.180.13.202]) by smtp.gmail.com with ESMTPSA id j3-20020a17090276c300b001ac7af58b66sm14509724plt.224.2023.06.15.16.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 16:24:15 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1q9wK4-00CFk8-1K; Fri, 16 Jun 2023 09:24:12 +1000 Date: Fri, 16 Jun 2023 09:24:12 +1000 From: Dave Chinner To: Theodore Ts'o Cc: Aleksandr Nogikh , adilger.kernel@dilger.ca, jack@suse.com, linux-ext4@vger.kernel.org, syzkaller-bugs@googlegroups.com, syzbot Subject: Re: [syzbot] [ext4?] UBSAN: shift-out-of-bounds in ext2_fill_super (2) Message-ID: References: <00000000000079134b05fdf78048@google.com> <20230613180103.GC18303@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230613180103.GC18303@mit.edu> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Jun 13, 2023 at 02:01:03PM -0400, Theodore Ts'o wrote: > I wonder if we should have a separate syzkaller subsystem for ext2 (as > distinct from ext4)? The syz reproducer seems to know that it should > be mounting using ext2, but also calls it an ext4 file system, which > is a bit weird. I'm guessing there is something specific about the > syzkaller internals which might not make this be practical, but I > thought I should ask. > > From the syz reproducer: > > syz_mount_image$ext4(&(0x7f0000000100)='ext2\x00', ...) > > More generally, there are a series of changes that were made to make > ext4 to make it more robust against maliciously fuzzed superblocks, > but we haven't necessarily made sure the same analogous changes have > been made to ext2. I'm not sure how critical this is in practice, > since most distributions don't actually compile fs/ext2 and instead > use CONFIG_EXT4_USE_FOR_EXT2 instead. However, while we maintain ext2 > as a sample "simple" modern file system, I guess we should try to make > sure we do carry those fixes over. Hmmmm. Modern filesystems are crash resilient, based on extents and are using/moving to folios+iomap - calling a non-journalled, indirect block indexed, bufferhead based code base (that nobody is really using in production) "modern" seems like a real stretch. I have my doubts that maintaining fs/ext2 is providing much benefit to anyone. The code base is in the git history if anyone wants to study it, so it's not like we have to keep it active in the tree for it to remain a code base that people can learn from. Therefore, given the current push to sideline/remove bufferheads from the kernel, should we simply deprecate fs/ext2 and then remove it in a year or two like we're doing with reiser to reduce our future maintenance and/or conversion burden? Or just remove it right now and simply make CONFIG_FS_EXT2 select CONFIG_EXT4_USE_FOR_EXT2? /Devil's Advocate Cheers, Dave. -- Dave Chinner david@fromorbit.com