From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (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 4A485352C22 for ; Wed, 4 Mar 2026 15:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772638444; cv=none; b=mPYZoZiI5bd6WgqyCzdjtMWjHvo1+eoOv+D+fVD+mjHo1emPHO+QwrG71fXRbilenwWS1UW+/eyKQGJgAZpYWDijoHKHmS/5kQxZ81E4k02pi8nrrZlQtICDR78T/DA+or4Ax5R4d8pWulprJ4j9ywBf7s7bjpmstXSTLBdxVhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772638444; c=relaxed/simple; bh=9TLy4FJilbUJ3vmYBF/aJTUQ6fOTTXPPSHe+dHDocPI=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=pKoGlFm2mCRRchrv7W9NFeSV/LenBpP8y6lwth9RS019Ppn4vcczEohrtj38fIjrGEUnj0UsThh+dqcLfNtcFG6hpTjTHhUkVYUfIqtEDBt9FhxF7YMetSmvPdPuvEKPxHpavAxzeon1TWpfnc3a0oJQMLtHlQxIPm/aUU7pZrk= 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.161.70 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-oo1-f70.google.com with SMTP id 006d021491bc7-679dcf1f680so146685127eaf.0 for ; Wed, 04 Mar 2026 07:34:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772638442; x=1773243242; 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=7WZ8cgyqDV6VkAC1mf/bpI56qIIUkA82WzQLE6EkAYg=; b=Ru9st7erbZ20tn8eFG6jY/mNJ0jyrQzYED4V4j7vhWoAmMVsWNz59qZIwo0XmuP1C8 RW+oSe//7ZNRYXNqUO7bJJiKP4VbbSuSq8AZF3Is6svu3ngflSbUgvoIsLiuZFpdWEr3 OWv9uGVHTARdvkmhjMIsVoxcPf5A0P91nPqEw+AzaaxVItnNuYDmkwQ/fX3aG3Vov4rP m9J8iqbEjzvVtDDyaBWgWnmprWB5htdx+m3bzOVJf5tOyCFzZnMeQ1CWajV0jOhL6jBT cba8g1kfntrKcYyiEtImO+OImlKs3pz5uYsyLNYhcMB3xwfWREQ1pyxUJoiizuErBHCY IzlA== X-Gm-Message-State: AOJu0YziZl7X8Yqyf71sSqcKeuir0SjQbfyxX/9WY4TGkJsVUAO+3Zg8 TrnTSJH6o/jRUHjANVn5lgcs9fpM2IuZvNwtGINvnvE9FhEEcdX+MxbhE7zlmsiBhj3hLWu81og dS2yFsegnYFfN/k2esMdRj4Bkryna3C6HvXu4duSvhzTju/nGCbUlaWpX4F4= 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:6820:1693:b0:679:a42a:9fbc with SMTP id 006d021491bc7-67b17706e13mr1225840eaf.32.1772638442174; Wed, 04 Mar 2026 07:34:02 -0800 (PST) Date: Wed, 04 Mar 2026 07:34:02 -0800 In-Reply-To: X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69a850ea.a70a0220.b118c.0020.GAE@google.com> Subject: Re: [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head From: syzbot To: linux-kernel@vger.kernel.org, phil@nwl.cc, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot has tested the proposed patch but the reproducer is still triggering an issue: KASAN: use-after-free Read in nf_hook_entry_head nft_flowtable_event: unregistering device syzkaller0@ffff888032578000 with flowtable @ffff888034ecd000 ================================================================== BUG: KASAN: use-after-free in read_pnet include/net/net_namespace.h:419 [inline] BUG: KASAN: use-after-free in dev_net include/linux/netdevice.h:2741 [inline] BUG: KASAN: use-after-free in nf_hook_entry_head+0x1f1/0x2c0 net/netfilter/core.c:319 Read of size 8 at addr ffff888032578108 by task syz.0.299/7219 CPU: 1 UID: 0 PID: 7219 Comm: syz.0.299 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 read_pnet include/net/net_namespace.h:419 [inline] dev_net include/linux/netdevice.h:2741 [inline] nf_hook_entry_head+0x1f1/0x2c0 net/netfilter/core.c:319 __nf_unregister_net_hook+0x74/0x6f0 net/netfilter/core.c:491 nft_unregister_flowtable_ops net/netfilter/nf_tables_api.c:9059 [inline] __nft_unregister_flowtable_net_hooks net/netfilter/nf_tables_api.c:9074 [inline] __nft_release_hook net/netfilter/nf_tables_api.c:12068 [inline] nft_rcv_nl_event+0x7b8/0xdb0 net/netfilter/nf_tables_api.c:12181 notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85 blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380 netlink_release+0x123b/0x1ad0 net/netlink/af_netlink.c:761 __sock_release net/socket.c:662 [inline] sock_close+0xc3/0x240 net/socket.c:1455 __fput+0x44f/0xa70 fs/file_table.c:469 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:67 [inline] exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb92579c629 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd8c9aa7a8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007ffd8c9aa890 RCX: 00007fb92579c629 RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 RBP: 000000000002c7b9 R08: 0000000000000001 R09: 0000000000000000 R10: 0000001b30f20000 R11: 0000000000000246 R12: 00007ffd8c9aa8d0 R13: 00007fb925a1609c R14: 000000000002c7ee R15: 00007fb925a16090 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888032578000 pfn:0x32578 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea00019f1008 ffff8880b8740a40 0000000000000000 raw: ffff888032578000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 2, migratetype Unmovable, gfp_mask 0x446dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP), pid 7221, tgid 7219 (syz.0.299), ts 182259395299, free_ts 182346434698 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1888 prep_new_page mm/page_alloc.c:1896 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3961 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5249 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2485 ___kmalloc_large_node+0x4e/0x150 mm/slub.c:5118 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:5149 __do_kmalloc_node mm/slub.c:5165 [inline] __kvmalloc_node_noprof+0x7b/0x8a0 mm/slub.c:6668 alloc_netdev_mqs+0xa6/0x11b0 net/core/dev.c:12012 tun_set_iff+0x532/0xf00 drivers/net/tun.c:2778 __tun_chr_ioctl+0x7bb/0x1e10 drivers/net/tun.c:3088 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 7219 tgid 7219 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1432 [inline] __free_frozen_pages+0xc00/0xd90 mm/page_alloc.c:2977 device_release+0x9e/0x1d0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x228/0x560 lib/kobject.c:737 netdev_run_todo+0xc75/0xde0 net/core/dev.c:11713 tun_detach drivers/net/tun.c:640 [inline] tun_chr_close+0x13c/0x1c0 drivers/net/tun.c:3436 __fput+0x44f/0xa70 fs/file_table.c:469 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:67 [inline] exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888032578000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888032578080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888032578100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888032578180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888032578200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Tested on: commit: 4c51f90d selftests/bpf: Add powerpc support for get_pr.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git console output: https://syzkaller.appspot.com/x/log.txt?x=150f1e4a580000 kernel config: https://syzkaller.appspot.com/x/.config?x=6d9e410399043c26 dashboard link: https://syzkaller.appspot.com/bug?extid=bb9127e278fa198e110c compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8 patch: https://syzkaller.appspot.com/x/patch.diff?x=12fef0ba580000