xfs: validate attr entry pointer before field access
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c84760659dcf237902d4cc997cd5f55cb3b2807f · < 184c1a80421a5b5ddcd262e47980ce2e67fee211| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfs: validate attr entry pointer before field access
xfs_attr3_leaf_verify_entry() accesses lentry/rentry fields (namelen, valuelen) before checking if the entry pointer itself is within bounds. If nameidx is crafted to point near the end of the buffer, these field accesses can read out-of-bounds before the bounds check at name_end > buf_end is performed.
Add explicit bounds checks for entry pointers before accessing their fields. Use offsetof() to check that the start of the flexible array member (nameval/name) is within bounds, which ensures all preceding fields are safe to access.
From the CVE record · Linux
The Linux kernel’s XFS attribute entry verifier accesses entry fields before confirming the entry pointer is within bounds. A crafted nameidx near the end of a buffer can cause an out-of-bounds read; the input does not specify the access or user interaction needed to trigger it.
Engineers running Linux kernels with XFS should check their versions; affected versions are not specified.