{"id":"CVE-2025-22017","state":"PUBLISHED","title":"devlink: fix xa_alloc_cyclic() error handling","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndevlink: fix xa_alloc_cyclic() error handling\n\nIn case of returning 1 from xa_alloc_cyclic() (wrapping) ERR_PTR(1) will\nbe returned, which will cause IS_ERR() to be false. Which can lead to\ndereference not allocated pointer (rel).\n\nFix it by checking if err is lower than zero.\n\nThis wasn't found in real usecase, only noticed. Credit to Pierre.","publishedAt":"2025-04-08T08:18:06.575Z","updatedAt":"2026-05-11T21:11:02.888Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c137743bce02b18c1537d4681aa515f7b80bf0a8","status":"affected","lessThan":"f8aaa38cfaf6f20afa4db36b6529032fb69165dc","versionType":"git"},{"version":"c137743bce02b18c1537d4681aa515f7b80bf0a8","status":"affected","lessThan":"466132f6d28a7e47a82501fe1c46b8f90487412e","versionType":"git"},{"version":"c137743bce02b18c1537d4681aa515f7b80bf0a8","status":"affected","lessThan":"f3b97b7d4bf316c3991e5634c9f4847c2df35478","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/devlink/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.12.21","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.9","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/devlink/core.c"]}],"references":["https://git.kernel.org/stable/c/f8aaa38cfaf6f20afa4db36b6529032fb69165dc","https://git.kernel.org/stable/c/466132f6d28a7e47a82501fe1c46b8f90487412e","https://git.kernel.org/stable/c/f3b97b7d4bf316c3991e5634c9f4847c2df35478"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:39.238Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/22xxx/CVE-2025-22017.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-22017","state":"PUBLISHED","datePublished":"2025-04-08T08:18:06.575Z","dateUpdated":"2026-05-11T21:11:02.888Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-29T08:45:45.806Z"},"containers":{"cna":{"title":"devlink: fix xa_alloc_cyclic() error handling","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndevlink: fix xa_alloc_cyclic() error handling\n\nIn case of returning 1 from xa_alloc_cyclic() (wrapping) ERR_PTR(1) will\nbe returned, which will cause IS_ERR() to be false. Which can lead to\ndereference not allocated pointer (rel).\n\nFix it by checking if err is lower than zero.\n\nThis wasn't found in real usecase, only noticed. Credit to Pierre."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c137743bce02b18c1537d4681aa515f7b80bf0a8","status":"affected","lessThan":"f8aaa38cfaf6f20afa4db36b6529032fb69165dc","versionType":"git"},{"version":"c137743bce02b18c1537d4681aa515f7b80bf0a8","status":"affected","lessThan":"466132f6d28a7e47a82501fe1c46b8f90487412e","versionType":"git"},{"version":"c137743bce02b18c1537d4681aa515f7b80bf0a8","status":"affected","lessThan":"f3b97b7d4bf316c3991e5634c9f4847c2df35478","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/devlink/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.12.21","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.9","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/devlink/core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f8aaa38cfaf6f20afa4db36b6529032fb69165dc"},{"url":"https://git.kernel.org/stable/c/466132f6d28a7e47a82501fe1c46b8f90487412e"},{"url":"https://git.kernel.org/stable/c/f3b97b7d4bf316c3991e5634c9f4847c2df35478"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:11:02.888Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.12.21"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.13.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.14"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}