erofs: skip sufficiently large global buffers when resizing
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
erofs: skip sufficiently large global buffers when resizing
z_erofs_gbuf_nrpages is advanced only after every global buffer has been grown. If a resize fails after some buffers were enlarged, a retry revisits those enlarged buffers.
Retrying the same size then returns -ENOMEM because alloc_pages_bulk() has no pages to add and the unchanged return value is treated as a failure. Retrying an intermediate size allocates a temporary pointer array smaller than gbuf->nrpages and copies more existing pointers than the array can hold.
Skip buffers that already satisfy the request. Once all remaining buffers have caught up, advancing z_erofs_gbuf_nrpages again describes the guaranteed minimum size across the pool.
From the CVE record · Linux
The Linux kernel’s EROFS global buffer resize path can mishandle a retry after a partial resize failure. A retry at an intermediate size can copy more pointers than a temporary array holds; retrying the same size can instead return an allocation error. The input does not specify how an attacker could trigger this or whether access or user interaction is required.
Engineers running Linux kernels with EROFS should check their versions against the vendor advisory; affected versions were not provided.