syzbot


KASAN: use-after-free Write in txEnd

Status: upstream: reported C repro on 2024/02/14 01:53
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+56e00af64faba56750bf@syzkaller.appspotmail.com
First crash: 215d, last: 1d16h
Bug presence (1)
Date Name Commit Repro Result
2024/04/19 upstream (ToT) 2d412262ccfd C [report] KASAN: slab-use-after-free Write in txEnd
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Write in txEnd origin:upstream C 100 2d11h 189d 0/3 upstream: reported C repro on 2024/03/11 13:53
upstream general protection fault in txEnd jfs C error 512 12h32m 632d 0/28 upstream: reported C repro on 2022/12/23 23:37
linux-4.14 general protection fault in txEnd jfs fat C 1 562d 629d 0/1 upstream: reported C repro on 2022/12/27 07:15
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/03/24 11:40 1h32m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
 ... Log Wrap ... Log Wrap ... Log Wrap ...
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_write include/linux/instrumented.h:86 [inline]
BUG: KASAN: use-after-free in clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline]
BUG: KASAN: use-after-free in txEnd+0x350/0x560 fs/jfs/jfs_txnmgr.c:554
Write of size 8 at addr ffff8880243a2840 by task jfsCommit/276

CPU: 0 PID: 276 Comm: jfsCommit Not tainted 5.15.164-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 print_address_description+0x63/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189
 instrument_atomic_write include/linux/instrumented.h:86 [inline]
 clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline]
 txEnd+0x350/0x560 fs/jfs/jfs_txnmgr.c:554
 txLazyCommit fs/jfs/jfs_txnmgr.c:2718 [inline]
 jfs_lazycommit+0x60d/0xc30 fs/jfs/jfs_txnmgr.c:2766
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Allocated by task 3711:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513
 kasan_kmalloc include/linux/kasan.h:264 [inline]
 kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247
 kmalloc include/linux/slab.h:591 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 open_inline_log fs/jfs/jfs_logmgr.c:1167 [inline]
 lmLogOpen+0x314/0x1030 fs/jfs/jfs_logmgr.c:1077
 jfs_mount_rw+0xe3/0x640 fs/jfs/jfs_mount.c:253
 jfs_fill_super+0x69f/0xc70 fs/jfs/super.c:570
 mount_bdev+0x2c9/0x3f0 fs/super.c:1387
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:611
 vfs_get_tree+0x88/0x270 fs/super.c:1517
 do_new_mount+0x2ba/0xb40 fs/namespace.c:3005
 do_mount fs/namespace.c:3348 [inline]
 __do_sys_mount fs/namespace.c:3556 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3533
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Freed by task 3568:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4b/0x80 mm/kasan/common.c:46
 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366
 kasan_slab_free include/linux/kasan.h:230 [inline]
 slab_free_hook mm/slub.c:1705 [inline]
 slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731
 slab_free mm/slub.c:3499 [inline]
 kfree+0xf1/0x270 mm/slub.c:4559
 lmLogClose+0x29d/0x530
 jfs_umount+0x298/0x370 fs/jfs/jfs_umount.c:116
 jfs_put_super+0x86/0x180 fs/jfs/super.c:194
 generic_shutdown_super+0x136/0x2c0 fs/super.c:475
 kill_block_super+0x7a/0xe0 fs/super.c:1414
 deactivate_locked_super+0xa0/0x110 fs/super.c:335
 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143
 task_work_run+0x129/0x1a0 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Last potentially related work creation:
 kasan_save_stack+0x36/0x60 mm/kasan/common.c:38
 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348
 __call_rcu kernel/rcu/tree.c:3007 [inline]
 call_rcu+0x1c4/0xa70 kernel/rcu/tree.c:3087
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

The buggy address belongs to the object at ffff8880243a2800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 64 bytes inside of
 1024-byte region [ffff8880243a2800, ffff8880243a2c00)
The buggy address belongs to the page:
page:ffffea000090e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x243a0
head:ffffea000090e800 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888011c41dc0
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 9628293481, free_ts 0
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159
 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423
 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2031
 alloc_slab_page mm/slub.c:1775 [inline]
 allocate_slab mm/slub.c:1912 [inline]
 new_slab+0xbb/0x4b0 mm/slub.c:1975
 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
 __slab_alloc mm/slub.c:3095 [inline]
 slab_alloc_node mm/slub.c:3186 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 __kmalloc+0x1c9/0x300 mm/slub.c:4403
 kmalloc include/linux/slab.h:596 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 __register_sysctl_table+0xdc/0x1220 fs/proc/proc_sysctl.c:1319
 neigh_sysctl_register+0x455/0x530 net/core/neighbour.c:3713
 addrconf_sysctl_register+0xac/0x180 net/ipv6/addrconf.c:7133
 ipv6_add_dev+0xc96/0x1180 net/ipv6/addrconf.c:454
 addrconf_notify+0x671/0xf30 net/ipv6/addrconf.c:3578
 call_netdevice_notifier net/core/dev.c:1718 [inline]
 call_netdevice_register_notifiers net/core/dev.c:1726 [inline]
 call_netdevice_register_net_notifiers+0x185/0x5a0 net/core/dev.c:1756
 register_netdevice_notifier+0x10b/0x480 net/core/dev.c:1807
 addrconf_init+0xf3/0x330 net/ipv6/addrconf.c:7305
 inet6_init+0x377/0x670 net/ipv6/af_inet6.c:1179
 do_one_initcall+0x22b/0x7a0 init/main.c:1302
