NILFS (loop2): invalid segment: Checksum error in segment payload NILFS (loop0): recovery complete NILFS (loop2): trying rollback from an earlier position ================================================================== NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds BUG: KASAN: use-after-free in __lock_acquire+0x2c57/0x3f20 kernel/locking/lockdep.c:3369 Read of size 8 at addr ffff8880a0ff2da0 by task in:imklog/7699 CPU: 0 PID: 7699 Comm: in:imklog Not tainted 4.14.305-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: NILFS (loop1): invalid segment: Checksum error in segment payload __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:251 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:350 NILFS (loop1): trying rollback from an earlier position kasan_report mm/kasan/report.c:408 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:429 __lock_acquire+0x2c57/0x3f20 kernel/locking/lockdep.c:3369 NILFS (loop1): recovery complete NILFS (loop1): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 NILFS (loop2): recovery complete __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:160 try_to_wake_up+0x6a/0x1100 kernel/sched/core.c:2000 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1637 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1106 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:796 RIP: 0010:__vfs_read+0xc6/0x620 fs/read_write.c:410 RSP: 0018:ffff8880a27f7d08 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff10 RAX: ffffffff8794d220 RBX: 1ffff110144fefa4 RCX: 1ffffffff0f29a46 RDX: dffffc0000000000 RSI: 00007fa51642cda0 RDI: ffffffff8794d230 RBP: ffff8880a315ad00 R08: ffffffff81a05b40 R09: 0000000000000000 R10: 0000000000000000 R11: ffff8880a2f32080 R12: ffff8880a27f7ea8 R13: 0000000000001fa0 R14: 00007fa51642cda0 R15: ffff8880a315ad28 vfs_read+0x139/0x340 fs/read_write.c:447 SYSC_read fs/read_write.c:574 [inline] SyS_read+0xf2/0x210 fs/read_write.c:567 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7fa518a9022d RSP: 002b:00007fa51642c580 EFLAGS: 00000293 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa518a9022d RDX: 0000000000001fa0 RSI: 00007fa51642cda0 RDI: 0000000000000004 RBP: 00005596779579d0 R08: 0000000000000000 R09: 0000000000000000 R10: 2ce33e6c02ce33e7 R11: 0000000000000293 R12: 00007fa51642cda0 R13: 0000000000001fa0 R14: 0000000000001f9f R15: 00007fa51642ce71 Allocated by task 2: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 kmem_cache_alloc_node+0x146/0x410 mm/slab.c:3642 alloc_task_struct_node kernel/fork.c:156 [inline] dup_task_struct kernel/fork.c:515 [inline] copy_process.part.0+0x17d3/0x71c0 kernel/fork.c:1631 copy_process kernel/fork.c:1606 [inline] _do_fork+0x184/0xc80 kernel/fork.c:2092 kernel_thread+0x2f/0x40 kernel/fork.c:2154 create_kthread kernel/kthread.c:255 [inline] kthreadd+0x51a/0x770 kernel/kthread.c:592 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 Freed by task 11592: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758 __put_task_struct+0x276/0x470 kernel/fork.c:420 put_task_struct include/linux/sched/task.h:99 [inline] delayed_put_task_struct+0x1fb/0x2e0 kernel/exit.c:227 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x780/0x1180 kernel/rcu/tree.c:2946 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 The buggy address belongs to the object at ffff8880a0ff25c0 which belongs to the cache task_struct of size 6144 The buggy address is located 2016 bytes inside of 6144-byte region [ffff8880a0ff25c0, ffff8880a0ff3dc0) The buggy address belongs to the page: page:ffffea000283fc80 count:1 mapcount:0 mapping:ffff8880a0ff25c0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880a0ff25c0 0000000000000000 0000000100000001 raw: ffffea0002764aa0 ffffea000283d020 ffff88823f8307c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a0ff2c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0ff2d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a0ff2d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a0ff2e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0ff2e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================