==================================================================
BUG: KASAN: use-after-free in read_pnet include/net/net_namespace.h:414 [inline]
BUG: KASAN: use-after-free in dev_net include/linux/netdevice.h:2738 [inline]
BUG: KASAN: use-after-free in nf_hook_entry_head+0x2fe/0x310 net/netfilter/core.c:319
Read of size 8 at addr ffff88807a648108 by task kworker/u8:30/16309
CPU: 0 UID: 0 PID: 16309 Comm: kworker/u8:30 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: netns cleanup_net
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
read_pnet include/net/net_namespace.h:414 [inline]
dev_net include/linux/netdevice.h:2738 [inline]
nf_hook_entry_head+0x2fe/0x310 net/netfilter/core.c:319
__nf_unregister_net_hook+0x7e/0x660 net/netfilter/core.c:491
nf_unregister_net_hook+0xd5/0x110 net/netfilter/core.c:536
nft_unregister_flowtable_ops net/netfilter/nf_tables_api.c:9038 [inline]
__nft_unregister_flowtable_net_hooks+0xfc/0x3f0 net/netfilter/nf_tables_api.c:9053
__nft_release_hook+0x26e/0x350 net/netfilter/nf_tables_api.c:12035
__nft_release_hooks net/netfilter/nf_tables_api.c:12049 [inline]
nf_tables_pre_exit_net+0xc5/0x120 net/netfilter/nf_tables_api.c:12200
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x187/0xab0 net/core/net_namespace.c:234
cleanup_net+0x41b/0x830 net/core/net_namespace.c:696
process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807a64bc00 pfn:0x7a648
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffffea00016e6e08 ffffea000258d908 0000000000000000
raw: ffff88807a64bc00 0000000000000002 00000000f0000000 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 20006, tgid 20002 (syz.1.4660), ts 873454493925, free_ts 873782894233
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486
___kmalloc_large_node+0x10c/0x150 mm/slub.c:5598
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:5629
__do_kmalloc_node mm/slub.c:5645 [inline]
__kvmalloc_node_noprof.cold+0xf/0x8e mm/slub.c:7136
alloc_netdev_mqs+0xd7/0x1550 net/core/dev.c:11997
tun_set_iff drivers/net/tun.c:2778 [inline]
__tun_chr_ioctl+0x193e/0x4880 drivers/net/tun.c:3088
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 20002 tgid 20002 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943
device_release+0xa4/0x240 drivers/base/core.c:2565
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x1ef/0x6f0 lib/kobject.c:737
netdev_run_todo+0x7da/0x12a0 net/core/dev.c:11698
tun_detach drivers/net/tun.c:640 [inline]
tun_chr_close+0xea/0x230 drivers/net/tun.c:3436
__fput+0x402/0xb70 fs/file_table.c:468
task_work_run+0x150/0x240 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:44 [inline]
exit_to_user_mode_loop+0xfb/0x540 kernel/entry/common.c:75
__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_work include/linux/entry-common.h:159 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
do_syscall_64+0x4ee/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807a648000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88807a648080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88807a648100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88807a648180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88807a648200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
==================================================================
BUG: KASAN: use-after-free in __nf_unregister_net_hook+0x5c7/0x660 net/netfilter/core.c:497
Read of size 8 at addr ffff88807a648488 by task kworker/u8:30/16309
CPU: 1 UID: 0 PID: 16309 Comm: kworker/u8:30 Tainted: G B L syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE, [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: netns cleanup_net
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
__nf_unregister_net_hook+0x5c7/0x660 net/netfilter/core.c:497
nf_unregister_net_hook+0xd5/0x110 net/netfilter/core.c:536
nft_unregister_flowtable_ops net/netfilter/nf_tables_api.c:9038 [inline]
__nft_unregister_flowtable_net_hooks+0xfc/0x3f0 net/netfilter/nf_tables_api.c:9053
__nft_release_hook+0x26e/0x350 net/netfilter/nf_tables_api.c:12035
__nft_release_hooks net/netfilter/nf_tables_api.c:12049 [inline]
nf_tables_pre_exit_net+0xc5/0x120 net/netfilter/nf_tables_api.c:12200
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x187/0xab0 net/core/net_namespace.c:234
cleanup_net+0x41b/0x830 net/core/net_namespace.c:696
process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807a64bc00 pfn:0x7a648
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffffea00016e6e08 ffffea000258d908 0000000000000000
raw: ffff88807a64bc00 0000000000000002 00000000f0000000 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 20006, tgid 20002 (syz.1.4660), ts 873454493925, free_ts 873782894233
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486
___kmalloc_large_node+0x10c/0x150 mm/slub.c:5598
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:5629
__do_kmalloc_node mm/slub.c:5645 [inline]
__kvmalloc_node_noprof.cold+0xf/0x8e mm/slub.c:7136
alloc_netdev_mqs+0xd7/0x1550 net/core/dev.c:11997
tun_set_iff drivers/net/tun.c:2778 [inline]
__tun_chr_ioctl+0x193e/0x4880 drivers/net/tun.c:3088
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 20002 tgid 20002 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943
device_release+0xa4/0x240 drivers/base/core.c:2565
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x1ef/0x6f0 lib/kobject.c:737
netdev_run_todo+0x7da/0x12a0 net/core/dev.c:11698
tun_detach drivers/net/tun.c:640 [inline]
tun_chr_close+0xea/0x230 drivers/net/tun.c:3436
__fput+0x402/0xb70 fs/file_table.c:468
task_work_run+0x150/0x240 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:44 [inline]
exit_to_user_mode_loop+0xfb/0x540 kernel/entry/common.c:75
__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_work include/linux/entry-common.h:159 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
do_syscall_64+0x4ee/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807a648380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88807a648400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88807a648480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88807a648500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88807a648580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
==================================================================
BUG: KASAN: use-after-free in __nf_hook_entries_try_shrink+0x3da/0x400 net/netfilter/core.c:271
Write of size 8 at addr ffff88807a648488 by task kworker/u8:30/16309
CPU: 1 UID: 0 PID: 16309 Comm: kworker/u8:30 Tainted: G B L syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE, [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: netns cleanup_net
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
__nf_hook_entries_try_shrink+0x3da/0x400 net/netfilter/core.c:271
__nf_unregister_net_hook+0x2af/0x660 net/netfilter/core.c:517
nf_unregister_net_hook+0xd5/0x110 net/netfilter/core.c:536
nft_unregister_flowtable_ops net/netfilter/nf_tables_api.c:9038 [inline]
__nft_unregister_flowtable_net_hooks+0xfc/0x3f0 net/netfilter/nf_tables_api.c:9053
__nft_release_hook+0x26e/0x350 net/netfilter/nf_tables_api.c:12035
__nft_release_hooks net/netfilter/nf_tables_api.c:12049 [inline]
nf_tables_pre_exit_net+0xc5/0x120 net/netfilter/nf_tables_api.c:12200
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x187/0xab0 net/core/net_namespace.c:234
cleanup_net+0x41b/0x830 net/core/net_namespace.c:696
process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807a64bc00 pfn:0x7a648
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffffea00016e6e08 ffffea000258d908 0000000000000000
raw: ffff88807a64bc00 0000000000000002 00000000f0000000 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 20006, tgid 20002 (syz.1.4660), ts 873454493925, free_ts 873782894233
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486
___kmalloc_large_node+0x10c/0x150 mm/slub.c:5598
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:5629
__do_kmalloc_node mm/slub.c:5645 [inline]
__kvmalloc_node_noprof.cold+0xf/0x8e mm/slub.c:7136
alloc_netdev_mqs+0xd7/0x1550 net/core/dev.c:11997
tun_set_iff drivers/net/tun.c:2778 [inline]
__tun_chr_ioctl+0x193e/0x4880 drivers/net/tun.c:3088
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 20002 tgid 20002 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943
device_release+0xa4/0x240 drivers/base/core.c:2565
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x1ef/0x6f0 lib/kobject.c:737
netdev_run_todo+0x7da/0x12a0 net/core/dev.c:11698
tun_detach drivers/net/tun.c:640 [inline]
tun_chr_close+0xea/0x230 drivers/net/tun.c:3436
__fput+0x402/0xb70 fs/file_table.c:468
task_work_run+0x150/0x240 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:44 [inline]
exit_to_user_mode_loop+0xfb/0x540 kernel/entry/common.c:75
__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_work include/linux/entry-common.h:159 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
do_syscall_64+0x4ee/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807a648380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88807a648400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88807a648480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88807a648500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88807a648580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================