# CVE-2024-50216: xfs: fix finding a last resort AG in xfs_filestream_pick_ag

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2024-11-09T10:14:27.875Z
- Modified: 2026-06-17T08:03:53.827Z
- Assigned by: Linux

## Description

In 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.

(As written by CVE List.)

## Affected

- Linux Linux: from f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6 before 77ddc732416b017180893cbb2356e9f0a414c575; from f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6 before a023408925acd64db5c8980373fcb3e28ec6fd29; from f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6 before dc60992ce76fbc2f71c2674f435ff6bde2108028; 6.3 (not affected: before 6.3; from 6.6.60 up to 6.6.*; from 6.11.7 up to 6.11.*; from 6.12 up to *)
- linux linux_kernel: from 6.3 before 6.6.60; from 6.7 before 6.11.7; 6.12

## References

- <https://git.kernel.org/stable/c/77ddc732416b017180893cbb2356e9f0a414c575> (patch)
- <https://git.kernel.org/stable/c/a023408925acd64db5c8980373fcb3e28ec6fd29> (patch)
- <https://git.kernel.org/stable/c/dc60992ce76fbc2f71c2674f435ff6bde2108028> (patch)

## Sources

- CVE List: [CVE-2024-50216](https://www.cve.org/CVERecord?id=CVE-2024-50216), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-50216](https://nvd.nist.gov/vuln/detail/CVE-2024-50216), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-50216 · Whole record: https://cve.day/CVE-2024-50216.json · Rebuilt by cve.day 2026-11-25T22:58:47.961Z
