From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D91EC636CA for ; Wed, 21 Jul 2021 17:37:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C0FF6023B for ; Wed, 21 Jul 2021 17:37:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230115AbhGUQ5A (ORCPT ); Wed, 21 Jul 2021 12:57:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbhGUQ46 (ORCPT ); Wed, 21 Jul 2021 12:56:58 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 843F1C061575; Wed, 21 Jul 2021 10:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NIOeAssJiAIvzmBOsIJ5kA5U16lQSx2xMldjNfs0508=; b=EZCzRd5PKRp+8KRIDqdcuggQcW hUc43nT6G3bxoSHFgyJOeYIHPiCWlmbxu3P1DcYGicKBhjq5+BT31M97v79DC6h7kN0BPQlahcD9J XdITNhAkFIYYSG99uMvwH5FeFZZRXuEmRwRWPyNAi65t0JxR/WQkYmf6W+vSi3h7sCzZi5BQIGe7y 14kZ0yA+lnmiqZDS6C8FfDUss4R8Wfv0WZaYhimu6QliZw1t6422dFdkSZTsL3HGRRbFXC0+tPKrP iYBR1I6NtnOIAWQcY/uyH1B7cwwEs7yLglvd7/BxsITaWgzko4ID74Gkae7sl3nMrG2wsowDRL4Ys jp1LhFJw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6G9r-009Rb6-KG; Wed, 21 Jul 2021 17:37:26 +0000 Date: Wed, 21 Jul 2021 18:37:23 +0100 From: Matthew Wilcox To: butt3rflyh4ck Cc: LKML , linux-fsdevel@vger.kernel.org, syzkaller-bugs Subject: Re: A shift-out-of-bounds in minix_statfs in fs/minix/inode.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 01:14:06AM +0800, butt3rflyh4ck wrote: > ms = (struct minix_super_block *) bh->b_data; /// --------------> set > minix_super_block pointer > sbi->s_ms = ms; > sbi->s_sbh = bh; > sbi->s_mount_state = ms->s_state; > sbi->s_ninodes = ms->s_ninodes; > sbi->s_nzones = ms->s_nzones; > sbi->s_imap_blocks = ms->s_imap_blocks; > sbi->s_zmap_blocks = ms->s_zmap_blocks; > sbi->s_firstdatazone = ms->s_firstdatazone; > sbi->s_log_zone_size = ms->s_log_zone_size; // ------------------> > set sbi->s_log_zone_size So what you're saying is that if you construct a malicious minix image, you can produce undefined behaviour? That's not something we're traditionally interested in, unless the filesystem is one customarily used for data interchange (like FAT or iso9660).