Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3824889rwa; Tue, 23 Aug 2022 10:44:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR6kkpNUv1ntwPZppKaqTCpiDQPryPOflH3zXyXn5tlVwq6rStA5OEq13OBS7jmwhgsC4oSN X-Received: by 2002:a05:6402:3584:b0:446:b79b:ed5f with SMTP id y4-20020a056402358400b00446b79bed5fmr4635037edc.195.1661276671313; Tue, 23 Aug 2022 10:44:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661276671; cv=pass; d=google.com; s=arc-20160816; b=BlY2ggOS5/SN0W1ZpuU+C4vp0oh4r6XWS4/WWUBD6FJ6qHWyOUEDyR8DJWEH9KnbFV IIaylANedetSS7M1zA+ukiOBC+Ku0wexfjHh1RLkM6jFNrKnNWFAY0t0wpiyoxdmwmyQ RED8/VlmQQVlG9Y7Bw0gAlB4n7fMik91JC/6gequpmaR/6d75R0SI5znWsqZazq9zjpj EXFBg7uvGuZhFY79xqpuWBZj7jbAr1j5lyyXnYFQon6wFaqZnUKy5jcH4/CSAFVWTjgO E5DG1VlYNyA/99WvHUeRgMOSkGv5GMvW+fJQStEfqg5VPwNqLxNYKAq36ehJDFtBvqkM qcYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:subject:message-id:cc:to:from :dkim-signature; bh=48lrmCnAI4BOdsVRvDHdoRgNfI9n5wEdayysaFK+3kw=; b=NyDB9F1gQaqyaLJmQg1CoYGbSjP3/fSMQ4nxyRhm1KTRkH5uGNns9qH4KwttMeTq8s cQaNVfUhugJU5KDq9qgwXMyFpHCiqL/NVc5RzL8/WxdGuUOQ24pVWk8ETcioyH7WezIo uLvotVyyeJjHKRuInJ/IeYKd5XSz8P3+k6PZ6ugr/mKNUVJE7MdorqEioKEYBRo7R8kl ZcVmlQKIaWaK01HJbH/MKIxuybf1Jbssl0xj+vcXE7v7G51VIuK/gtn0Fcri7c930eFc ovO7AVqnxV+NWanzYc3bSDWQEkyBZtSCijLmbGGzsmnISnpK2viqx68umBozA816Yl3v KeWA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=Lj9kFMfA; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=siddh.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020a50d492000000b00446817c6f14si2435331edi.197.2022.08.23.10.44.02; Tue, 23 Aug 2022 10:44:31 -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=@siddh.me header.s=zmail header.b=Lj9kFMfA; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=siddh.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231617AbiHWRnX (ORCPT + 99 others); Tue, 23 Aug 2022 13:43:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230252AbiHWRmw (ORCPT ); Tue, 23 Aug 2022 13:42:52 -0400 Received: from sender-of-o50.zoho.in (sender-of-o50.zoho.in [103.117.158.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 654B29E697; Tue, 23 Aug 2022 08:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661268948; cv=none; d=zohomail.in; s=zohoarc; b=eagV3hFkZYnwbakrbXhtc9g3aO1gVBHqpu49XGBsd3+riRGCjc1oktdH+w7r4IbYLLIVVQi1HljbXyXp/jCzh7pncfWAjTtGq1QUmLsFPvlH+TPR0Qitado+YS4+REvYsCUrZ3N+ZFDEC6R9QUXA1gYCrecZS/VJIA7cMRgzpRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1661268948; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=48lrmCnAI4BOdsVRvDHdoRgNfI9n5wEdayysaFK+3kw=; b=dcXD5TxeXwwuSU4lCx5knnXQi3YYxBXdqNMZ1FEYGJ0RJFARdapUM9ThPe8Ra+P8ShAm8l94E2SncPcW2iTtlh1N1LWRSGu7bQssYKiOGZhdqTjv5TZqIoQUMttsWm+TVVn4eFTZOKGm8ExuQfgN7qxTwpZPPfoS3RuYSSSA9mg= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=siddh.me; spf=pass smtp.mailfrom=code@siddh.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1661268948; s=zmail; d=siddh.me; i=code@siddh.me; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=48lrmCnAI4BOdsVRvDHdoRgNfI9n5wEdayysaFK+3kw=; b=Lj9kFMfAziwo1q654cN0YK+O2sMEGsVXCZzKujidPyswNAmPuVfgHRWm3aTBi+7T XzUV4DySRehhXIf3yV1BM5TXdx+S8MyfZUt7813tUg+gn49Rj9dbjDRGI5xI23Z7lFq djguecRrI4L/ogPprIO9/E4slDxNGdtxb79m6yuk= Received: from localhost.localdomain (103.249.234.81 [103.249.234.81]) by mx.zoho.in with SMTPS id 1661268946863160.31652801965868; Tue, 23 Aug 2022 21:05:46 +0530 (IST) From: Siddh Raman Pant To: willy@infradead.org Cc: code@siddh.me, david@fromorbit.com, djwong@kernel.org, fgheet255t@gmail.com, hch@infradead.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, riteshh@linux.ibm.com, syzbot+a8e049cd3abd342936b6@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com Message-ID: <20220823153542.177799-1-code@siddh.me> Subject: Re: [syzbot] WARNING in iomap_iter Date: Tue, 23 Aug 2022 21:05:42 +0530 X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset=utf8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_RED 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 Oof, I didn't mean it to be there. That would actually be wrong anyways. Extremely sorry for the avoidable oversight, Siddh #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi= t master --- drivers/block/loop.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index e3c0ba93c1a3..e1fe8eda020f 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -979,6 +979,11 @@ loop_set_status_from_info(struct loop_device *lo, =20 =09lo->lo_offset =3D info->lo_offset; =09lo->lo_sizelimit =3D info->lo_sizelimit; + +=09/* loff_t vars have been assigned __u64 */ +=09if (lo->lo_offset < 0 || lo->lo_sizelimit < 0) +=09=09return -EOVERFLOW; + =09memcpy(lo->lo_file_name, info->lo_file_name, LO_NAME_SIZE); =09lo->lo_file_name[LO_NAME_SIZE-1] =3D 0; =09lo->lo_flags =3D info->lo_flags; --=20 2.35.1