CVE-2024-46688

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-46688
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-46688.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-46688
Downstream
Published
2024-09-13T05:29:19Z
Modified
2025-10-22T02:07:05.268324Z
Summary
erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails
Details

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

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

If zerofsgbuf_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/000000000000f7b96e062018c6e3@google.com

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d6db47e571dcaecaeaafa8840d00ae849ae3907b
Fixed
49c0e081998008cde0c872c0ff9affa1ece4b878
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d6db47e571dcaecaeaafa8840d00ae849ae3907b
Fixed
0005e01e1e875c5e27130c5e2ed0189749d1e08a

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.10.1
v6.10.2
v6.10.3
v6.10.4
v6.10.5
v6.10.6
v6.10.7
v6.11-rc1
v6.11-rc2
v6.11-rc3
v6.11-rc4
v6.9

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.10.0
Fixed
6.10.8