{"id":"CVE-2024-50216","state":"PUBLISHED","title":"xfs: fix finding a last resort AG in xfs_filestream_pick_ag","description":"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->pag 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.","publishedAt":"2024-11-09T10:14:27.875Z","updatedAt":"2026-05-11T20:47:40.266Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6","status":"affected","lessThan":"77ddc732416b017180893cbb2356e9f0a414c575","versionType":"git"},{"version":"f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6","status":"affected","lessThan":"a023408925acd64db5c8980373fcb3e28ec6fd29","versionType":"git"},{"version":"f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6","status":"affected","lessThan":"dc60992ce76fbc2f71c2674f435ff6bde2108028","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/xfs/xfs_filestream.c","fs/xfs/xfs_trace.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.6.60","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.7","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/xfs/xfs_filestream.c","fs/xfs/xfs_trace.h"]}],"references":["https://git.kernel.org/stable/c/77ddc732416b017180893cbb2356e9f0a414c575","https://git.kernel.org/stable/c/a023408925acd64db5c8980373fcb3e28ec6fd29","https://git.kernel.org/stable/c/dc60992ce76fbc2f71c2674f435ff6bde2108028"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/50xxx/CVE-2024-50216.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-50216","state":"PUBLISHED","datePublished":"2024-11-09T10:14:27.875Z","dateUpdated":"2026-05-11T20:47:40.266Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-10-21T19:36:19.972Z"},"containers":{"cna":{"title":"xfs: fix finding a last resort AG in xfs_filestream_pick_ag","descriptions":[{"lang":"en","value":"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->pag 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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6","status":"affected","lessThan":"77ddc732416b017180893cbb2356e9f0a414c575","versionType":"git"},{"version":"f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6","status":"affected","lessThan":"a023408925acd64db5c8980373fcb3e28ec6fd29","versionType":"git"},{"version":"f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6","status":"affected","lessThan":"dc60992ce76fbc2f71c2674f435ff6bde2108028","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/xfs/xfs_filestream.c","fs/xfs/xfs_trace.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.6.60","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.7","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/xfs/xfs_filestream.c","fs/xfs/xfs_trace.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/77ddc732416b017180893cbb2356e9f0a414c575"},{"url":"https://git.kernel.org/stable/c/a023408925acd64db5c8980373fcb3e28ec6fd29"},{"url":"https://git.kernel.org/stable/c/dc60992ce76fbc2f71c2674f435ff6bde2108028"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T20:47:40.266Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.6.60"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.11.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}