Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6022465rwl; Mon, 9 Jan 2023 03:13:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXvhgL3nKAx/yJNsUgg7mUpifqDTZrRtFioJiNYzF20BWYPUWFz/nyZn4M2Jk75EwrmlPq7A X-Received: by 2002:aa7:d78b:0:b0:48c:cb73:7be0 with SMTP id s11-20020aa7d78b000000b0048ccb737be0mr24628121edq.23.1673262832046; Mon, 09 Jan 2023 03:13:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673262832; cv=none; d=google.com; s=arc-20160816; b=NLgRh76x9NPU1Av719Rvaldz7+16nvpFqoPVIJddyIyPWuN3ANGpeZ4By0TCBBuRuU /KEk4+31cGSl/loSu93MT0yHe7GQ0wNWRhujrrtmpWYiMZyPN30Qvjo2nOMgZZsONrEQ CHxZxVOvPqv3T3lJcgqNVaapVQ18Eo/TulBIzuuTaMpOWT0G2qXR19pnhI+NaWI5D9Az xavnaJRbfiVUG/ksUbhHaLLN75hRE4B7T3kkyqMTOInGc4ZupV73eWAoqFJbhm5BW9GF tCk46XLH34BY9MGgJZHw4LquAcncjrxqyrUGXHaRpLszjO7sNjzvUNWpvEvBALKicKIU aPyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=1EUqIfx9Mi/gWuJ2rPXdG+swMZNweRSSYqs5AzGlUM0=; b=QmPq0MIDX5b0Qs7ju3a5PaZPTKZ2QhzcbsKKC6y4jDvo0GqF8TuP03CMdZSAI0QuNK YchLO7xArCqnEW2nAmiADuPgUpFpnj9Bm/Wjnw7xO/NvNUJ+vz4DEhNcThIWTR0+SfQq 5xItwrBS84ws2yI3jYA87HlLnIQQotpwwKDrbYqknxEU1+THE96hFijBLYP/vc7gTqWL hbj4G3gCnAI5bXF/DUbBZd5lym2g4OajhSnuRaBiPiJJFPomK1PjTAISyym0w0lDrp4q LZUTHLdWt7dB6yecJoEKbhG6aUWy7o+ISwmOGv/VIQWdsFQWLgkmUUMktn+Hh5gXJXzg N10Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t4U47ptg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cy15-20020a0564021c8f00b0047e6f8f62b6si8027174edb.140.2023.01.09.03.13.39; Mon, 09 Jan 2023 03:13:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=t4U47ptg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236924AbjAIKl3 (ORCPT + 53 others); Mon, 9 Jan 2023 05:41:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236962AbjAIKkv (ORCPT ); Mon, 9 Jan 2023 05:40:51 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23C2418B16 for ; Mon, 9 Jan 2023 02:35:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B5BD660FD9 for ; Mon, 9 Jan 2023 10:35:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A1FFC433D2; Mon, 9 Jan 2023 10:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673260516; bh=YmOTwEg410xLry6JPtWUVue+KxFnjS0fs4qiJfMqPn0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=t4U47ptgIoaLdfE+zHI0kATbQY0S6DflXlbgdgW/lTXMo1nFa4mJ1oXvx1jpZ2K1Z TxATEvh2KtoECvYtsn1WfOhPkYqo5FxMxlOHPpUL+s3ZDmYaGceBENP+BNtP1Jdx6X i5EPcLOZOF3WNHgkJnVunnwkL3TDLK1N7W4TJw9e5vOC697Mi1Js+EQUYKJqZDdt3K m9zodUU9vaB4Q0EaPo4QpbVXTyGA5HJMe/jNfH2k7okhju6/X75p3OiL2zNx/r1375 rrXqR/wFqWlL2hfwOwiWZy+1qcsK2iAF5dd38dHw9/7j3zLPtKE08urje/hdxh6t1s faa5jrMbpguiQ== Message-ID: Date: Mon, 9 Jan 2023 18:35:12 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2] erofs/zmap.c: Fix incorrect offset calculation Content-Language: en-US To: Siddh Raman Pant , Gao Xiang , Yue Hu , Jeffle Xu Cc: linux-erofs , linux-kernel , syzbot+a8e049cd3abd342936b6@syzkaller.appspotmail.com References: <20221209102151.311049-1-code@siddh.me> From: Chao Yu In-Reply-To: <20221209102151.311049-1-code@siddh.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org On 2022/12/9 18:21, Siddh Raman Pant wrote: > Effective offset to add to length was being incorrectly calculated, > which resulted in iomap->length being set to 0, triggering a WARN_ON > in iomap_iter_done(). > > Fix that, and describe it in comments. > > This was reported as a crash by syzbot under an issue about a warning > encountered in iomap_iter_done(), but unrelated to erofs. > > C reproducer: https://syzkaller.appspot.com/text?tag=ReproC&x=1037a6b2880000 > Kernel config: https://syzkaller.appspot.com/text?tag=KernelConfig&x=e2021a61197ebe02 > Dashboard link: https://syzkaller.appspot.com/bug?extid=a8e049cd3abd342936b6 > > Reported-by: syzbot+a8e049cd3abd342936b6@syzkaller.appspotmail.com > Suggested-by: Gao Xiang > Signed-off-by: Siddh Raman Pant Reviewed-by: Chao Yu Thanks,