Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp636997rwl; Thu, 5 Jan 2023 02:20:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXvl/kXJP3EpMDKNGuXWXNphkDigqKthpUUZA2v8itqWHJfCSUviYzD2D7C+MT9DYy8e1Rb1 X-Received: by 2002:a17:90a:4ca2:b0:21d:5e73:d562 with SMTP id k31-20020a17090a4ca200b0021d5e73d562mr54318528pjh.27.1672914043409; Thu, 05 Jan 2023 02:20:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672914043; cv=none; d=google.com; s=arc-20160816; b=MaER1STcSQHVdv71eBEUxNp+R8R1PawSyqdY4K00nTDe6EHX4yGTnLB96MBuZu1V+w qwJa8EcGCihGI/2REB4Pcz5xssK1lo2MLWgyzwsdguS5TOVIGLzf8a9UGdICN79LnuBc SSsRXrGBGpGUxFtIIMczJe3h4fthn+T/rs5cVExoDbIPA0rd6IqPsZw5UYVF6eIIwkhg bihUtYTcFwtMhrpVmX+2KaShPryrpHSfhLUOSUgnFNystBLeQUzVA/80TGer8F4SXUwN 7FkG7xKp7pSTjVZXg0TRokkE2T/EOPx8VlFa7VxGNByEIlNleoz9BEoJCGOQlQJbAws/ vEew== 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:to:subject:user-agent:mime-version:date:message-id; bh=FYvv5lVVckYQL5YAnAxaZEj2aCgri3msiI+q6yWrtao=; b=Vn6pbxDwTZ8Yf9GMhe63mQYNmvUv2Ep1zeSOk0b8uow6ugNGauqhzP9BWnn2HrJnNm sejHZSMJtPWtuj0HKEKuQIT4Ytxm85FvIzdac3+TvA71z4uAgWXCcs5fEE0hbOIpncEW oYIYqPpbcqyzikk9mM+NKlwdl1hNhqPAf0pT1eBWSQBq59woGqCNaBsC1fy1EHVaSaNm DtQ9fPcJo7+0q1jnDNjZfv+HTdXbLzV1AHsyYAGb9z7zJZLxNvOtVcSvkXjy0vwDe0dr Q5ejYPiaadZnF5DsLty5YahIgGQFcgNUQap2bwDSnbqu0qWhJ/WzySDf1V1UBbEoPpMG at2g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a17090a8a1000b00220ac450834si1573948pjn.12.2023.01.05.02.20.36; Thu, 05 Jan 2023 02:20:43 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbjAEJuG (ORCPT + 55 others); Thu, 5 Jan 2023 04:50:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231429AbjAEJuE (ORCPT ); Thu, 5 Jan 2023 04:50:04 -0500 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2AB356887 for ; Thu, 5 Jan 2023 01:50:02 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R831e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VYvX.gW_1672912199; Received: from 30.97.48.239(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VYvX.gW_1672912199) by smtp.aliyun-inc.com; Thu, 05 Jan 2023 17:50:00 +0800 Message-ID: Date: Thu, 5 Jan 2023 17:49:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [syzbot] [erofs?] WARNING: CPU: NUM PID: NUM at mm/page_alloc.c:LINE get_page_from_freeli To: syzbot , akpm@linux-foundation.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, xiang@kernel.org References: <000000000000c0a08805f07291a0@google.com> From: Xiang Gao In-Reply-To: <000000000000c0a08805f07291a0@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL 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 Hi, On 2022/12/23 06:55, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: f9ff5644bcc0 Merge tag 'hsi-for-6.2' of git://git.kernel.o.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=15aa58f7880000 > kernel config: https://syzkaller.appspot.com/x/.config?x=827916bd156c2ec6 I wasn't able to build the kernel with this kernel config, it shows: "... FATAL: modpost: vmlinux.o is truncated. sechdrs[i].sh_offset=1399394064 > sizeof(*hrd)=64 make[2]: *** [Module.symvers] Error 1 make[1]: *** [modpost] Error 2 make: *** [__sub-make] Error 2 " Not sure what happened, and it seems some other person also reported before: https://lore.kernel.org/r/CAAGKmqL9k87xw68zwH9ZM7fQFFsgMnA7V=RB+tQ-M2WS6CZg4A@mail.gmail.com/ > dashboard link: https://syzkaller.appspot.com/bug?extid=c3729cda01706a04fb98 > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11bdd020480000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12c53ab3880000 Then I tried this C reproducer with my own kernel config and it didn't show any strange. > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/0c8a5f06ceb3/disk-f9ff5644.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/be222e852ae2/vmlinux-f9ff5644.xz > kernel image: https://storage.googleapis.com/syzbot-assets/d9f42a53b05e/bzImage-f9ff5644.xz Finally I tried the original kernel image, and it printed some other random bug when booting system and then reboot, like: [ 36.991123][ T1] ================================================================== [ 36.991800][ T1] BUG: KASAN: slab-out-of-bounds in copy_array+0x96/0x100 [ 36.992438][ T1] Write of size 32 at addr ffff888018c34640 by task systemd/1 [ 36.993032][ T1] [ 36.993249][ T1] CPU: 2 PID: 1 Comm: systemd Not tainted 6.1.0-syzkaller-13139-gf9ff5644bcc0 #0 [ 36.993980][ T1] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 36.994520][ T1] Call Trace: [ 36.994806][ T1] [ 36.995060][ T1] dump_stack_lvl+0xd1/0x138 [ 36.995488][ T1] print_report+0x15e/0x45d [ 36.995891][ T1] ? __phys_addr+0xc8/0x140 [ 36.996293][ T1] ? copy_array+0x96/0x100 [ 36.996677][ T1] kasan_report+0xbf/0x1f0 [ 36.997063][ T1] ? copy_array+0x96/0x100 [ 36.997448][ T1] kasan_check_range+0x141/0x190 [ 36.997865][ T1] memcpy+0x3d/0x60 [ 36.998196][ T1] copy_array+0x96/0x100 [ 36.998561][ T1] copy_verifier_state+0xa9/0xc60 [ 36.998985][ T1] ? bpf_log+0x270/0x270 [ 36.999343][ T1] ? check_buffer_access.constprop.0+0x2e0/0x2e0 [ 36.999867][ T1] pop_stack+0x8c/0x2f0 [ 37.000223][ T1] do_check_common+0x5663/0xbca0 [ 37.000654][ T1] ? _raw_spin_unlock_irqrestore+0x54/0x70 [ 37.001152][ T1] ? check_helper_call+0x8ef0/0x8ef0 [ 37.001614][ T1] ? kvfree+0x46/0x50 [ 37.001963][ T1] ? check_cfg+0x6aa/0xb20 [ 37.002353][ T1] bpf_check+0x7348/0xacc0 [ 37.002751][ T1] ? find_held_lock+0x2d/0x110 [ 37.003168][ T1] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 37.003676][ T1] ? bpf_get_btf_vmlinux+0x20/0x20 [ 37.004104][ T1] ? find_held_lock+0x2d/0x110 [ 37.004524][ T1] ? bpf_prog_load+0x1486/0x2230 [ 37.004935][ T1] ? lock_downgrade+0x6e0/0x6e0 [ 37.005341][ T1] ? __might_fault+0xd9/0x180 [ 37.005747][ T1] ? memset+0x24/0x50 [ 37.006087][ T1] ? bpf_obj_name_cpy+0x148/0x1a0 [ 37.006541][ T1] bpf_prog_load+0x1543/0x2230 [ 37.006943][ T1] ? __bpf_prog_put.constprop.0+0x220/0x220 [ 37.007438][ T1] ? find_held_lock+0x2d/0x110 [ 37.007854][ T1] ? __might_fault+0xd9/0x180 [ 37.008261][ T1] ? lock_downgrade+0x6e0/0x6e0 [ 37.008673][ T1] ? bpf_lsm_bpf+0x9/0x10 [ 37.009055][ T1] __sys_bpf+0x1436/0x4ff0 [ 37.009434][ T1] ? bpf_perf_link_attach+0x520/0x520 [ 37.009875][ T1] ? lock_downgrade+0x6e0/0x6e0 [ 37.010299][ T1] __x64_sys_bpf+0x79/0xc0 [ 37.010678][ T1] ? syscall_enter_from_user_mode+0x26/0xb0 [ 37.011171][ T1] do_syscall_64+0x39/0xb0 [ 37.011561][ T1] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 37.012058][ T1] RIP: 0033:0x7fee6fa1c5a9 ... May I ask it can be reproducable on the latest -rc kernel? Thanks, Gao Xiang > mounted in repro: https://storage.googleapis.com/syzbot-assets/7f2f76b76cd2/mount_0.gz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+c3729cda01706a04fb98@syzkaller.appspotmail.com > > ------------[ cut here ]------------ > WARNING: CPU: 1 PID: 4386 at mm/page_alloc.c:3829 get_page_from_freeli > > > --- > This report is generated by a bot. It may contain errors. > See https://goo.gl/tpsmEJ for more information about syzbot. > syzbot engineers can be reached at syzkaller@googlegroups.com. > > syzbot will keep track of this issue. See: > https://goo.gl/tpsmEJ#status for how to communicate with syzbot. > syzbot can test patches for this issue, for details see: > https://goo.gl/tpsmEJ#testing-patches