{"id":"CVE-2022-49873","aliases":["CVE-2022-49873"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Fix wrong reg type conversion in release_reference()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix wrong reg type conversion in release_reference()\n\nSome helper functions will allocate memory. To avoid memory leaks, the\nverifier requires the eBPF program to release these memories by calling\nthe corresponding helper functions.\n\nWhen a resource is released, all pointer registers corresponding to the\nresource should be invalidated. The verifier use release_references() to\ndo this job, by apply  __mark_reg_unknown() to each relevant register.\n\nIt will give these registers the type of SCALAR_VALUE. A register that\nwill contain a pointer value at runtime, but of type SCALAR_VALUE, which\nmay allow the unprivileged user to get a kernel pointer by storing this\nregister into a map.\n\nUsing __mark_reg_not_init() while NOT allow_ptr_leaks can mitigate this\nproblem.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix wrong reg type conversion in release_reference()\n\nSome helper functions will allocate memory. To avoid memory leaks, the\nverifier requires the eBPF program to release these memories by calling\nthe corresponding helper functions.\n\nWhen a resource is released, all pointer registers corresponding to the\nresource should be invalidated. The verifier use release_references() to\ndo this job, by apply  __mark_reg_unknown() to each relevant register.\n\nIt will give these registers the type of SCALAR_VALUE. A register that\nwill contain a pointer value at runtime, but of type SCALAR_VALUE, which\nmay allow the unprivileged user to get a kernel pointer by storing this\nregister into a map.\n\nUsing __mark_reg_not_init() while NOT allow_ptr_leaks can mitigate this\nproblem.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf: Arreglar conversión de tipo de registro incorrecta en release_reference() Algunas funciones auxiliares asignarán memoria. Para evitar fugas de memoria, el verificador requiere que el programa eBPF libere estas memorias llamando a las funciones auxiliares correspondientes. Cuando se libera un recurso, todos los registros de puntero correspondientes al recurso deben invalidarse. El verificador usa release_references() para realizar este trabajo, aplicando __mark_reg_unknown() a cada registro relevante. Les dará a estos registros el tipo SCALAR_VALUE. Un registro que contendrá un valor de puntero en tiempo de ejecución, pero de tipo SCALAR_VALUE, puede permitir que el usuario sin privilegios obtenga un puntero del kernel almacenando este registro en un mapa. Usar __mark_reg_not_init() mientras NO allow_ptr_leaks puede mitigar este problema.","source":"nvd"}],"published":"2025-05-01T14:10:23.128Z","modified":"2026-06-17T05:19:22.900Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-704"],"affected":[{"ranges":[{"type":"git","introduced":"fd978bf7fd312581a7ca454a991f0ffb34c4204b","fixed":"cedd4f01f67be94735f15123158f485028571037","status":"affected"},{"type":"git","introduced":"fd978bf7fd312581a7ca454a991f0ffb34c4204b","fixed":"466ce46f251dfb259a8cbaa895ab9edd6fb56240","status":"affected"},{"type":"git","introduced":"fd978bf7fd312581a7ca454a991f0ffb34c4204b","fixed":"ae5ccad6c711db0f2ca1231be051935dd128b8f5","status":"affected"},{"type":"git","introduced":"fd978bf7fd312581a7ca454a991f0ffb34c4204b","fixed":"f1db20814af532f85e091231223e5e4818e8464b","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.20","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.20","status":"unaffected"},{"type":"semver","introduced":"5.10.155","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.79","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.9","lastAffected":"6.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.20","fixed":"5.10.155"},{"status":"affected","introduced":"5.11","fixed":"5.15.79"},{"status":"affected","introduced":"5.16","fixed":"6.0.9"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/cedd4f01f67be94735f15123158f485028571037","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/466ce46f251dfb259a8cbaa895ab9edd6fb56240","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ae5ccad6c711db0f2ca1231be051935dd128b8f5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f1db20814af532f85e091231223e5e4818e8464b","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-01T16:03:43.287Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49873","url":"https://www.cve.org/CVERecord?id=CVE-2022-49873","licence":"CVE Terms of Use","modified":"2026-05-11T19:08:23.688Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49873","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49873","licence":"Public domain","modified":"2026-06-17T05:19:22.900Z"}],"updatedAt":"2026-11-25T22:58:20.913Z","epss":{"score":0.00215,"percentile":0.12658,"date":"2026-12-01T12:00:22.000Z"}}