{"id":"CVE-2022-49205","aliases":["CVE-2022-49205"],"related":[],"kind":"vulnerability","state":"published","title":"bpf, sockmap: Fix double uncharge the mem of sk_msg","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Fix double uncharge the mem of sk_msg\n\nIf tcp_bpf_sendmsg is running during a tear down operation, psock may be\nfreed.\n\ntcp_bpf_sendmsg()\n tcp_bpf_send_verdict()\n  sk_msg_return()\n  tcp_bpf_sendmsg_redir()\n   unlikely(!psock))\n     sk_msg_free()\n\nThe mem of msg has been uncharged in tcp_bpf_send_verdict() by\nsk_msg_return(), and would be uncharged by sk_msg_free() again. When psock\nis null, we can simply returning an error code, this would then trigger\nthe sk_msg_free_nocharge in the error path of __SK_REDIRECT and would have\nthe side effect of throwing an error up to user space. This would be a\nslight change in behavior from user side but would look the same as an\nerror if the redirect on the socket threw an error.\n\nThis issue can cause the following info:\nWARNING: CPU: 0 PID: 2136 at net/ipv4/af_inet.c:155 inet_sock_destruct+0x13c/0x260\nCall Trace:\n <TASK>\n __sk_destruct+0x24/0x1f0\n sk_psock_destroy+0x19b/0x1c0\n process_one_work+0x1b3/0x3c0\n worker_thread+0x30/0x350\n ? process_one_work+0x3c0/0x3c0\n kthread+0xe6/0x110\n ? kthread_complete_and_exit+0x20/0x20\n ret_from_fork+0x22/0x30\n </TASK>","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Fix double uncharge the mem of sk_msg\n\nIf tcp_bpf_sendmsg is running during a tear down operation, psock may be\nfreed.\n\ntcp_bpf_sendmsg()\n tcp_bpf_send_verdict()\n  sk_msg_return()\n  tcp_bpf_sendmsg_redir()\n   unlikely(!psock))\n     sk_msg_free()\n\nThe mem of msg has been uncharged in tcp_bpf_send_verdict() by\nsk_msg_return(), and would be uncharged by sk_msg_free() again. When psock\nis null, we can simply returning an error code, this would then trigger\nthe sk_msg_free_nocharge in the error path of __SK_REDIRECT and would have\nthe side effect of throwing an error up to user space. This would be a\nslight change in behavior from user side but would look the same as an\nerror if the redirect on the socket threw an error.\n\nThis issue can cause the following info:\nWARNING: CPU: 0 PID: 2136 at net/ipv4/af_inet.c:155 inet_sock_destruct+0x13c/0x260\nCall Trace:\n <TASK>\n __sk_destruct+0x24/0x1f0\n sk_psock_destroy+0x19b/0x1c0\n process_one_work+0x1b3/0x3c0\n worker_thread+0x30/0x350\n ? process_one_work+0x3c0/0x3c0\n kthread+0xe6/0x110\n ? kthread_complete_and_exit+0x20/0x20\n ret_from_fork+0x22/0x30\n </TASK>","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf, sockmap: Se corrige la doble descarga de la memoria de sk_msg. Si tcp_bpf_sendmsg se está ejecutando durante una operación de desmantelamiento, psock puede liberarse. tcp_bpf_sendmsg() tcp_bpf_send_verdict() sk_msg_return() tcp_bpf_sendmsg_redir() Unlikely(!psock)) sk_msg_free() La memoria de msg ha sido descargada en tcp_bpf_send_verdict() por sk_msg_return(), y sería descargada nuevamente por sk_msg_free(). Cuando psock es nulo, podemos simplemente devolver un código de error, esto activaría sk_msg_free_nocharge en la ruta de error de __SK_REDIRECT y tendría el efecto secundario de arrojar un error al espacio del usuario. Esto sería un ligero cambio en el comportamiento del lado del usuario, pero se vería igual que un error si la redirección en el socket arrojara un error. Este problema puede causar la siguiente información: ADVERTENCIA: CPU: 0 PID: 2136 en net/ipv4/af_inet.c:155 inet_sock_destruct+0x13c/0x260 Seguimiento de llamadas:  __sk_destruct+0x24/0x1f0 sk_psock_destroy+0x19b/0x1c0 process_one_work+0x1b3/0x3c0 worker_thread+0x30/0x350 ? process_one_work+0x3c0/0x3c0 kthread+0xe6/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30","source":"nvd"}],"published":"2025-02-26T01:55:45.177Z","modified":"2026-06-17T05:17:22.663Z","severity":{"scorer":"NVD","scheme":"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,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"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,"rating":"HIGH"}],"cwes":["CWE-415"],"affected":[{"ranges":[{"type":"git","introduced":"604326b41a6fb9b4a78b6179335decee0365cd8c","fixed":"94c6ac22abcdede72bfaa0f4c22fb370891f4002","status":"affected"},{"type":"git","introduced":"604326b41a6fb9b4a78b6179335decee0365cd8c","fixed":"cd84ea3920aef936c559b63099ef0013ce6b2325","status":"affected"},{"type":"git","introduced":"604326b41a6fb9b4a78b6179335decee0365cd8c","fixed":"cb6f141ae705af0101e819065a79e6d029f6e393","status":"affected"},{"type":"git","introduced":"604326b41a6fb9b4a78b6179335decee0365cd8c","fixed":"223f3c51ab163852dd4819d357dcf33039929434","status":"affected"},{"type":"git","introduced":"604326b41a6fb9b4a78b6179335decee0365cd8c","fixed":"ac3ecb7760c750c8e4fc09c719241d8e6e88028c","status":"affected"},{"type":"git","introduced":"604326b41a6fb9b4a78b6179335decee0365cd8c","fixed":"2486ab434b2c2a14e9237296db00b1e1b7ae3273","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.4.189","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.110","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.33","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.16.19","lastAffected":"5.16.*","status":"unaffected"},{"type":"semver","introduced":"5.17.2","lastAffected":"5.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.18","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.4.189"},{"status":"affected","introduced":"5.5","fixed":"5.10.110"},{"status":"affected","introduced":"5.11","fixed":"5.15.33"},{"status":"affected","introduced":"5.16","fixed":"5.16.19"},{"status":"affected","introduced":"5.17","fixed":"5.17.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/94c6ac22abcdede72bfaa0f4c22fb370891f4002","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cd84ea3920aef936c559b63099ef0013ce6b2325","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cb6f141ae705af0101e819065a79e6d029f6e393","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/223f3c51ab163852dd4819d357dcf33039929434","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ac3ecb7760c750c8e4fc09c719241d8e6e88028c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2486ab434b2c2a14e9237296db00b1e1b7ae3273","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49205","url":"https://www.cve.org/CVERecord?id=CVE-2022-49205","licence":"CVE Terms of Use","modified":"2026-05-11T18:55:10.763Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49205","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49205","licence":"Public domain","modified":"2026-06-17T05:17:22.663Z"}],"updatedAt":"2026-11-25T22:58:20.283Z","epss":{"score":0.00284,"percentile":0.22464,"date":"2026-12-02T12:00:21.000Z"}}