xfs: reject out-of-range attribute value lengths in xfs_attr_copy_value
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: xfs: reject out-of-range attribute value lengths in xfs_attr_copy_value xfs_attr_copy_value() takes the value length as a signed int and, for a remote xattr, is handed args->rmtvaluelen. That field is filled from the on-disk __be32 xfs_attr_leaf_name_remote.valuelen in xfs_attr3_leaf_getvalue(), so a crafted length such as 0x80000000 is stored into the signed rmtvaluelen as a negative number. The "buffer too small" guard in xfs_attr_copy_value() is a signed comparison: if (args->valuelen < valuelen) return -ERANGE; A negative valuelen therefore compares as smaller than the caller's buffer size, skips the -ERANGE path, and is then used as a copy length, leading to an out-of-bounds copy of a full remote block into a small getxattr(2) buffer on a mounted crafted image. Reject a value length that is negative or larger than the maximum xattr size before it is used, so a bogus on-disk length can no longer slip through the value copier.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from 9df243a1a9e607e7cf5d20ee46edd5ec84b7e400, before 42db3bdf727398cb0e5020fbfec8fc0afca9deb8; from 9df243a1a9e607e7cf5d20ee46edd5ec84b7e400, before b3f78fa60d4be346df7d5dfcbde7a3c05a7a1975; from 9df243a1a9e607e7cf5d20ee46edd5ec84b7e400, before e32f3a262c5739128506f0dad08471dfee06a3e0; from 9df243a1a9e607e7cf5d20ee46edd5ec84b7e400, before 655cb24f3852b41a9ddbf0d228f483537832b075; from 9df243a1a9e607e7cf5d20ee46edd5ec84b7e400, before 91d0cf6244280e67bdc2787a60a10f635ac064c0; from 9df243a1a9e607e7cf5d20ee46edd5ec84b7e400, before c2cd6b3b480ef2ae9752ed924a2199c8c90569a1; and 2 more | 42db3bdf727398cb0e5020fbfec8fc0afca9deb8; b3f78fa60d4be346df7d5dfcbde7a3c05a7a1975; e32f3a262c5739128506f0dad08471dfee06a3e0; 655cb24f3852b41a9ddbf0d228f483537832b075 |
| Linux Linux | Software | 5.4 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | Required | A person has to do something first, such as open a file or visit a page. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 8 sources for this flaw, none tagged as a vendor patch.