Lucene search

K
cvelistLinuxCVELIST:CVE-2024-46688
HistorySep 13, 2024 - 5:29 a.m.

CVE-2024-46688 erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails

2024-09-1305:29:19
Linux
www.cve.org
3
erofs
out-of-bound access
linux kernel

EPSS

0

Percentile

9.6%

In the Linux kernel, the following vulnerability has been resolved:

erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails

If z_erofs_gbuf_growsize() partially fails on a global buffer due to
memory allocation failure or fault injection (as reported by syzbot [1]),
new pages need to be freed by comparing to the existing pages to avoid
memory leaks.

However, the old gbuf->pages[] array may not be large enough, which can
lead to null-ptr-deref or out-of-bound access.

Fix this by checking against gbuf->nrpages in advance.

[1] https://lore.kernel.org/r/[email protected]

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "fs/erofs/zutil.c"
    ],
    "versions": [
      {
        "version": "d6db47e571dc",
        "lessThan": "49c0e0819980",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "d6db47e571dc",
        "lessThan": "0005e01e1e87",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "fs/erofs/zutil.c"
    ],
    "versions": [
      {
        "version": "6.10",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "6.10",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.10.8",
        "lessThanOrEqual": "6.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.11",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

EPSS

0

Percentile

9.6%

Related for CVELIST:CVE-2024-46688