Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5499329ybe; Tue, 17 Sep 2019 08:53:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVczIaa3E2gu8X5MOD4Oe0j+BKQgxj1TGPSmQ/lfyXR/N56X8p+aKpgjGJ00L3E692Dk12 X-Received: by 2002:a17:906:8494:: with SMTP id m20mr5417678ejx.30.1568735633589; Tue, 17 Sep 2019 08:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568735633; cv=none; d=google.com; s=arc-20160816; b=yUfqydrMQY1C6IU7QXh2PKUAx+48CkXOfySi+3kIh33Cikfmey0fyKCUgd1ZK4Midf DxLoETMM2qG3hOe1PiQr2SYQcHqySrbJ/Xquga+X1pTcGb/TWrZqAtn3SLJtBOaznsrk HDh09vWyMdiwWesau2rO15Nqn3BYF0A1Rfei4ovTQIuBnh/XCy+mPdDm/uXkWXxXKnLF Cbmjez6nbJQBja6KtF+GRouuZLc7F/WqiTrNsxC6Sk+QxUsIO+flKTp4WVsHUefEgo/c opYNrhBbKbAizTbDoIDLWx5rTqWblenhJEv9Dzpai5dMpdrM2YntX/PbVh5HPlvUaW2w cSmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=FuesOEXTZyW0Kf00lUo2BpFH/u/+FwrB7CgMDNfxC7k=; b=CxN+q2XBFbnfNnkhCaSEZRFU3WtQpdheV3p2k9XJ5fSejz59P/B7kzFNxI6vDOI6qu 3kOl+8QbjMDfysEcsdUaAqaMU5+nRVSKlQytzBHOkpHhexBueNoQZAO+VSydKe1ck0Bs 9Xdk+cnapQsLnyBaEgyJzimiN5eB0x+LPZDFCHnSyydW3PihpR7GQeb/15fAq6BtOz00 nm0ohtkO+RzQIzoK142wCtguJe6h5FeC624+sfENfTh8yUE76tn/XTtFoWP60r4dUM/B Jm4aleHRxfA0RJ9Fn4LltgLYI6MP2DtM7q/uw8mJKcJreDwTS70mhTxIap499iiTd4NV QOLg== 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 g25si510649edr.71.2019.09.17.08.53.28; Tue, 17 Sep 2019 08:53:53 -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 S2404111AbfIQGS2 (ORCPT + 99 others); Tue, 17 Sep 2019 02:18:28 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:48856 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730533AbfIQGS2 (ORCPT ); Tue, 17 Sep 2019 02:18:28 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5E241D42291E0B16F045; Tue, 17 Sep 2019 14:18:25 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Sep 2019 14:18:23 +0800 Subject: Re: [PATCH] f2fs: add a condition to detect overflow in f2fs_ioc_gc_range() To: Sahitya Tummala , Jaegeuk Kim , CC: References: <1568695763-29343-1-git-send-email-stummala@codeaurora.org> From: Chao Yu Message-ID: <1ad336ce-a28a-9841-6438-2b0f851c0a6f@huawei.com> Date: Tue, 17 Sep 2019 14:18:22 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1568695763-29343-1-git-send-email-stummala@codeaurora.org> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/9/17 12:49, Sahitya Tummala wrote: > end = range.start + range.len; > > If the range.start/range.len is a very large value, then end can overflow > in this operation. It results into a crash in get_valid_blocks() when > accessing the invalid range.start segno. > > This issue is reported in ioctl fuzz testing. > > Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Thanks,