{"id":"CVE-2025-38549","state":"PUBLISHED","title":"efivarfs: Fix memory leak of efivarfs_fs_info in fs_context error paths","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nefivarfs: Fix memory leak of efivarfs_fs_info in fs_context error paths\n\nWhen processing mount options, efivarfs allocates efivarfs_fs_info (sfi)\nearly in fs_context initialization. However, sfi is associated with the\nsuperblock and typically freed when the superblock is destroyed. If the\nfs_context is released (final put) before fill_super is called—such as\non error paths or during reconfiguration—the sfi structure would leak,\nas ownership never transfers to the superblock.\n\nImplement the .free callback in efivarfs_context_ops to ensure any\nallocated sfi is properly freed if the fs_context is torn down before\nfill_super, preventing this memory leak.","publishedAt":"2025-08-16T11:34:17.699Z","updatedAt":"2026-05-11T21:30:14.311Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5329aa5101f73c451bcd48deaf3f296685849d9c","status":"affected","lessThan":"816d36973467d1c9c08a48bdffe4675e219a2e84","versionType":"git"},{"version":"5329aa5101f73c451bcd48deaf3f296685849d9c","status":"affected","lessThan":"e9fabe7036bb8be6071f39dc38605508f5f57b20","versionType":"git"},{"version":"5329aa5101f73c451bcd48deaf3f296685849d9c","status":"affected","lessThan":"64e135f1eaba0bbb0cdee859af3328c68d5b9789","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/efivarfs/super.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.40","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.8","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/efivarfs/super.c"]}],"references":["https://git.kernel.org/stable/c/816d36973467d1c9c08a48bdffe4675e219a2e84","https://git.kernel.org/stable/c/e9fabe7036bb8be6071f39dc38605508f5f57b20","https://git.kernel.org/stable/c/64e135f1eaba0bbb0cdee859af3328c68d5b9789"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38549.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38549","state":"PUBLISHED","datePublished":"2025-08-16T11:34:17.699Z","dateUpdated":"2026-05-11T21:30:14.311Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.024Z"},"containers":{"cna":{"title":"efivarfs: Fix memory leak of efivarfs_fs_info in fs_context error paths","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nefivarfs: Fix memory leak of efivarfs_fs_info in fs_context error paths\n\nWhen processing mount options, efivarfs allocates efivarfs_fs_info (sfi)\nearly in fs_context initialization. However, sfi is associated with the\nsuperblock and typically freed when the superblock is destroyed. If the\nfs_context is released (final put) before fill_super is called—such as\non error paths or during reconfiguration—the sfi structure would leak,\nas ownership never transfers to the superblock.\n\nImplement the .free callback in efivarfs_context_ops to ensure any\nallocated sfi is properly freed if the fs_context is torn down before\nfill_super, preventing this memory leak."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5329aa5101f73c451bcd48deaf3f296685849d9c","status":"affected","lessThan":"816d36973467d1c9c08a48bdffe4675e219a2e84","versionType":"git"},{"version":"5329aa5101f73c451bcd48deaf3f296685849d9c","status":"affected","lessThan":"e9fabe7036bb8be6071f39dc38605508f5f57b20","versionType":"git"},{"version":"5329aa5101f73c451bcd48deaf3f296685849d9c","status":"affected","lessThan":"64e135f1eaba0bbb0cdee859af3328c68d5b9789","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/efivarfs/super.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.40","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.8","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/efivarfs/super.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/816d36973467d1c9c08a48bdffe4675e219a2e84"},{"url":"https://git.kernel.org/stable/c/e9fabe7036bb8be6071f39dc38605508f5f57b20"},{"url":"https://git.kernel.org/stable/c/64e135f1eaba0bbb0cdee859af3328c68d5b9789"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:30:14.311Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.12.40"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.15.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}