{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-49878","id":"CVE-2022-49878","title":"bpf, verifier: Fix memory leak in array reallocation for stack state","description":"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 allocatio","descriptionLong":"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","published":"2025-05-01T14:10:26.389Z","updated":"2026-10-28T02:30:24.748540120Z","reserved":"2025-05-01T14:05:17.239Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"CISA-ADP"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c69431aab67a912836e5831f03d99a819c14c9c3","lessThan":"06615967d4889b08b19ff3dda96e8b131282f73d","status":"affected","versionType":"git"},{"version":"c69431aab67a912836e5831f03d99a819c14c9c3","lessThan":"3e210891c4a4c2d858cd6f9f61d5809af251d4df","status":"affected","versionType":"git"},{"version":"c69431aab67a912836e5831f03d99a819c14c9c3","lessThan":"42378a9ca55347102bbf86708776061d8fe3ece2","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","lessThan":"5.14","status":"unaffected","versionType":"semver"},{"version":"5.15.79","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.0.9","lessThanOrEqual":"6.0.*","status":"unaffected","versionType":"semver"},{"version":"6.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-401"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/06615967d4889b08b19ff3dda96e8b131282f73d","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/3e210891c4a4c2d858cd6f9f61d5809af251d4df","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/42378a9ca55347102bbf86708776061d8fe3ece2","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49878.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49878","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00199,"epssPercentile":0.0987,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-49878","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49878","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-49878","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-49878","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}