{"id":"CVE-2026-143324","state":"PUBLISHED","title":"bpf: Don't move a MAP_FIXED address in arena_get_unmapped_area()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't move a MAP_FIXED address in arena_get_unmapped_area()\n\nThe user range of an arena must not cross a 4 GiB boundary. Thus\narena_get_unmapped_area() asks the mm for 2 * len bytes and rounds the\nresult up if necessary. This is correct only if the mm finds a free range.\nWith MAP_FIXED the mm does no search and returns addr. For\nMAP_FIXED_NOREPLACE, do_mmap() also sets MAP_FIXED.\n\nWith MAP_FIXED the arena is not at addr after round_up(). Thus mmap()\nremoves mappings outside the range from addr to addr + len. It keeps a part\nof those in this range. Also, round_up() can wrap to address 0, and the\ntest for address 0 is before it.\n\nThe arch code gets twice the length of the mapping. Thus it can refuse a\nvalid MAP_FIXED range. On s390 the arch code also grows the page table for\nthe range. With the double length it can omit this step for a valid range.\n\nThe test for a crossing is not exact. Because ret is a long, ret >> 32\nextends the sign, but the other side is unsigned. The sides are never equal\nfor an address with bit 63 set, and round_up() always runs. Such user\naddresses exist on s390. arena_map_alloc() does the same test with a u64.\n\nWith MAP_FIXED, pass len to the mm. Return -EINVAL if the range crosses a\nboundary, as for address 0. Make ret unsigned, so that only these ranges\nget the error. On x86-64, if round_up() gives address 0 today, mmap() now\nfails with -EINVAL or with -ENOMEM from the mm. Today mmap() can also fail\nfor the address after round_up(), for example with -ENOMEM, -EEXIST, -EPERM\nor -EBUSY.\n\nWithout MAP_FIXED the mm must still find a free range of 2 * len bytes\ninside the address space of the task. The range after round_up() is inside\nit, and round_up() cannot wrap. An address with bit 63 set now moves only\nif its range crosses a boundary.\n\nFor an arena, libbpf uses MAP_FIXED only with map_extra, and\narena_map_alloc() refuses a map_extra range that crosses a boundary. A\nsubsequent mmap() must use the range of the first mmap(). For mmap() of the\nmap fd, this range comes from arena_get_unmapped_area(), thus it crosses no\nboundary. arena_map_alloc() still accepts a map_extra above TASK_SIZE, and\nmmap() of such an arena fails.","publishedAt":"2026-12-03T09:21:51.023Z","updatedAt":"2026-12-03T09:21:51.023Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"317460317a02a1af512697e6e964298dedd8a163","status":"affected","lessThan":"c6850945f8da9bc4940b2b1079cc130c0225b31d","versionType":"git"},{"version":"317460317a02a1af512697e6e964298dedd8a163","status":"affected","lessThan":"92b5ce3ca5b7c641e2678f92419aa7833951bc9d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/arena.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/arena.c"]}],"references":["https://git.kernel.org/stable/c/c6850945f8da9bc4940b2b1079cc130c0225b31d","https://git.kernel.org/stable/c/92b5ce3ca5b7c641e2678f92419aa7833951bc9d"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143324.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143324","state":"PUBLISHED","datePublished":"2026-12-03T09:21:51.023Z","dateUpdated":"2026-12-03T09:21:51.023Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.366Z"},"containers":{"cna":{"title":"bpf: Don't move a MAP_FIXED address in arena_get_unmapped_area()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't move a MAP_FIXED address in arena_get_unmapped_area()\n\nThe user range of an arena must not cross a 4 GiB boundary. Thus\narena_get_unmapped_area() asks the mm for 2 * len bytes and rounds the\nresult up if necessary. This is correct only if the mm finds a free range.\nWith MAP_FIXED the mm does no search and returns addr. For\nMAP_FIXED_NOREPLACE, do_mmap() also sets MAP_FIXED.\n\nWith MAP_FIXED the arena is not at addr after round_up(). Thus mmap()\nremoves mappings outside the range from addr to addr + len. It keeps a part\nof those in this range. Also, round_up() can wrap to address 0, and the\ntest for address 0 is before it.\n\nThe arch code gets twice the length of the mapping. Thus it can refuse a\nvalid MAP_FIXED range. On s390 the arch code also grows the page table for\nthe range. With the double length it can omit this step for a valid range.\n\nThe test for a crossing is not exact. Because ret is a long, ret >> 32\nextends the sign, but the other side is unsigned. The sides are never equal\nfor an address with bit 63 set, and round_up() always runs. Such user\naddresses exist on s390. arena_map_alloc() does the same test with a u64.\n\nWith MAP_FIXED, pass len to the mm. Return -EINVAL if the range crosses a\nboundary, as for address 0. Make ret unsigned, so that only these ranges\nget the error. On x86-64, if round_up() gives address 0 today, mmap() now\nfails with -EINVAL or with -ENOMEM from the mm. Today mmap() can also fail\nfor the address after round_up(), for example with -ENOMEM, -EEXIST, -EPERM\nor -EBUSY.\n\nWithout MAP_FIXED the mm must still find a free range of 2 * len bytes\ninside the address space of the task. The range after round_up() is inside\nit, and round_up() cannot wrap. An address with bit 63 set now moves only\nif its range crosses a boundary.\n\nFor an arena, libbpf uses MAP_FIXED only with map_extra, and\narena_map_alloc() refuses a map_extra range that crosses a boundary. A\nsubsequent mmap() must use the range of the first mmap(). For mmap() of the\nmap fd, this range comes from arena_get_unmapped_area(), thus it crosses no\nboundary. arena_map_alloc() still accepts a map_extra above TASK_SIZE, and\nmmap() of such an arena fails."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"317460317a02a1af512697e6e964298dedd8a163","status":"affected","lessThan":"c6850945f8da9bc4940b2b1079cc130c0225b31d","versionType":"git"},{"version":"317460317a02a1af512697e6e964298dedd8a163","status":"affected","lessThan":"92b5ce3ca5b7c641e2678f92419aa7833951bc9d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/arena.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/arena.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c6850945f8da9bc4940b2b1079cc130c0225b31d"},{"url":"https://git.kernel.org/stable/c/92b5ce3ca5b7c641e2678f92419aa7833951bc9d"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:21:51.023Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}