xfs: fix finding a last resort AG in xfs_filestream_pick_ag
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.6.606.11.76.12In the Linux kernel, the following vulnerability has been resolved:
xfs: fix finding a last resort AG in xfs_filestream_pick_ag
When the main loop in xfs_filestream_pick_ag fails to find a suitable AG it tries to just pick the online AG. But the loop for that uses args->pag as loop iterator while the later code expects pag to be set. Fix this by reusing the max_pag case for this last resort, and also add a check for impossible case of no AG just to make sure that the uninitialized pag doesn't even escape in theory.
From the CVE record · Linux
The XFS filestream allocation code can leave a pointer uninitialized when its main loop fails to find a suitable allocation group and falls back to a last-resort choice. The input does not establish whether an attacker can trigger this condition or specify any network, authentication, or user-interaction requirements.
Engineers running Linux kernels with XFS should check their kernel versions against the vendor advisory; affected versions are not specified in the input.