erofs: fix metabuf leak in inode xattr initialization
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ bb88e8da00253bea0e7f0f4cdfd7910572d7799f · < 79b09c54c6563df9846ca3094bcfd72082c3e1d7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
erofs: fix metabuf leak in inode xattr initialization
commit bb88e8da0025 ("erofs: use meta buffers for xattr operations") converted xattr operations to use on-stack erofs_buf instances. erofs_init_inode_xattrs() uses such a metabuf while reading the inline xattr header and shared xattr id array.
Some error paths after erofs_read_metabuf() leave through out_unlock without dropping the metabuf, so the folio reference can leak.
Consolidate the cleanup at out_unlock. erofs_put_metabuf() is a no-op if no folio has been acquired, and this keeps all paths after taking EROFS_I_BL_XATTR_BIT covered by a single cleanup site.
From the CVE record · Linux
In the Linux kernel, some error paths during EROFS inode xattr initialization fail to release a metabuf, leaking a folio reference. The input does not specify how an attacker could trigger these paths or whether access or user interaction is required.
Teams running Linux kernels with EROFS support should check their kernel versions against the vendor advisory; affected versions are not specified.