KASAN: use-after-free Read in tracing_open_file_tr

Status: upstream: reported C repro on 2026/10/19 01:40
Reported-by: syzbot+8a05c117c28b76af92a3@syzkaller.appspotmail.com
First crash: 20d, last: 5d10h
▶ ▼ Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in tracing_open_file_tr 19 syz, C 2 22d 22d 0/3 upstream: reported C repro on 2026/10/17 06:12
android-6-1 KASAN: use-after-free Read in tracing_open_file_tr 19 syz, C 1 15d 48d 0/2 upstream: reported C repro on 2026/09/21 10:22

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in tracing_open_file_tr+0x63/0x2f0 kernel/trace/trace.c:4892
Read of size 8 at addr ffff88805feace28 by task syz.2.159/4657

CPU: 1 PID: 4657 Comm: syz.2.159 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 tracing_open_file_tr+0x63/0x2f0 kernel/trace/trace.c:4892
 do_dentry_open+0x7dd/0x10b0 fs/open.c:882
 do_open fs/namei.c:3677 [inline]
 path_openat+0x2674/0x2f10 fs/namei.c:3834
 do_filp_open+0x1ee/0x420 fs/namei.c:3861
 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320
 do_sys_open fs/open.c:1336 [inline]
 __do_sys_openat fs/open.c:1352 [inline]
 __se_sys_openat fs/open.c:1347 [inline]
 __x64_sys_openat+0x135/0x160 fs/open.c:1347
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f3e2539e559
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:00007ffd6b4b97c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f3e25625fa0 RCX: 00007f3e2539e559
RDX: 0000000000000001 RSI: 00002000000002c0 RDI: ffffffffffffff9c
RBP: 00007f3e25435ab8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f3e25625fac R14: 00007f3e25625fa0 R15: 00007f3e25625fa0
 </TASK>

Allocated by task 4657:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 __kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:329
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x490 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 slab_alloc mm/slub.c:3367 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3374 [inline]
 kmem_cache_alloc+0x18b/0x2f0 mm/slub.c:3383
 trace_create_new_event+0x84/0x500 kernel/trace/trace_events.c:3043
 __trace_add_new_event kernel/trace/trace_events.c:3073 [inline]
 __add_event_to_tracers kernel/trace/trace_events.c:3799 [inline]
 trace_add_event_call+0xed/0x1c0 kernel/trace/trace_events.c:3114
 trace_probe_register_event_call+0x393/0x460 kernel/trace/trace_probe.c:1183
 __trace_eprobe_create+0x14af/0x1680 kernel/trace/trace_eprobe.c:1063
 trace_probe_create+0xc4/0x130 kernel/trace/trace_probe.c:1290
 create_dyn_event+0xa9/0x140 kernel/trace/trace_dynevent.c:152
 trace_parse_run_command+0x1a8/0x2c0 kernel/trace/trace.c:10266
 vfs_write+0x2dc/0x9a0 fs/read_write.c:582
 ksys_write+0x14d/0x260 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 4656:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1729 [inline]
 slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1755
 slab_free mm/slub.c:3687 [inline]
 kmem_cache_free+0xf7/0x2a0 mm/slub.c:3709
 tracing_release_file_tr+0xbd/0x100 kernel/trace/trace.c:4920
 __fput+0x20a/0x8b0 fs/file_table.c:320
 task_work_run+0x1d0/0x260 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:180
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213
 __syscall_exit_to_user_mode_work kernel/entry/common.c:295 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:306
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff88805feace00
 which belongs to the cache trace_event_file of size 96
The buggy address is located 40 bytes inside of
 96-byte region [ffff88805feace00, ffff88805feace60)

The buggy address belongs to the physical page:
page:ffffea00017fab00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5feac
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 0000000000000000 dead000000000122 ffff8880184c53c0
raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4575, tgid 4575 (syz.2.101), ts 102223904804, free_ts 102119707128
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560
 prep_new_page mm/page_alloc.c:2567 [inline]
 get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658
 alloc_slab_page+0x5d/0x180 mm/slub.c:1799
 allocate_slab mm/slub.c:1944 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:1997
 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3154
 __slab_alloc mm/slub.c:3240 [inline]
 slab_alloc_node mm/slub.c:3325 [inline]
 slab_alloc mm/slub.c:3367 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3374 [inline]
 kmem_cache_alloc+0x111/0x2f0 mm/slub.c:3383
 trace_create_new_event+0x84/0x500 kernel/trace/trace_events.c:3043
 __trace_add_new_event kernel/trace/trace_events.c:3073 [inline]
 __add_event_to_tracers kernel/trace/trace_events.c:3799 [inline]
 trace_add_event_call+0xed/0x1c0 kernel/trace/trace_events.c:3114
 trace_probe_register_event_call+0x393/0x460 kernel/trace/trace_probe.c:1183
 __trace_eprobe_create+0x14af/0x1680 kernel/trace/trace_eprobe.c:1063
 trace_probe_create+0xc4/0x130 kernel/trace/trace_probe.c:1290
 create_dyn_event+0xa9/0x140 kernel/trace/trace_dynevent.c:152
 trace_parse_run_command+0x1a8/0x2c0 kernel/trace/trace.c:10266
 vfs_write+0x2dc/0x9a0 fs/read_write.c:582
 ksys_write+0x14d/0x260 fs/read_write.c:637
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1487 [inline]
 free_pcp_prepare mm/page_alloc.c:1537 [inline]
 free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509
 free_slab mm/slub.c:2036 [inline]
 discard_slab mm/slub.c:2042 [inline]
 __unfreeze_partials+0x188/0x1e0 mm/slub.c:2591
 put_cpu_partial+0x17c/0x250 mm/slub.c:2667
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:306
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x490 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 __kmem_cache_alloc_node+0x19d/0x270 mm/slub.c:3398
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc_node+0xa2/0x240 mm/slab_common.c:943
 kmalloc_node include/linux/slab.h:589 [inline]
 kvmalloc_node+0x6c/0x180 mm/util.c:581
 kvmalloc include/linux/slab.h:716 [inline]
 kvzalloc include/linux/slab.h:724 [inline]
 allocate_hook_entries_size net/netfilter/core.c:61 [inline]
 nf_hook_entries_grow+0x31a/0x760 net/netfilter/core.c:128
 __nf_register_net_hook+0x2c9/0x910 net/netfilter/core.c:423
 nf_register_net_hook+0xae/0x190 net/netfilter/core.c:566
 nf_register_net_hooks+0x40/0x1a0 net/netfilter/core.c:582
 ebt_register_table+0xcdc/0x1050 net/bridge/netfilter/ebtables.c:1276

Memory state around the buggy address:
 ffff88805feacd00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
 ffff88805feacd80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
>ffff88805feace00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
                                  ^
 ffff88805feace80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88805feacf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/19 05:52 linux-6.1.y 79807e970724 432c0077 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in tracing_open_file_tr
2026/10/19 04:38 linux-6.1.y 79807e970724 432c0077 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in tracing_open_file_tr
2026/10/19 03:38 linux-6.1.y 79807e970724 432c0077 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in tracing_open_file_tr
2026/10/19 02:41 linux-6.1.y 79807e970724 432c0077 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in tracing_open_file_tr
2026/11/03 08:50 linux-6.1.y 08889840163e 6969b601 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in tracing_open_file_tr
2026/10/19 01:40 linux-6.1.y 79807e970724 432c0077 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in tracing_open_file_tr
* Struck through repros no longer work on HEAD.