xfs: bound inode fork length against the fork size during log recovery
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: xfs: bound inode fork length against the fork size during log recovery xlog_recover_inode_commit_pass2() copies an inode log item's data/attr fork region into the inode buffer using the on-log region length without bounding it against the fork capacity, e.g.: len = item->ri_buf[2].iov_len; memcpy(XFS_DFORK_DPTR(dip), src, len); The only guard is an ASSERT, which is a no-op on production kernels (CONFIG_XFS_DEBUG off), and xfs_dinode_verify() runs only after the copy. A crafted image with a dirty log can therefore drive a heap out-of-bounds write at mount time. The XFS_ILOG_DBROOT sibling already passes XFS_DFORK_DSIZE as a bound; the DDATA/DEXT and ADATA/AEXT memcpy paths did not. Bound each logged fork region against the destination fork size before copying it, and reject the log item with -EFSCORRUPTED when it does not fit. Because the recovered inode is only verified after the fork data has been copied in, the checks are done up front, before any memcpy into the on-disk inode.
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 658fa68b6f34f73c7e4023489accd34c1db91cb1, before 738959d93ca51be0d9d3d15f9b5b84ac4d39fe8a; from 658fa68b6f34f73c7e4023489accd34c1db91cb1, before f9827d457addf4a7fb089124fff01f10de83d557; from 658fa68b6f34f73c7e4023489accd34c1db91cb1, before 287bb7a11fe1053d78172f874e16873d4b20d6e5; from 658fa68b6f34f73c7e4023489accd34c1db91cb1, before af559d87fdd921b90c86125f78d8b97d754432dd; from 658fa68b6f34f73c7e4023489accd34c1db91cb1, before f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe; from 658fa68b6f34f73c7e4023489accd34c1db91cb1, before e2768e65a5f2f942c831e3df3b06ad7332d423e6; and 1 more | 738959d93ca51be0d9d3d15f9b5b84ac4d39fe8a; f9827d457addf4a7fb089124fff01f10de83d557; 287bb7a11fe1053d78172f874e16873d4b20d6e5; af559d87fdd921b90c86125f78d8b97d754432dd |
| Linux Linux | Software | 5.8 | 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 7 sources for this flaw, none tagged as a vendor patch.