lbmIODone: I/O error in JFS log ================================================================== BUG: KASAN: slab-use-after-free in lbmLogShutdown fs/jfs/jfs_logmgr.c:1862 [inline] BUG: KASAN: slab-use-after-free in lmLogInit+0x1105/0x19e0 fs/jfs/jfs_logmgr.c:1415 Read of size 8 at addr ffff888011496718 by task syz.0.22/6046 CPU: 0 UID: 0 PID: 6046 Comm: syz.0.22 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 lbmLogShutdown fs/jfs/jfs_logmgr.c:1862 [inline] lmLogInit+0x1105/0x19e0 fs/jfs/jfs_logmgr.c:1415 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline] lmLogOpen+0x4e1/0xfa0 fs/jfs/jfs_logmgr.c:1069 jfs_mount_rw+0xe9/0x670 fs/jfs/jfs_mount.c:257 jfs_reconfigure+0x5f9/0xa00 fs/jfs/super.c:409 reconfigure_super+0x224/0x890 fs/super.c:1076 do_remount fs/namespace.c:3279 [inline] path_mount+0xd1a/0xfe0 fs/namespace.c:4029 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1ff478cde9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1ff5536038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f1ff49a5fa0 RCX: 00007f1ff478cde9 RDX: 0000000000000000 RSI: 0000400000000000 RDI: 0000000000000000 RBP: 00007f1ff480e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000001c0030 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1ff49a5fa0 R15: 00007ffc403c4248 Allocated by task 6046: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __kmalloc_cache_noprof+0x3d5/0x6f0 mm/slub.c:5724 kmalloc_noprof include/linux/slab.h:957 [inline] lbmLogInit fs/jfs/jfs_logmgr.c:1821 [inline] lmLogInit+0x3c0/0x19e0 fs/jfs/jfs_logmgr.c:1269 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline] lmLogOpen+0x4e1/0xfa0 fs/jfs/jfs_logmgr.c:1069 jfs_mount_rw+0xe9/0x670 fs/jfs/jfs_mount.c:257 jfs_reconfigure+0x5f9/0xa00 fs/jfs/super.c:409 reconfigure_super+0x224/0x890 fs/super.c:1076 do_remount fs/namespace.c:3279 [inline] path_mount+0xd1a/0xfe0 fs/namespace.c:4029 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6046: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 __kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2514 [inline] slab_free mm/slub.c:6566 [inline] kfree+0x19a/0x6d0 mm/slub.c:6773 lbmLogShutdown fs/jfs/jfs_logmgr.c:1864 [inline] lmLogInit+0x1133/0x19e0 fs/jfs/jfs_logmgr.c:1415 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline] lmLogOpen+0x4e1/0xfa0 fs/jfs/jfs_logmgr.c:1069 jfs_mount_rw+0xe9/0x670 fs/jfs/jfs_mount.c:257 jfs_reconfigure+0x5f9/0xa00 fs/jfs/super.c:409 reconfigure_super+0x224/0x890 fs/super.c:1076 do_remount fs/namespace.c:3279 [inline] path_mount+0xd1a/0xfe0 fs/namespace.c:4029 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888011496700 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 24 bytes inside of freed 192-byte region [ffff888011496700, ffff8880114967c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11496 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801a0413c0 ffffea0000440800 dead000000000002 raw: 0000000000000000 0000000000100010 00000000f5000000 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 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 10, tgid 10 (kworker/0:1), ts 155311235539, free_ts 154802435262 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884 __alloc_pages_slowpath+0x30b/0xcf0 mm/page_alloc.c:4714 __alloc_frozen_pages_noprof+0x319/0x370 mm/page_alloc.c:5196 alloc_slab_page mm/slub.c:3032 [inline] allocate_slab+0x71/0x3a0 mm/slub.c:3203 new_slab mm/slub.c:3257 [inline] ___slab_alloc+0xe94/0x1920 mm/slub.c:4627 __slab_alloc+0x65/0x100 mm/slub.c:4746 __slab_alloc_node mm/slub.c:4822 [inline] slab_alloc_node mm/slub.c:5233 [inline] __kmalloc_cache_node_noprof+0x4af/0x6f0 mm/slub.c:5732 kmalloc_node_noprof include/linux/slab.h:983 [inline] alloc_worker kernel/workqueue.c:2647 [inline] create_worker+0x112/0x720 kernel/workqueue.c:2790 maybe_create_worker kernel/workqueue.c:3063 [inline] manage_workers kernel/workqueue.c:3140 [inline] worker_thread+0x33e/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x436/0x7d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 5742 tgid 5742 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2906 discard_slab mm/slub.c:3301 [inline] __put_partials+0x146/0x170 mm/slub.c:3848 put_cpu_partial+0x1f2/0x2e0 mm/slub.c:3923 __slab_free+0x2b9/0x390 mm/slub.c:5882 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:352 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4946 [inline] slab_alloc_node mm/slub.c:5245 [inline] __do_kmalloc_node mm/slub.c:5602 [inline] __kmalloc_node_track_caller_noprof+0x519/0x800 mm/slub.c:5712 kmemdup_noprof+0x2b/0x70 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:765 [inline] neigh_sysctl_register+0x9f/0xa80 net/core/neighbour.c:3826 devinet_sysctl_register+0xad/0x200 net/ipv4/devinet.c:2714 inetdev_event+0xef2/0x15b0 net/ipv4/devinet.c:1664 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] netif_change_name+0x5e9/0x960 net/core/dev.c:1489 do_setlink+0x9f6/0x41c0 net/core/rtnetlink.c:3131 rtnl_changelink net/core/rtnetlink.c:3769 [inline] __rtnl_newlink net/core/rtnetlink.c:3928 [inline] rtnl_newlink+0x1619/0x1c80 net/core/rtnetlink.c:4065 Memory state around the buggy address: ffff888011496600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888011496680: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc >ffff888011496700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888011496780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888011496800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================