public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head
@ 2026-02-19 10:03 syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2026-02-19 10:03 UTC (permalink / raw)
  To: coreteam, davem, edumazet, fw, horms, kuba, linux-kernel, netdev,
	netfilter-devel, pabeni, pablo, phil, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    4c51f90d45dc selftests/bpf: Add powerpc support for get_pr..
git tree:       bpf-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1736f652580000
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
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=11213b3a580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/173ab67d0a10/disk-4c51f90d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9c8787b7cc0e/vmlinux-4c51f90d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/bf9799a7764a/bzImage-4c51f90d.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com

==================================================================
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 ffff88807c16c108 by task syz.3.29/6113

CPU: 0 UID: 0 PID: 6113 Comm: syz.3.29 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 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:12063 [inline]
 nft_rcv_nl_event+0x7b8/0xdb0 net/netfilter/nf_tables_api.c:12176
 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:0x7f9f86f9c629
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:00007ffc01263e28 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f9f87217da0 RCX: 00007f9f86f9c629
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f9f87217da0 R08: 00007f9f87216038 R09: 0000000000000000
R10: 000000000003fd84 R11: 0000000000000246 R12: 000000000001a119
R13: 00007f9f8721636c R14: 0000000000019ef5 R15: 00007ffc01263f30
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807c16e700 pfn:0x7c16c
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea000176ec08 ffff8880b8640a40 0000000000000000
raw: ffff88807c16e700 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 6130, tgid 6113 (syz.3.29), ts 106243960748, free_ts 106536545080
 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 6113 tgid 6113 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:
 ffff88807c16c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88807c16c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88807c16c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff88807c16c180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88807c16c200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

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.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head
       [not found] <5162c1cf-4f5e-4852-a60c-1ed0fa2e6e3d@igalia.com>
@ 2026-03-02 15:42 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2026-03-02 15:42 UTC (permalink / raw)
  To: koike, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com
Tested-by: syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com

Tested on:

commit:         eb71ab2b Merge tag 'bpf-fixes' of git://git.kernel.org..
git tree:       bpf
console output: https://syzkaller.appspot.com/x/log.txt?x=1071ad5a580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=93740e6c6567fcec
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=12a330ba580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head
       [not found] <aag10N-nUBMVDdAm@strlen.de>
@ 2026-03-04 14:17 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2026-03-04 14:17 UTC (permalink / raw)
  To: fw, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com
Tested-by: syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com

Tested on:

commit:         fbdfa8da selftests: tc-testing: fix list_categories() ..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
console output: https://syzkaller.appspot.com/x/log.txt?x=153127e6580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=93740e6c6567fcec
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=17c71e4a580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head
       [not found] <aahHfuzSx1EiUYwh@orbyte.nwl.cc>
@ 2026-03-04 14:53 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2026-03-04 14:53 UTC (permalink / raw)
  To: phil; +Cc: phil, linux-kernel, syzkaller-bugs

> #syz test 4c51f90d45dc

I've failed to parse your command.
Did you perhaps forget to provide the branch name, or added an extra ':'?
Please use one of the two supported formats:
1. #syz test
2. #syz test: repo branch-or-commit-hash
Note the lack of ':' in option 1.

>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head
       [not found] <aahJ1IwXLdc2-BYT@orbyte.nwl.cc>
@ 2026-03-04 15:05 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2026-03-04 15:05 UTC (permalink / raw)
  To: linux-kernel, phil, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to apply patch:
checking file net/netfilter/nf_tables_api.c
Hunk #1 succeeded at 9834 (offset 225 lines).
Hunk #2 FAILED at 9617.
1 out of 2 hunks FAILED



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
kernel config:  https://syzkaller.appspot.com/x/.config?x=93740e6c6567fcec
dashboard link: https://syzkaller.appspot.com/bug?extid=bb9127e278fa198e110c
compiler:       
patch:          https://syzkaller.appspot.com/x/patch.diff?x=179298d6580000


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head
       [not found] <aahLgP1Yf1wH0d3U@orbyte.nwl.cc>
@ 2026-03-04 15:34 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2026-03-04 15:34 UTC (permalink / raw)
  To: linux-kernel, phil, syzkaller-bugs

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:
 <TASK>
 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
 </TASK>

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head
       [not found] <aahsfpxh9fXPDM9w@orbyte.nwl.cc>
@ 2026-03-04 22:04 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2026-03-04 22:04 UTC (permalink / raw)
  To: linux-kernel, phil, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com
Tested-by: syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com

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=156c7b5a580000
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=11f49b5a580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head
       [not found] <aaldbOUpumbS940Z@orbyte.nwl.cc>
@ 2026-03-05 11:09 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2026-03-05 11:09 UTC (permalink / raw)
  To: linux-kernel, phil, syzkaller-bugs

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@ffff88805fae4000 in ops @ffff888035bb2180 of hook @ffff888035bb2200 with flowtable @ffff88807ca60800
==================================================================
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 ffff88805fae4108 by task syz.0.20/6546

CPU: 0 UID: 0 PID: 6546 Comm: syz.0.20 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 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:9061 [inline]
 __nft_unregister_flowtable_net_hooks net/netfilter/nf_tables_api.c:9076 [inline]
 __nft_release_hook net/netfilter/nf_tables_api.c:12071 [inline]
 nft_rcv_nl_event+0x7b8/0xdb0 net/netfilter/nf_tables_api.c:12184
 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:0x7f1a96f9c629
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:00007fff6d5e3748 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f1a97217da0 RCX: 00007f1a96f9c629
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f1a97217da0 R08: 00007f1a97216128 R09: 0000000000000000
R10: 000000000003fdb8 R11: 0000000000000246 R12: 000000000002256b
R13: 00007f1a9721609c R14: 0000000000022267 R15: 00007fff6d5e3850
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88805fae5d40 pfn:0x5fae4
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffffea00017ecd08 ffff88813fffbdd0 0000000000000000
raw: ffff88805fae5d40 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 6548, tgid 6546 (syz.0.20), ts 139889058982, free_ts 140000844378
 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 6546 tgid 6546 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:
 ffff88805fae4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88805fae4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88805fae4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff88805fae4180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88805fae4200: 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=111bbe4a580000
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=121b2b5a580000


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-03-05 11:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <aag10N-nUBMVDdAm@strlen.de>
2026-03-04 14:17 ` [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head syzbot
     [not found] <aaldbOUpumbS940Z@orbyte.nwl.cc>
2026-03-05 11:09 ` syzbot
     [not found] <aahsfpxh9fXPDM9w@orbyte.nwl.cc>
2026-03-04 22:04 ` syzbot
     [not found] <aahLgP1Yf1wH0d3U@orbyte.nwl.cc>
2026-03-04 15:34 ` syzbot
     [not found] <aahJ1IwXLdc2-BYT@orbyte.nwl.cc>
2026-03-04 15:05 ` syzbot
     [not found] <aahHfuzSx1EiUYwh@orbyte.nwl.cc>
2026-03-04 14:53 ` syzbot
     [not found] <5162c1cf-4f5e-4852-a60c-1ed0fa2e6e3d@igalia.com>
2026-03-02 15:42 ` syzbot
2026-02-19 10:03 syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox