• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-9.5
    • rhel-9.4
    • xfsprogs
    • xfsprogs-6.4.0-3.el9
    • None
    • None
    • sst_filesystems
    • ssg_platform_storage
    • 20
    • 23
    • 2
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None

      Fix issue found by covscan:

       

      Error: RESOURCE_LEAK (CWE-772): [#def4] [important]
      xfsprogs-6.4.0/libxfs/xfs_alloc.c:2443:2: alloc_fn: Storage is returned from allocation function "kmem_cache_zalloc".
      xfsprogs-6.4.0/libxfs/xfs_alloc.c:2443:2: var_assign: Assigning: "xefi" = storage returned from "kmem_cache_zalloc(xfs_extfree_item_cache, 0U)".
      xfsprogs-6.4.0/libxfs/xfs_alloc.c:2450:3: leaked_storage: Variable "xefi" going out of scope leaks the storage it points to.
      # 2448|   
      # 2449|   	if (XFS_IS_CORRUPT(mp, !xfs_verify_fsbno(mp, xefi->xefi_startblock)))
      # 2450|-> 		return -EFSCORRUPTED;
      # 2451|   
      # 2452|   	trace_xfs_agfl_free_defer(mp, agno, 0, agbno, 1); 

      This issue is fixed in upstream by following commit: "d096b26c xfs: fix bounds check in xfs_defer_agfl_block()" 

            bodonnel Bill O'Donnell
            preichl@redhat.com Pavel Reichl
            Bill O'Donnell Bill O'Donnell
            Zirong Lang Zirong Lang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: