Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp188787pxv; Wed, 21 Jul 2021 19:44:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0h2Wk6p4dkKz1zvO5cyUrlK0gZXxnjdTLvGyxTOQIdXpVkjF+NjOYHk9iUuPZQX+9D/yz X-Received: by 2002:aa7:d809:: with SMTP id v9mr52423291edq.146.1626921898762; Wed, 21 Jul 2021 19:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626921898; cv=none; d=google.com; s=arc-20160816; b=z0JmA80Mn6arWZZROALnlnreD2ynQQbDvrI5HY0KRFxnvz8WgowmiLsxmaa/jMyh5W CPf83Hz74x4JsdQIahF+TB/JM+gcnXKERHpNf8H86iNywBgq6S21VW6epQr/myMS2xsI zoVr7x7nOnUIUdn415QVfgsVYa9W8pCKG7nA/tGiM1hF/aT3Rx6O0zJRhu+qZPvwpLn/ FEGXIOWOS1wzob+4VJBOnhGrjJc14MzQ3PzrqrQIx7pGHw50q77cAbK6YtL77Vgkz7rn BsFs6XelMNL8/pwzE/77d0+bl2NQ589+xDJSvR/wKqzeuDTEX7Bh6IPF8n6Y4eahgVPH Vt0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=trKjuJwdkgxFMVsYzcVcOjk9/UkqIG2o1SR/kaFE2iA=; b=Gxu4tVrH6SnO6m5JMN5UPBoZZ+ancFoqJskDpj3LVhQlIfaeT9dosRCw+kRBMblfui bWPO6GjJDjQsD0iRLXzpNS1m8aeBLyhkFe571Jv7B4pJAGhC57Pg5o44SZxMi/foHIxC 0/1Z9FndoNX44NpbLRVhFhmHML5nkC8PvZHA1NgDjt023B965XlCC6mif/VMIS1Isnie Gj7BSPRYpruoKx1hu20xaFueRjiD2TJrSfpAlprr4NCALtvDKUn9WcYUrp+nq0WMHOL2 my4jDIqt1Km7VpkAhBYn7B1I3ifqIpdzCRmNxJbZQpyR+ZqvdrXYBG38dI9xOevor9yu EHnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qGCClV3Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ne29si646323ejc.697.2021.07.21.19.44.35; Wed, 21 Jul 2021 19:44:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qGCClV3Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230254AbhGVCCq (ORCPT + 99 others); Wed, 21 Jul 2021 22:02:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbhGVCCq (ORCPT ); Wed, 21 Jul 2021 22:02:46 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63A24C061575; Wed, 21 Jul 2021 19:43:21 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id t186so3350743ybf.2; Wed, 21 Jul 2021 19:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=trKjuJwdkgxFMVsYzcVcOjk9/UkqIG2o1SR/kaFE2iA=; b=qGCClV3YHUSpFeq9nUGnUFt283a/i9dlCjDOVFrmNDfR0zw4clt+4YwO8LBby8GfFC fkr1i+rWALu208yLBr97IbrRWFxpbMIulbCMWOM8UotkckqSCSE04DUI0XAf7et2AsEh Eh9BnScygaHRQtD9jokcYx2dzfC20ksS4ZMejNWFkQy7YijXOZwN2QekFyhTl3RfEyZ9 W9Ff/iboR3VW64pnI3DTdU1ZHH9c3uZNAiIZWXql/sZouxgVit9hKWRvowqsdrWR0Fo+ sG5wYeEYhPCFcYzfd/8tHwocP36LvCKvD4KUdOVXXOn7xCN69qGsFMHZwkpgaOkup6gu WSfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=trKjuJwdkgxFMVsYzcVcOjk9/UkqIG2o1SR/kaFE2iA=; b=uiWUQIv7xd2nRmRYHleGawsIuG0PcspYkpot29CooE4onF/6aiQ0pf19Qhny+YLWaz iQdaQ6Kr8/iPmrJ6jMB6JM0AHWuvRaRhLZj7QRYMfJsgmsOpQzsuYRcAu8B2dqJbkH1K z9iKqx9SrRlvO3qXpuMLkvJ4TDycTumnIZCEBjLkJuXQSkZW5VthJjRzf9TKGZm6Y4Is M6WhG8Jc1aWTVMdEGebshwjPp7z7d8c/p/89WyQv9jhnTB+vmxDMdaNtAFinnBTsRq4P SfoAmQ8M4fZImuPSBimuYbnYkw/WTCbK0lVcKxPg2k6xe27G8YjRuro1SBNAkN9jAvxo /o8g== X-Gm-Message-State: AOAM531nYJQ3CXy6E5eGwZ0ST8rf+qDCo/zBYyqnRNlaky2ECAmjWdfs fx/VK7TViB9idh6SDPb3gA91zdw1iLbOlhFWuCc= X-Received: by 2002:a25:b093:: with SMTP id f19mr50201166ybj.90.1626921800666; Wed, 21 Jul 2021 19:43:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: butt3rflyh4ck Date: Thu, 22 Jul 2021 10:43:10 +0800 Message-ID: Subject: Re: A shift-out-of-bounds in minix_statfs in fs/minix/inode.c To: Matthew Wilcox Cc: LKML , linux-fsdevel@vger.kernel.org, syzkaller-bugs , djwong@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 1:37 AM Matthew Wilcox wrote: > > 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? Yes, the attachment is a reproduction. just compile it and run. >That's not something we're > traditionally interested in, unless the filesystem is one customarily > used for data interchange (like FAT or iso9660). > These file systems are my fuzzing targets. Regards, butt3rflyh4ck. -- Active Defense Lab of Venustech