{"id":"CVE-2025-37898","state":"PUBLISHED","title":"powerpc64/ftrace: fix module loading without patchable function entries","description":"In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc64/ftrace: fix module loading without patchable function entries\n\nget_stubs_size assumes that there must always be at least one patchable\nfunction entry, which is not always the case (modules that export data\nbut no code), otherwise it returns -ENOEXEC and thus the section header\nsh_size is set to that value. During module_memory_alloc() the size is\npassed to execmem_alloc() after being page-aligned and thus set to zero\nwhich will cause it to fail the allocation (and thus module loading) as\n__vmalloc_node_range() checks for zero-sized allocs and returns null:\n\n[  115.466896] module_64: cast_common: doesn't contain __patchable_function_entries.\n[  115.469189] ------------[ cut here ]------------\n[  115.469496] WARNING: CPU: 0 PID: 274 at mm/vmalloc.c:3778 __vmalloc_node_range_noprof+0x8b4/0x8f0\n...\n[  115.478574] ---[ end trace 0000000000000000 ]---\n[  115.479545] execmem: unable to allocate memory\n\nFix this by removing the check completely, since it is anyway not\nhelpful to propagate this as an error upwards.","publishedAt":"2025-05-20T15:21:34.055Z","updatedAt":"2026-05-11T21:17:15.765Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"eec37961a56aa4f3fe1c33ffd48eec7d1bb0c009","status":"affected","lessThan":"358b559afec7806b9d01c2405b490e782c347022","versionType":"git"},{"version":"eec37961a56aa4f3fe1c33ffd48eec7d1bb0c009","status":"affected","lessThan":"534f5a8ba27863141e29766467a3e1f61bcb47ac","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/powerpc/kernel/module_64.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.13","versionType":"semver"},{"version":"6.14.6","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/powerpc/kernel/module_64.c"]}],"references":["https://git.kernel.org/stable/c/358b559afec7806b9d01c2405b490e782c347022","https://git.kernel.org/stable/c/534f5a8ba27863141e29766467a3e1f61bcb47ac"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:03.054Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/37xxx/CVE-2025-37898.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37898","state":"PUBLISHED","datePublished":"2025-05-20T15:21:34.055Z","dateUpdated":"2026-05-11T21:17:15.765Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.964Z"},"containers":{"cna":{"title":"powerpc64/ftrace: fix module loading without patchable function entries","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc64/ftrace: fix module loading without patchable function entries\n\nget_stubs_size assumes that there must always be at least one patchable\nfunction entry, which is not always the case (modules that export data\nbut no code), otherwise it returns -ENOEXEC and thus the section header\nsh_size is set to that value. During module_memory_alloc() the size is\npassed to execmem_alloc() after being page-aligned and thus set to zero\nwhich will cause it to fail the allocation (and thus module loading) as\n__vmalloc_node_range() checks for zero-sized allocs and returns null:\n\n[  115.466896] module_64: cast_common: doesn't contain __patchable_function_entries.\n[  115.469189] ------------[ cut here ]------------\n[  115.469496] WARNING: CPU: 0 PID: 274 at mm/vmalloc.c:3778 __vmalloc_node_range_noprof+0x8b4/0x8f0\n...\n[  115.478574] ---[ end trace 0000000000000000 ]---\n[  115.479545] execmem: unable to allocate memory\n\nFix this by removing the check completely, since it is anyway not\nhelpful to propagate this as an error upwards."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"eec37961a56aa4f3fe1c33ffd48eec7d1bb0c009","status":"affected","lessThan":"358b559afec7806b9d01c2405b490e782c347022","versionType":"git"},{"version":"eec37961a56aa4f3fe1c33ffd48eec7d1bb0c009","status":"affected","lessThan":"534f5a8ba27863141e29766467a3e1f61bcb47ac","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/powerpc/kernel/module_64.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.13","versionType":"semver"},{"version":"6.14.6","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/powerpc/kernel/module_64.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/358b559afec7806b9d01c2405b490e782c347022"},{"url":"https://git.kernel.org/stable/c/534f5a8ba27863141e29766467a3e1f61bcb47ac"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:17:15.765Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.14.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}