page_owner free stack trace missing

Memory state around the buggy address:
 ffff8880243a2700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880243a2780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880243a2800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                           ^
 ffff8880243a2880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880243a2900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (101):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/28 04:16 linux-5.15.y 7e89efd3ae1c 46eb10b7 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/04/19 13:24 linux-5.15.y c52b9710c83d af24b050 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/04/11 21:29 linux-5.15.y cdfd0a7f0139 95ed9ece .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Write in txEnd
2024/02/14 01:52 linux-5.15.y 6139f2a02fe0 e66542d7 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/14 23:27 linux-5.15.y 3a5928702e71 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/13 03:31 linux-5.15.y 3a5928702e71 73e8a465 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/12 12:21 linux-5.15.y 3a5928702e71 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/11 21:14 linux-5.15.y 14e468424d3e d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/11 06:13 linux-5.15.y 14e468424d3e 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/10 05:54 linux-5.15.y 14e468424d3e 784df80e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/10 02:35 linux-5.15.y 14e468424d3e 784df80e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/09 15:41 linux-5.15.y 14e468424d3e 073f8be2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/04 21:41 linux-5.15.y 14e468424d3e dfbe2ed4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/01 19:36 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/29 16:09 linux-5.15.y fa93fa65db6e 9bd464fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/28 16:41 linux-5.15.y fa93fa65db6e ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/26 16:34 linux-5.15.y fa93fa65db6e 9aee4e0b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/23 01:53 linux-5.15.y fa93fa65db6e ce8a9099 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/19 09:03 linux-5.15.y fa93fa65db6e dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/14 11:55 linux-5.15.y 7e89efd3ae1c 07a4d4ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/14 05:30 linux-5.15.y 7e89efd3ae1c bde81f6f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/08 18:32 linux-5.15.y 7e89efd3ae1c 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/03 20:34 linux-5.15.y 7e89efd3ae1c 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/08/01 02:37 linux-5.15.y 7e89efd3ae1c 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/30 18:30 linux-5.15.y 7e89efd3ae1c 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/27 06:49 linux-5.15.y 7c6d66f0266f 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/24 04:34 linux-5.15.y 7c6d66f0266f 57b2edb1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/23 05:32 linux-5.15.y 7c6d66f0266f 708c10c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/18 01:40 linux-5.15.y f45bea23c39c 0f902625 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/17 20:11 linux-5.15.y f45bea23c39c 0f902625 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/17 02:50 linux-5.15.y f45bea23c39c 215bec2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/14 02:02 linux-5.15.y f45bea23c39c eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/11 09:42 linux-5.15.y f45bea23c39c c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/08 02:05 linux-5.15.y f45bea23c39c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/05 07:17 linux-5.15.y 4878aadf2d15 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/04 10:52 linux-5.15.y 4878aadf2d15 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/07/01 18:03 linux-5.15.y 4878aadf2d15 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/06/25 21:51 linux-5.15.y 4878aadf2d15 dec8bc94 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/06/24 20:01 linux-5.15.y 4878aadf2d15 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Write in txEnd
2024/09/12 19:00 linux-5.15.y 3a5928702e71 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Write in txEnd
2024/09/03 10:41 linux-5.15.y fa93fa65db6e 326f9c5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Write in txEnd
2024/08/24 18:03 linux-5.15.y fa93fa65db6e d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Write in txEnd
2024/08/24 04:57 linux-5.15.y fa93fa65db6e d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Write in txEnd
2024/08/23 23:03 linux-5.15.y fa93fa65db6e d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Write in txEnd
2024/08/15 09:42 linux-5.15.y 7e89efd3ae1c e4bacdaf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Write in txEnd
2024/07/23 03:03 linux-5.15.y 7c6d66f0266f 708c10c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Write in txEnd
2024/06/24 08:31 linux-5.15.y 4878aadf2d15 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Write in txEnd
2024/09/04 08:26 linux-5.15.y fa93fa65db6e 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in txEnd
* Struck through repros no longer work on HEAD.