{"id":"CVE-2022-49878","published":"2025-05-01T14:10:26Z","modified":"2026-05-11T19:08:29Z","title":"bpf, verifier: Fix memory leak in array reallocation for stack state","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, verifier: Fix memory leak in array reallocation for stack state\n\nIf an error (NULL) is returned by krealloc(), callers of realloc_array()\nwere setting their allocation pointers to NULL, but on error krealloc()\ndoes not touch the original allocation. This would result in a memory\nresource leak. Instead, free the old allocation on the error handling\npath.\n\nThe memory leak information is as follows as also reported by Zhengchao:\n\n  unreferenced object 0xffff888019801800 (size 256):\n  comm \"bpf_repo\", pid 6490, jiffies 4294959200 (age 17.170s)\n  hex dump (first 32 bytes):\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\n  backtrace:\n    [<00000000b211474b>] __kmalloc_node_track_caller+0x45/0xc0\n    [<0000000086712a0b>] krealloc+0x83/0xd0\n    [<00000000139aab02>] realloc_array+0x82/0xe2\n    [<00000000b1ca41d1>] grow_stack_state+0xfb/0x186\n    [<00000000cd6f36d2>] check_mem_access.cold+0x141/0x1341\n    [<0000000081780455>] do_check_common+0x5358/0xb350\n    [<0000000015f6b091>] bpf_check.cold+0xc3/0x29d\n    [<000000002973c690>] bpf_prog_load+0x13db/0x2240\n    [<00000000028d1644>] __sys_bpf+0x1605/0x4ce0\n    [<00000000053f29bd>] __x64_sys_bpf+0x75/0xb0\n    [<0000000056fedaf5>] do_syscall_64+0x35/0x80\n    [<000000002bd58261>] entry_SYSCALL_64_after_hwframe+0x63/0xcd","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00203,"percentile":0.10123,"provenance":"source"},"cwes":[{"id":"CWE-401","name":"Missing Release of Memory after Effective Lifetime"}],"references":[{"url":"https://git.kernel.org/stable/c/06615967d4889b08b19ff3dda96e8b131282f73d","tags":[]},{"url":"https://git.kernel.org/stable/c/3e210891c4a4c2d858cd6f9f61d5809af251d4df","tags":[]},{"url":"https://git.kernel.org/stable/c/42378a9ca55347102bbf86708776061d8fe3ece2","tags":[]}],"priority":{"score":5.9,"factors":[{"name":"EPSS percentile","points":2.02},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= c69431aab67a912836e5831f03d99a819c14c9c3, < 06615967d4889b08b19ff3dda96e8b131282f73d",">= c69431aab67a912836e5831f03d99a819c14c9c3, < 3e210891c4a4c2d858cd6f9f61d5809af251d4df",">= c69431aab67a912836e5831f03d99a819c14c9c3, < 42378a9ca55347102bbf86708776061d8fe3ece2"]},{"vendor":"Linux","product":"Linux","versions":["5.14"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-10-01T16:02:47.368598Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-12886","exploited":false,"provenance":"source"}}