{"id":"CVE-2026-74314","revision":"cf10e8b124ed49259412094c2cd3f784","records":[{"revision":"cf10e8b124ed49259412094c2cd3f784","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-74314","aliases":[],"title":"bpf: Cancel special fields on map value recycle","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Cancel special fields on map value recycle\n\nMap update and delete paths currently call bpf_obj_free_fields() when a\nvalue is being replaced or recycled. That makes field destruction depend\non the context of the update/delete operation. For tracing programs this\ncan include NMI context, where referenced kptr destructors, uptr\nunpinning, and graph root destruction are not generally safe.\n\nIntroduce bpf_obj_cancel_fields() for the reusable-value path. It only\nperforms NMI-safe cleanup for timer, workqueue, and task_work fields.\nFields that need full destruction are left attached to the recycled value\nand are destroyed by the final cleanup path instead.\n\nSwitch array and hashtab update/delete/recycle paths to this cancel\nhelper. Keep bpf_obj_free_fields() for final map destruction and for\nbpf_mem_alloc destructors. Preallocated hashtabs do not have allocator\ndestructors, so teardown continues to walk the normal and extra elements\nand fully destroy their fields.\n\nThis deliberately relaxes the eager-free semantics of map update/delete\nfor special fields. Programs that relied on a recycled map slot becoming\nempty immediately after update/delete were relying on behavior that\ncannot be implemented safely from every BPF execution context without\noffloading arbitrary destructors.\n\nThere is a chance this change breaks programs making assumptions\nregarding the eager freeing of fields. If so, we can relax semantics to\ncancellation only when irqs_disabled() is true in the future. However,\ntheoretically, map values that get reused eagerly already have weaker\nguarantees as parallel users can recreate freed fields before the new\nelement becomes visible again.","state":0,"publishedAt":"2026-08-15T05:58:12.766+00:00","modifiedAt":"2026-10-16T18:55:32.49+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"include/linux/bpf.h\",\n                        \"kernel/bpf/arraymap.c\",\n                        \"kernel/bpf/hashtab.c\",\n                        \"kernel/bpf/syscall.c\",\n                        \"tools/testing/selftests/bpf/prog_tests/htab_update.c\",\n                        \"tools/testing/selftests/bpf/prog_tests/linked_list.c\",\n                        \"tools/testing/selftests/bpf/prog_tests/map_kptr.c\",\n                        \"tools/testing/selftests/bpf/prog_tests/refcounted_kptr.c\",\n                        \"tools/testing/selftests/bpf/progs/htab_update.c\",\n                        \"tools/testing/selftests/bpf/progs/linked_list.c\",\n                        \"tools/testing/selftests/bpf/progs/refcounted_kptr.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"14a324f6a67ef6a53e04362a70160a47eb8afffa\",\n                            \"lessThan\": \"9ea734e2cc0143d7429ab7dc0b20c85e5836183c\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"14a324f6a67ef6a53e04362a70160a47eb8afffa\",\n                            \"lessThan\": \"a3a81d247651218e47153f2d2afd7aee236726fd\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"f0462d38589422bc9e27fd3c6343dfeb6b3db2f9\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"5.18.18\",\n                            \"lessThan\": \"5.19\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"include/linux/bpf.h\",\n                        \"kernel/bpf/arraymap.c\",\n                        \"kernel/bpf/hashtab.c\",\n                        \"kernel/bpf/syscall.c\",\n                        \"tools/testing/selftests/bpf/prog_tests/htab_update.c\",\n                        \"tools/testing/selftests/bpf/prog_tests/linked_list.c\",\n                        \"tools/testing/selftests/bpf/prog_tests/map_kptr.c\",\n                        \"tools/testing/selftests/bpf/prog_tests/refcounted_kptr.c\",\n                        \"tools/testing/selftests/bpf/progs/htab_update.c\",\n                        \"tools/testing/selftests/bpf/progs/linked_list.c\",\n                        \"tools/testing/selftests/bpf/progs/refcounted_kptr.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"5.19\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"5.19\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"7.1.5\",\n                            \"lessThanOrEqual\": \"7.1.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"7.2\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"severity":"HIGH"}],"references":["https://git.kernel.org/stable/c/9ea734e2cc0143d7429ab7dc0b20c85e5836183c","https://git.kernel.org/stable/c/a3a81d247651218e47153f2d2afd7aee236726fd"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-74314","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-74314","identifiers":["CVE-2026-74314"]},"retained":false,"historicalAffected":[]}],"coverage":[]}