syzbot


memory leak in ocfs2_new_path_from_path

Status: upstream: reported C repro on 2025/11/07 17:11
Subsystems: ocfs2
[Documentation on labels]
Reported-by: syzbot+cfc7cab3bb6eaa7c4de2@syzkaller.appspotmail.com
Fix commit: ocfs2: fix memory leak in ocfs2_merge_rec_left()
Patched on: [ci-upstream-linux-next-kasan-gce-root ci-upstream-rust-kasan-gce], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 33d, last: 7d22h
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [ocfs2?] memory leak in ocfs2_new_path_from_path 0 (3) 2025/12/04 16:11
[PATCH] jfs: Initialize synclist in metapage allocation 2 (2) 2025/11/08 10:19
Last patch testing requests (3)
Created Duration User Patch Repo Result
2025/12/04 16:11 50m dmantipov@yandex.ru patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 559e608c46553c107dbba19dae0854af7b219400 OK log
2025/11/21 15:39 12m retest repro upstream report log
2025/11/21 15:39 17m retest repro upstream report log

Sample crash report:
BUG: memory leak
unreferenced object 0xffff8881292668a0 (size 96):
  comm "syz.1.52", pid 6365, jiffies 4294945684
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 80 0e 31 82 ff ff ff ff  ..........1.....
    50 e7 58 27 81 88 ff ff c0 54 eb 33 81 88 ff ff  P.X'.....T.3....
  backtrace (crc d3d62878):
    kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
    slab_post_alloc_hook mm/slub.c:4983 [inline]
    slab_alloc_node mm/slub.c:5288 [inline]
    __kmalloc_cache_noprof+0x3a6/0x5b0 mm/slub.c:5766
    kmalloc_noprof include/linux/slab.h:957 [inline]
    kzalloc_noprof include/linux/slab.h:1094 [inline]
    ocfs2_new_path fs/ocfs2/alloc.c:688 [inline]
    ocfs2_new_path_from_path+0x4f/0x90 fs/ocfs2/alloc.c:702
    ocfs2_get_left_path.constprop.0+0x182/0x390 fs/ocfs2/alloc.c:3491
    ocfs2_merge_rec_left+0x426/0xe60 fs/ocfs2/alloc.c:3543
    ocfs2_try_to_merge_extent+0x3cb/0xe90 fs/ocfs2/alloc.c:3794
    ocfs2_split_extent+0xd2e/0x1330 fs/ocfs2/alloc.c:5139
    ocfs2_change_extent_flag+0x2ed/0x720 fs/ocfs2/alloc.c:5230
    ocfs2_mark_extent_written+0x1e3/0x2c0 fs/ocfs2/alloc.c:5276
    ocfs2_dio_end_io_write+0x5bc/0xaa0 fs/ocfs2/aops.c:2350
    ocfs2_dio_end_io+0x8c/0x180 fs/ocfs2/aops.c:2404
    dio_complete+0x12e/0x4b0 fs/direct-io.c:281
    __blockdev_direct_IO+0x1782/0x1b40 fs/direct-io.c:1303
    ocfs2_direct_IO+0xf6/0x100 fs/ocfs2/aops.c:2441
    generic_file_direct_write+0xb4/0x180 mm/filemap.c:4234
    __generic_file_write_iter+0xa1/0x130 mm/filemap.c:4403
    ocfs2_file_write_iter+0x68a/0x15a0 fs/ocfs2/file.c:2469

connection error: failed to recv *flatrpc.ExecutorMessageRawT: EOF

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/02 19:50 upstream 4a26e7032d7d d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-upstream-gce-leak memory leak in ocfs2_new_path_from_path
2025/12/02 19:01 upstream 4a26e7032d7d d6526ea3 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-upstream-gce-leak memory leak in ocfs2_new_path_from_path
2025/11/07 15:35 upstream 4a0c9b339199 4e1406b4 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-upstream-gce-leak memory leak in ocfs2_new_path_from_path
2025/11/07 14:40 upstream 4a0c9b339199 4e1406b4 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-upstream-gce-leak memory leak in ocfs2_new_path_from_path
* Struck through repros no longer work on HEAD.