Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1090495rbb; Sun, 25 Feb 2024 19:56:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXLFUvreGoBCd1yyci9vCDqSByzWbSVpa9atDAZIs7K0obQAHUHl6pHs5ae67JKassqr6lY6JJ5JpaA4oyZeG5v8rCHhd+FfUJfA8SGWw== X-Google-Smtp-Source: AGHT+IG3bpnr8CmiaoiiaSOTYuuJrr5yuPTxkTjML7IwcPYF3kWo5kKNcMkCgFASauqwGX6gpL4f X-Received: by 2002:a05:6402:3456:b0:564:7007:e14c with SMTP id l22-20020a056402345600b005647007e14cmr3634869edc.22.1708919798180; Sun, 25 Feb 2024 19:56:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708919798; cv=pass; d=google.com; s=arc-20160816; b=hrrOdoDVbTtUewRV2rurXDm0B3mocv/OPCtfsjaR579+fUhjJP7x5//infuj4QfUbt VmAp9khF+B19nAeZ6s/AxIaCpd2p7m0jWSWSfnmoHYIlNY/wqcq7djkxBenPRJcagsyX QDbLOy2LKsdhtgg0PYzgEcGMItJWdugafsEsDyhI5/YmVmpwsIm5pSZ7Idb4UZuJXvFc 2cBgH7F9SzY3mUhd72is3pv5kBYPWc/j/blGG9zu0x6P4PLBMZ5oMDBtdQ2tluF6UaOi kl/SP6Uy7i46E40qTLpKf3vLEAbhISi+bJqGtF/R4mMqqkn63+zOwzyOD/9LKWB3H9UM 1o7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:message-id:in-reply-to:date:mime-version :list-unsubscribe:list-subscribe:list-id:precedence; bh=h0zDGz1LWZDnj7pbq9vHRQdQrSo5fq2Jh5AL7Ztrk2A=; fh=ZBai9zXPVt/Hxb44bq3BfZ3KsImD9mQYfoBV5x7uCZQ=; b=h+RkA9Wg//J5OEMjPlax1vRfCyR4Rexbxa3KzlEgYa5uSNfTGVMsg/+SPD5ks/kWD5 Bp//hWEmRpE4bRKWpXfdqWveBnAYIkE7DQ2BXbo244vvJrc7I63gYGzZ9Wk0eG0d7E7V m/nBJiX1irXQkLW4L2LKhE7UVcoibKn71jezG7Jxoc/IPDtt7VWH0CAD1kf4Asb3Ihe5 cqnKMTh14KzLBNgtG640Rp2w9fozJc+97DkwgzY97H7YqfHwzR5Je7Rzt8pR8PRCTaZ9 iQpOoN52VNXBCFPSM/zYcg1lpdO0Aukb5TCXotvN2Q22tIAcGA2FFyUKCe1/y6hKN27Z TZcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-80480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80480-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i2-20020aa7c9c2000000b00563f0a6342fsi1624402edt.382.2024.02.25.19.56.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 19:56:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-80480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80480-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BEB681F2255E for ; Mon, 26 Feb 2024 03:49:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2542C1B299; Mon, 26 Feb 2024 03:49:18 +0000 (UTC) Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4BEB17BC5 for ; Mon, 26 Feb 2024 03:49:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708919357; cv=none; b=CI4W/50UGTN+HHYEhg7QKSZwFW5tAEWlFdBKebWHwFFNOMvPlB2Mxz+Wb1XQxPF9X+xJI5mqJc/94czogPKpf7YR7uhyEEGuzq8xuy1B4lFelR4xsOzC8Fa+GiNq4EvzpLuoQhsDZ3Fc4GWVR+Oj2KnVThmn472QeR/atlhLzCE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708919357; c=relaxed/simple; bh=Kv/9ghpnZXPQShU9ARicBKeEcvIWW8nIOrSAkXJtrQY=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=A6pBcgk2Vy3NK6UZHXIarzezw2oh5JZ4/gy2bL5HZF9Z4XInJBHUVWsOv8O/bxIzbXqniVXC3a+jpDrbeTZf6nmdnKOKraDjIN+B5tK4NVz+zBvo48kfyTUL1twMSAs1B/0TgbDpzciAl7ApXAN5odnBeCwuWSi4vkixFca+ga8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-il1-f198.google.com with SMTP id e9e14a558f8ab-36512fcf643so17981355ab.1 for ; Sun, 25 Feb 2024 19:49:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708919355; x=1709524155; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h0zDGz1LWZDnj7pbq9vHRQdQrSo5fq2Jh5AL7Ztrk2A=; b=vJQciSm4vm4n10tvKi+P+NLutYdnyBi/oZ4Y93gr4IuYPY23l4XIzj2hiYe8L3EQ13 w5H8ud3Qi5vHDFLB/LC8844d/kjDGYQQifA4r23SnjghT+ngaQX9UpZ0Iu5pIzCxijTe hu+0cL0hbyZFj5Lfbj5MEkholJSHqvVPEF9A3I0W4XJLP/ir1MTQ3ecnRkFXZG5NZBE7 4w7UbaHIBZO7bnJSKfG0k4ckBKmSUMHC0iFUZazG6hUHOlQdrWIkugeZubTbS45XAQGq kPIynS1FYddVqLXwuxpJUUO5BV+bloo6PG1yERRK/anxZIAVT/0Ax5IqV/Kb3wpqqUqo 1pdg== X-Forwarded-Encrypted: i=1; AJvYcCXHe8u15whlLy9udoNMc1ccNHEh87q+9ZUIslMCM1WN+0avpWPf2oTkwdy/sldSMPWUFEXLqugCyCBzVR4Wp6uo7sIRlVU2Y3hkOwfi X-Gm-Message-State: AOJu0YwK8ZRB4jnfc45WdewajF75Mcun5JT5/739dPF7BBOmRQmx2P0R S2icKmFnursEmMdKytUzdbhK71mrtojF/fbQjf6wnzDuMoCwnXDFNueDrc0gv7WgbCtf8AL5B+s Rvclr/sJxM1J1EzQxvEIOE+tgvag//v/w+p+pa3ofKXe+SZBIeiB0fWM= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6e02:349f:b0:365:7607:3f4b with SMTP id bp31-20020a056e02349f00b0036576073f4bmr472012ilb.2.1708919355150; Sun, 25 Feb 2024 19:49:15 -0800 (PST) Date: Sun, 25 Feb 2024 19:49:15 -0800 In-Reply-To: <000000000000ed666a0611af6818@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000001d1939061240cbd7@google.com> Subject: Re: [syzbot] [bpf?] [net?] BUG: unable to handle kernel NULL pointer dereference in dev_map_hash_update_elem From: syzbot To: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, davem@davemloft.net, haoluo@google.com, hawk@kernel.org, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, kuba@kernel.org, linux-kernel@vger.kernel.org, martin.lau@linux.dev, netdev@vger.kernel.org, sdf@google.com, song@kernel.org, syzkaller-bugs@googlegroups.com, yonghong.song@linux.dev Content-Type: text/plain; charset="UTF-8" syzbot has found a reproducer for the following issue on: HEAD commit: 70ff1fe626a1 Merge tag 'docs-6.8-fixes3' of git://git.lwn... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1762045c180000 kernel config: https://syzkaller.appspot.com/x/.config?x=4cf52b43f46d820d dashboard link: https://syzkaller.appspot.com/bug?extid=8cd36f6b65f3cafd400a compiler: arm-linux-gnueabi-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 userspace arch: arm syz repro: https://syzkaller.appspot.com/x/repro.syz?x=110cf122180000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=142f6d8c180000 Downloadable assets: disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/8ead8862021c/non_bootable_disk-70ff1fe6.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/bc398db9fd8c/vmlinux-70ff1fe6.xz kernel image: https://storage.googleapis.com/syzbot-assets/6d3f8b72a671/zImage-70ff1fe6.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+8cd36f6b65f3cafd400a@syzkaller.appspotmail.com 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 00000010 when read [00000010] *pgd=8423f003, *pmd=fe0d5003 Internal error: Oops: 207 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 2983 Comm: syz-executor360 Not tainted 6.8.0-rc5-syzkaller #0 Hardware name: ARM-Versatile Express PC is at __dev_map_hash_lookup_elem kernel/bpf/devmap.c:269 [inline] PC is at __dev_map_hash_update_elem kernel/bpf/devmap.c:972 [inline] PC is at dev_map_hash_update_elem+0x90/0x210 kernel/bpf/devmap.c:1010 LR is at get_lock_parent_ip include/linux/ftrace.h:977 [inline] LR is at preempt_latency_start kernel/sched/core.c:5843 [inline] LR is at preempt_count_add+0x12c/0x150 kernel/sched/core.c:5868 pc : [<803e5f34>] lr : [<8027b29c>] psr: 60000093 sp : df96dda8 ip : df96dd68 fp : df96dde4 r10: 00000000 r9 : 828f71c0 r8 : 8417bb10 r7 : 00000000 r6 : 20000013 r5 : 8417ba00 r4 : ffffffff r3 : 00000000 r2 : 00000010 r1 : 00000000 r0 : 20000013 Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user Control: 30c5387d Table: 84656480 DAC: fffffffd Register r0 information: non-paged memory Register r1 information: NULL pointer Register r2 information: zero-size pointer Register r3 information: NULL pointer Register r4 information: non-paged memory Register r5 information: slab kmalloc-512 start 8417ba00 pointer offset 0 size 512 Register r6 information: non-paged memory Register r7 information: NULL pointer Register r8 information: slab kmalloc-512 start 8417ba00 pointer offset 272 size 512 Register r9 information: non-slab/vmalloc memory Register r10 information: NULL pointer Register r11 information: 2-page vmalloc region starting at 0xdf96c000 allocated at kernel_clone+0xac/0x3c8 kernel/fork.c:2902 Register r12 information: 2-page vmalloc region starting at 0xdf96c000 allocated at kernel_clone+0xac/0x3c8 kernel/fork.c:2902 Process syz-executor360 (pid: 2983, stack limit = 0xdf96c000) Stack: (0xdf96dda8 to 0xdf96e000) dda0: df96ddc4 00000004 00000000 1b98af0a df96dde4 8417ba00 ddc0: 824aeaf0 843ef140 8442a040 8365a9c0 00000004 8417ba00 df96de14 df96dde8 dde0: 8038c0b8 803e5eb0 00000000 00000000 80884220 8417bab8 8365a9c0 8365a9c0 de00: df96dec8 843ef140 df96de6c df96de18 8038d040 8038bec8 00000000 00000000 de20: 8027b44c 00000004 20000140 00000004 00000000 8442a040 20000200 00000000 de40: df96de6c 00000000 00000020 df96dea0 00000002 20000200 00000020 00000000 de60: df96df8c df96de70 80392aa0 8038cdf8 8088300c 81856650 00000000 841ee000 de80: df96dee0 df96dfb0 df96dea4 df96de98 80884220 df96dee0 df96dfb0 80200288 dea0: 20000200 00000000 00000008 00000000 00000008 8041ad98 841ee000 ffffffff dec0: df96df2c 80200b9c 00000003 00000000 200000c0 00000000 20000140 00000000 dee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 df00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 df20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 df40: 00000000 00000000 00000000 00000000 00000000 00000000 df96df94 1b98af0a df60: 8134e0a0 ffffffff 00000000 0008e058 00000182 80200288 841ee000 00000182 df80: df96dfa4 df96df90 80394ea4 80392830 20000200 00000000 00000000 df96dfa8 dfa0: 80200060 80394e84 ffffffff 00000000 00000002 20000200 00000020 00000000 dfc0: ffffffff 00000000 0008e058 00000182 000f4240 00000000 00000001 00003a97 dfe0: 7e973c70 7e973c60 000106cc 0002e810 00000010 00000002 00000000 00000000 Backtrace: [<803e5ea4>] (dev_map_hash_update_elem) from [<8038c0b8>] (bpf_map_update_value+0x1fc/0x2d4 kernel/bpf/syscall.c:202) r10:8417ba00 r9:00000004 r8:8365a9c0 r7:8442a040 r6:843ef140 r5:824aeaf0 r4:8417ba00 [<8038bebc>] (bpf_map_update_value) from [<8038d040>] (map_update_elem+0x254/0x460 kernel/bpf/syscall.c:1553) r8:843ef140 r7:df96dec8 r6:8365a9c0 r5:8365a9c0 r4:8417bab8 [<8038cdec>] (map_update_elem) from [<80392aa0>] (__sys_bpf+0x27c/0x2104 kernel/bpf/syscall.c:5445) r10:00000000 r9:00000020 r8:20000200 r7:00000002 r6:df96dea0 r5:00000020 r4:00000000 [<80392824>] (__sys_bpf) from [<80394ea4>] (__do_sys_bpf kernel/bpf/syscall.c:5561 [inline]) [<80392824>] (__sys_bpf) from [<80394ea4>] (sys_bpf+0x2c/0x48 kernel/bpf/syscall.c:5559) r10:00000182 r9:841ee000 r8:80200288 r7:00000182 r6:0008e058 r5:00000000 r4:ffffffff [<80394e78>] (sys_bpf) from [<80200060>] (ret_fast_syscall+0x0/0x1c arch/arm/mm/proc-v7.S:66) Exception stack(0xdf96dfa8 to 0xdf96dff0) dfa0: ffffffff 00000000 00000002 20000200 00000020 00000000 dfc0: ffffffff 00000000 0008e058 00000182 000f4240 00000000 00000001 00003a97 dfe0: 7e973c70 7e973c60 000106cc 0002e810 Code: e595210c e1a06000 e2433001 e003300a (e7924103) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: e595210c ldr r2, [r5, #268] @ 0x10c 4: e1a06000 mov r6, r0 8: e2433001 sub r3, r3, #1 c: e003300a and r3, r3, sl * 10: e7924103 ldr r4, [r2, r3, lsl #2] <-- trapping instruction --- If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing.