CVE-2024-46688

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

published September 13, 2024

CVSS
—
EPSS
0%
Percentile
9.3
In the wild
Unconfirmed
What it is

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]

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.00200 · 9.3th percentile
Published
2024-09-13T05:29Z
EPSS history
Timeline
  • 13 SEP 05:29Z
    erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails
    cvelistv5