{"id":"CVE-2024-50216","summary":"xfs: fix finding a last resort AG in xfs_filestream_pick_ag","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfs: fix finding a last resort AG in xfs_filestream_pick_ag\n\nWhen the main loop in xfs_filestream_pick_ag fails to find a suitable\nAG it tries to just pick the online AG.  But the loop for that uses\nargs-\u003epag as loop iterator while the later code expects pag to be\nset.  Fix this by reusing the max_pag case for this last resort, and\nalso add a check for impossible case of no AG just to make sure that\nthe uninitialized pag doesn't even escape in theory.","modified":"2026-03-20T12:39:38.655444Z","published":"2024-11-09T10:14:27.875Z","related":["MGASA-2024-0368","MGASA-2024-0369","SUSE-SU-2024:4314-1","SUSE-SU-2024:4316-1","SUSE-SU-2024:4318-1","SUSE-SU-2024:4387-1","SUSE-SU-2025:20163-1","SUSE-SU-2025:20164-1","SUSE-SU-2025:20246-1","SUSE-SU-2025:20247-1","USN-7276-1","USN-7277-1","openSUSE-SU-2024:14500-1","openSUSE-SU-2025:14705-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50216.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/77ddc732416b017180893cbb2356e9f0a414c575"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a023408925acd64db5c8980373fcb3e28ec6fd29"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dc60992ce76fbc2f71c2674f435ff6bde2108028"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50216.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-50216"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6"},{"fixed":"77ddc732416b017180893cbb2356e9f0a414c575"},{"fixed":"a023408925acd64db5c8980373fcb3e28ec6fd29"},{"fixed":"dc60992ce76fbc2f71c2674f435ff6bde2108028"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-50216.json"}}],"schema_version":"1.7.5"}