{"id":"CVE-2026-45927","state":"PUBLISHED","title":"bpf: Require frozen map for calculating map hash","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Require frozen map for calculating map hash\n\nCurrently, bpf_map_get_info_by_fd calculates and caches the hash of the\nmap regardless of the map's frozen state.\n\nThis leads to a TOCTOU bug where userspace can call\nBPF_OBJ_GET_INFO_BY_FD to cache the hash and then modify the map\ncontents before freezing.\n\nTherefore, a trusted loader can be tricked into verifying the stale hash\nwhile loading the modified contents.\n\nFix this by returning -EPERM if the map is not frozen when the hash is\nrequested. This ensures the hash is only generated for the final,\nimmutable state of the map.","publishedAt":"2026-05-27T12:17:46.284Z","updatedAt":"2026-05-27T12:17:46.284Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ea2e6467ac36bf3d785defc89e58269b15d182f7","status":"affected","lessThan":"7752d36343862323bbeea4ce3adf0ec2ed86e122","versionType":"git"},{"version":"ea2e6467ac36bf3d785defc89e58269b15d182f7","status":"affected","lessThan":"f415e114b58fe02c41191e47f24bdabb438daf72","versionType":"git"},{"version":"ea2e6467ac36bf3d785defc89e58269b15d182f7","status":"affected","lessThan":"a2c86aa621c22f2a7e26c654f936d65cfff0aa91","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/syscall.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.14","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.4","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/syscall.c"]}],"references":["https://git.kernel.org/stable/c/7752d36343862323bbeea4ce3adf0ec2ed86e122","https://git.kernel.org/stable/c/f415e114b58fe02c41191e47f24bdabb438daf72","https://git.kernel.org/stable/c/a2c86aa621c22f2a7e26c654f936d65cfff0aa91"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/45xxx/CVE-2026-45927.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-45927","state":"PUBLISHED","datePublished":"2026-05-27T12:17:46.284Z","dateUpdated":"2026-05-27T12:17:46.284Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-05-13T15:03:33.086Z"},"containers":{"cna":{"title":"bpf: Require frozen map for calculating map hash","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Require frozen map for calculating map hash\n\nCurrently, bpf_map_get_info_by_fd calculates and caches the hash of the\nmap regardless of the map's frozen state.\n\nThis leads to a TOCTOU bug where userspace can call\nBPF_OBJ_GET_INFO_BY_FD to cache the hash and then modify the map\ncontents before freezing.\n\nTherefore, a trusted loader can be tricked into verifying the stale hash\nwhile loading the modified contents.\n\nFix this by returning -EPERM if the map is not frozen when the hash is\nrequested. This ensures the hash is only generated for the final,\nimmutable state of the map."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ea2e6467ac36bf3d785defc89e58269b15d182f7","status":"affected","lessThan":"7752d36343862323bbeea4ce3adf0ec2ed86e122","versionType":"git"},{"version":"ea2e6467ac36bf3d785defc89e58269b15d182f7","status":"affected","lessThan":"f415e114b58fe02c41191e47f24bdabb438daf72","versionType":"git"},{"version":"ea2e6467ac36bf3d785defc89e58269b15d182f7","status":"affected","lessThan":"a2c86aa621c22f2a7e26c654f936d65cfff0aa91","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/syscall.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.14","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.4","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/syscall.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/7752d36343862323bbeea4ce3adf0ec2ed86e122"},{"url":"https://git.kernel.org/stable/c/f415e114b58fe02c41191e47f24bdabb438daf72"},{"url":"https://git.kernel.org/stable/c/a2c86aa621c22f2a7e26c654f936d65cfff0aa91"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-27T12:17:46.284Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"6.18.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"6.19.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}