xfs: don't let hidden_space go negative in xfs_metafile_resv_init
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 |
|
|
6.18.557.2.97.3In the Linux kernel, the following vulnerability has been resolved:
xfs: don't let hidden_space go negative in xfs_metafile_resv_init
LOLLM points out that if the amount of fdblocks that we can reserve for a metadata btree file goes below the space already used by that file, then the hidden_space subtraction can underflow, causing xfs_dec_fdblocks to subtract a huge amount of space. We never want the target to be less than the used sapce, so fix the logic that adjusts dblocks_avail downwards.
Also fix an error in the adjacent comment.
From the CVE record · Linux
In the Linux kernel's XFS metadata-file reservation logic, a subtraction can underflow if reservable free blocks fall below the space already used by the file. If an attacker can trigger this condition, XFS could subtract a huge amount from its free-block count; the input does not specify an attack path, authentication requirements, or user interaction.
Engineers running Linux kernels with XFS should check their versions against the vendor advisory; affected versions are not specified.