[syzbot] memory leak in xas_nomem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

syzbot found the following issue on:

HEAD commit:    1e57930e9f40 Merge tag 'rcu.2022.05.19a' of git://git.kern..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17afc423f00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=5757003cb23a31a7
dashboard link: https://syzkaller.appspot.com/bug?extid=9e27a75a8c24f3fe75c1
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=16bc056ef00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=116b7d9df00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+9e27a75a8c24f3fe75c1@xxxxxxxxxxxxxxxxxxxxxxxxx

BUG: memory leak
unreferenced object 0xffff88810cb35d80 (size 576):
  comm "syz-executor883", pid 3623, jiffies 4294954631 (age 23.510s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    18 48 36 04 81 88 ff ff 98 5d b3 0c 81 88 ff ff  .H6......]......
  backtrace:
    [<ffffffff8247dfba>] xas_nomem lib/xarray.c:307 [inline]
    [<ffffffff8247dfba>] xas_nomem+0x4a/0xd0 lib/xarray.c:299
    [<ffffffff8157b8d0>] split_huge_page_to_list+0x26d0/0x29f0 mm/huge_memory.c:2626
    [<ffffffff8148a224>] split_huge_page include/linux/huge_mm.h:191 [inline]
    [<ffffffff8148a224>] truncate_inode_partial_folio+0x3e4/0x5f0 mm/truncate.c:243
    [<ffffffff814a78a0>] shmem_undo_range+0x3d0/0xbe0 mm/shmem.c:966
    [<ffffffff814a8e51>] shmem_truncate_range mm/shmem.c:1044 [inline]
    [<ffffffff814a8e51>] shmem_fallocate+0x1e1/0x910 mm/shmem.c:2671
    [<ffffffff815b5c6c>] vfs_fallocate+0x31c/0x670 fs/open.c:308
    [<ffffffff815237e3>] madvise_remove mm/madvise.c:965 [inline]
    [<ffffffff815237e3>] madvise_vma_behavior+0x7d3/0x1000 mm/madvise.c:989
    [<ffffffff8151f2fc>] madvise_walk_vmas+0x11c/0x1d0 mm/madvise.c:1221
    [<ffffffff8152437b>] do_madvise mm/madvise.c:1399 [inline]
    [<ffffffff8152437b>] do_madvise+0x23b/0x320 mm/madvise.c:1357
    [<ffffffff8152478a>] __do_sys_madvise mm/madvise.c:1412 [inline]
    [<ffffffff8152478a>] __se_sys_madvise mm/madvise.c:1410 [inline]
    [<ffffffff8152478a>] __x64_sys_madvise+0x2a/0x30 mm/madvise.c:1410
    [<ffffffff84565f15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84565f15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810cb39d80 (size 576):
  comm "syz-executor883", pid 3622, jiffies 4294954659 (age 23.230s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    98 f8 cd 0d 81 88 ff ff 98 9d b3 0c 81 88 ff ff  ................
  backtrace:
    [<ffffffff8247dfba>] xas_nomem lib/xarray.c:307 [inline]
    [<ffffffff8247dfba>] xas_nomem+0x4a/0xd0 lib/xarray.c:299
    [<ffffffff8157b8d0>] split_huge_page_to_list+0x26d0/0x29f0 mm/huge_memory.c:2626
    [<ffffffff8148a224>] split_huge_page include/linux/huge_mm.h:191 [inline]
    [<ffffffff8148a224>] truncate_inode_partial_folio+0x3e4/0x5f0 mm/truncate.c:243
    [<ffffffff814a78a0>] shmem_undo_range+0x3d0/0xbe0 mm/shmem.c:966
    [<ffffffff814a8e51>] shmem_truncate_range mm/shmem.c:1044 [inline]
    [<ffffffff814a8e51>] shmem_fallocate+0x1e1/0x910 mm/shmem.c:2671
    [<ffffffff815b5c6c>] vfs_fallocate+0x31c/0x670 fs/open.c:308
    [<ffffffff815237e3>] madvise_remove mm/madvise.c:965 [inline]
    [<ffffffff815237e3>] madvise_vma_behavior+0x7d3/0x1000 mm/madvise.c:989
    [<ffffffff8151f2fc>] madvise_walk_vmas+0x11c/0x1d0 mm/madvise.c:1221
    [<ffffffff8152437b>] do_madvise mm/madvise.c:1399 [inline]
    [<ffffffff8152437b>] do_madvise+0x23b/0x320 mm/madvise.c:1357
    [<ffffffff8152478a>] __do_sys_madvise mm/madvise.c:1412 [inline]
    [<ffffffff8152478a>] __se_sys_madvise mm/madvise.c:1410 [inline]
    [<ffffffff8152478a>] __x64_sys_madvise+0x2a/0x30 mm/madvise.c:1410
    [<ffffffff84565f15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84565f15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810cb35d80 (size 576):
  comm "syz-executor883", pid 3623, jiffies 4294954631 (age 29.410s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    18 48 36 04 81 88 ff ff 98 5d b3 0c 81 88 ff ff  .H6......]......
  backtrace:
    [<ffffffff8247dfba>] xas_nomem lib/xarray.c:307 [inline]
    [<ffffffff8247dfba>] xas_nomem+0x4a/0xd0 lib/xarray.c:299
    [<ffffffff8157b8d0>] split_huge_page_to_list+0x26d0/0x29f0 mm/huge_memory.c:2626
    [<ffffffff8148a224>] split_huge_page include/linux/huge_mm.h:191 [inline]
    [<ffffffff8148a224>] truncate_inode_partial_folio+0x3e4/0x5f0 mm/truncate.c:243
    [<ffffffff814a78a0>] shmem_undo_range+0x3d0/0xbe0 mm/shmem.c:966
    [<ffffffff814a8e51>] shmem_truncate_range mm/shmem.c:1044 [inline]
    [<ffffffff814a8e51>] shmem_fallocate+0x1e1/0x910 mm/shmem.c:2671
    [<ffffffff815b5c6c>] vfs_fallocate+0x31c/0x670 fs/open.c:308
    [<ffffffff815237e3>] madvise_remove mm/madvise.c:965 [inline]
    [<ffffffff815237e3>] madvise_vma_behavior+0x7d3/0x1000 mm/madvise.c:989
    [<ffffffff8151f2fc>] madvise_walk_vmas+0x11c/0x1d0 mm/madvise.c:1221
    [<ffffffff8152437b>] do_madvise mm/madvise.c:1399 [inline]
    [<ffffffff8152437b>] do_madvise+0x23b/0x320 mm/madvise.c:1357
    [<ffffffff8152478a>] __do_sys_madvise mm/madvise.c:1412 [inline]
    [<ffffffff8152478a>] __se_sys_madvise mm/madvise.c:1410 [inline]
    [<ffffffff8152478a>] __x64_sys_madvise+0x2a/0x30 mm/madvise.c:1410
    [<ffffffff84565f15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84565f15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810cb39d80 (size 576):
  comm "syz-executor883", pid 3622, jiffies 4294954659 (age 29.130s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    98 f8 cd 0d 81 88 ff ff 98 9d b3 0c 81 88 ff ff  ................
  backtrace:
    [<ffffffff8247dfba>] xas_nomem lib/xarray.c:307 [inline]
    [<ffffffff8247dfba>] xas_nomem+0x4a/0xd0 lib/xarray.c:299
    [<ffffffff8157b8d0>] split_huge_page_to_list+0x26d0/0x29f0 mm/huge_memory.c:2626
    [<ffffffff8148a224>] split_huge_page include/linux/huge_mm.h:191 [inline]
    [<ffffffff8148a224>] truncate_inode_partial_folio+0x3e4/0x5f0 mm/truncate.c:243
    [<ffffffff814a78a0>] shmem_undo_range+0x3d0/0xbe0 mm/shmem.c:966
    [<ffffffff814a8e51>] shmem_truncate_range mm/shmem.c:1044 [inline]
    [<ffffffff814a8e51>] shmem_fallocate+0x1e1/0x910 mm/shmem.c:2671
    [<ffffffff815b5c6c>] vfs_fallocate+0x31c/0x670 fs/open.c:308
    [<ffffffff815237e3>] madvise_remove mm/madvise.c:965 [inline]
    [<ffffffff815237e3>] madvise_vma_behavior+0x7d3/0x1000 mm/madvise.c:989
    [<ffffffff8151f2fc>] madvise_walk_vmas+0x11c/0x1d0 mm/madvise.c:1221
    [<ffffffff8152437b>] do_madvise mm/madvise.c:1399 [inline]
    [<ffffffff8152437b>] do_madvise+0x23b/0x320 mm/madvise.c:1357
    [<ffffffff8152478a>] __do_sys_madvise mm/madvise.c:1412 [inline]
    [<ffffffff8152478a>] __se_sys_madvise mm/madvise.c:1410 [inline]
    [<ffffffff8152478a>] __x64_sys_madvise+0x2a/0x30 mm/madvise.c:1410
    [<ffffffff84565f15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84565f15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810cb35d80 (size 576):
  comm "syz-executor883", pid 3623, jiffies 4294954631 (age 29.450s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    18 48 36 04 81 88 ff ff 98 5d b3 0c 81 88 ff ff  .H6......]......
  backtrace:
    [<ffffffff8247dfba>] xas_nomem lib/xarray.c:307 [inline]
    [<ffffffff8247dfba>] xas_nomem+0x4a/0xd0 lib/xarray.c:299
    [<ffffffff8157b8d0>] split_huge_page_to_list+0x26d0/0x29f0 mm/huge_memory.c:2626
    [<ffffffff8148a224>] split_huge_page include/linux/huge_mm.h:191 [inline]
    [<ffffffff8148a224>] truncate_inode_partial_folio+0x3e4/0x5f0 mm/truncate.c:243
    [<ffffffff814a78a0>] shmem_undo_range+0x3d0/0xbe0 mm/shmem.c:966
    [<ffffffff814a8e51>] shmem_truncate_range mm/shmem.c:1044 [inline]
    [<ffffffff814a8e51>] shmem_fallocate+0x1e1/0x910 mm/shmem.c:2671
    [<ffffffff815b5c6c>] vfs_fallocate+0x31c/0x670 fs/open.c:308
    [<ffffffff815237e3>] madvise_remove mm/madvise.c:965 [inline]
    [<ffffffff815237e3>] madvise_vma_behavior+0x7d3/0x1000 mm/madvise.c:989
    [<ffffffff8151f2fc>] madvise_walk_vmas+0x11c/0x1d0 mm/madvise.c:1221
    [<ffffffff8152437b>] do_madvise mm/madvise.c:1399 [inline]
    [<ffffffff8152437b>] do_madvise+0x23b/0x320 mm/madvise.c:1357
    [<ffffffff8152478a>] __do_sys_madvise mm/madvise.c:1412 [inline]
    [<ffffffff8152478a>] __se_sys_madvise mm/madvise.c:1410 [inline]
    [<ffffffff8152478a>] __x64_sys_madvise+0x2a/0x30 mm/madvise.c:1410
    [<ffffffff84565f15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84565f15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810cb39d80 (size 576):
  comm "syz-executor883", pid 3622, jiffies 4294954659 (age 29.170s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    98 f8 cd 0d 81 88 ff ff 98 9d b3 0c 81 88 ff ff  ................
  backtrace:
    [<ffffffff8247dfba>] xas_nomem lib/xarray.c:307 [inline]
    [<ffffffff8247dfba>] xas_nomem+0x4a/0xd0 lib/xarray.c:299
    [<ffffffff8157b8d0>] split_huge_page_to_list+0x26d0/0x29f0 mm/huge_memory.c:2626
    [<ffffffff8148a224>] split_huge_page include/linux/huge_mm.h:191 [inline]
    [<ffffffff8148a224>] truncate_inode_partial_folio+0x3e4/0x5f0 mm/truncate.c:243
    [<ffffffff814a78a0>] shmem_undo_range+0x3d0/0xbe0 mm/shmem.c:966
    [<ffffffff814a8e51>] shmem_truncate_range mm/shmem.c:1044 [inline]
    [<ffffffff814a8e51>] shmem_fallocate+0x1e1/0x910 mm/shmem.c:2671
    [<ffffffff815b5c6c>] vfs_fallocate+0x31c/0x670 fs/open.c:308
    [<ffffffff815237e3>] madvise_remove mm/madvise.c:965 [inline]
    [<ffffffff815237e3>] madvise_vma_behavior+0x7d3/0x1000 mm/madvise.c:989
    [<ffffffff8151f2fc>] madvise_walk_vmas+0x11c/0x1d0 mm/madvise.c:1221
    [<ffffffff8152437b>] do_madvise mm/madvise.c:1399 [inline]
    [<ffffffff8152437b>] do_madvise+0x23b/0x320 mm/madvise.c:1357
    [<ffffffff8152478a>] __do_sys_madvise mm/madvise.c:1412 [inline]
    [<ffffffff8152478a>] __se_sys_madvise mm/madvise.c:1410 [inline]
    [<ffffffff8152478a>] __x64_sys_madvise+0x2a/0x30 mm/madvise.c:1410
    [<ffffffff84565f15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84565f15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810cb35d80 (size 576):
  comm "syz-executor883", pid 3623, jiffies 4294954631 (age 29.490s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    18 48 36 04 81 88 ff ff 98 5d b3 0c 81 88 ff ff  .H6......]......
  backtrace:
    [<ffffffff8247dfba>] xas_nomem lib/xarray.c:307 [inline]
    [<ffffffff8247dfba>] xas_nomem+0x4a/0xd0 lib/xarray.c:299
    [<ffffffff8157b8d0>] split_huge_page_to_list+0x26d0/0x29f0 mm/huge_memory.c:2626
    [<ffffffff8148a224>] split_huge_page include/linux/huge_mm.h:191 [inline]
    [<ffffffff8148a224>] truncate_inode_partial_folio+0x3e4/0x5f0 mm/truncate.c:243
    [<ffffffff814a78a0>] shmem_undo_range+0x3d0/0xbe0 mm/shmem.c:966
    [<ffffffff814a8e51>] shmem_truncate_range mm/shmem.c:1044 [inline]
    [<ffffffff814a8e51>] shmem_fallocate+0x1e1/0x910 mm/shmem.c:2671
    [<ffffffff815b5c6c>] vfs_fallocate+0x31c/0x670 fs/open.c:308
    [<ffffffff815237e3>] madvise_remove mm/madvise.c:965 [inline]
    [<ffffffff815237e3>] madvise_vma_behavior+0x7d3/0x1000 mm/madvise.c:989
    [<ffffffff8151f2fc>] madvise_walk_vmas+0x11c/0x1d0 mm/madvise.c:1221
    [<ffffffff8152437b>] do_madvise mm/madvise.c:1399 [inline]
    [<ffffffff8152437b>] do_madvise+0x23b/0x320 mm/madvise.c:1357
    [<ffffffff8152478a>] __do_sys_madvise mm/madvise.c:1412 [inline]
    [<ffffffff8152478a>] __se_sys_madvise mm/madvise.c:1410 [inline]
    [<ffffffff8152478a>] __x64_sys_madvise+0x2a/0x30 mm/madvise.c:1410
    [<ffffffff84565f15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84565f15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810cb39d80 (size 576):
  comm "syz-executor883", pid 3622, jiffies 4294954659 (age 29.210s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    98 f8 cd 0d 81 88 ff ff 98 9d b3 0c 81 88 ff ff  ................
  backtrace:
    [<ffffffff8247dfba>] xas_nomem lib/xarray.c:307 [inline]
    [<ffffffff8247dfba>] xas_nomem+0x4a/0xd0 lib/xarray.c:299
    [<ffffffff8157b8d0>] split_huge_page_to_list+0x26d0/0x29f0 mm/huge_memory.c:2626
    [<ffffffff8148a224>] split_huge_page include/linux/huge_mm.h:191 [inline]
    [<ffffffff8148a224>] truncate_inode_partial_folio+0x3e4/0x5f0 mm/truncate.c:243
    [<ffffffff814a78a0>] shmem_undo_range+0x3d0/0xbe0 mm/shmem.c:966
    [<ffffffff814a8e51>] shmem_truncate_range mm/shmem.c:1044 [inline]
    [<ffffffff814a8e51>] shmem_fallocate+0x1e1/0x910 mm/shmem.c:2671
    [<ffffffff815b5c6c>] vfs_fallocate+0x31c/0x670 fs/open.c:308
    [<ffffffff815237e3>] madvise_remove mm/madvise.c:965 [inline]
    [<ffffffff815237e3>] madvise_vma_behavior+0x7d3/0x1000 mm/madvise.c:989
    [<ffffffff8151f2fc>] madvise_walk_vmas+0x11c/0x1d0 mm/madvise.c:1221
    [<ffffffff8152437b>] do_madvise mm/madvise.c:1399 [inline]
    [<ffffffff8152437b>] do_madvise+0x23b/0x320 mm/madvise.c:1357
    [<ffffffff8152478a>] __do_sys_madvise mm/madvise.c:1412 [inline]
    [<ffffffff8152478a>] __se_sys_madvise mm/madvise.c:1410 [inline]
    [<ffffffff8152478a>] __x64_sys_madvise+0x2a/0x30 mm/madvise.c:1410
    [<ffffffff84565f15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84565f15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

executing program
executing program
executing program
executing program


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux