{"id":"CVE-2022-50536","aliases":["CVE-2022-50536"],"related":[],"kind":"vulnerability","state":"published","title":"bpf, sockmap: Fix repeated calls to sock_put() when msg has more_data","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Fix repeated calls to sock_put() when msg has more_data\n\nIn tcp_bpf_send_verdict() redirection, the eval variable is assigned to\n__SK_REDIRECT after the apply_bytes data is sent, if msg has more_data,\nsock_put() will be called multiple times.\n\nWe should reset the eval variable to __SK_NONE every time more_data\nstarts.\n\nThis causes:\n\nIPv4: Attempt to release TCP socket in state 1 00000000b4c925d7\n------------[ cut here ]------------\nrefcount_t: addition on 0; use-after-free.\nWARNING: CPU: 5 PID: 4482 at lib/refcount.c:25 refcount_warn_saturate+0x7d/0x110\nModules linked in:\nCPU: 5 PID: 4482 Comm: sockhash_bypass Kdump: loaded Not tainted 6.0.0 #1\nHardware name: Red Hat KVM, BIOS 1.11.0-2.el7 04/01/2014\nCall Trace:\n <TASK>\n __tcp_transmit_skb+0xa1b/0xb90\n ? __alloc_skb+0x8c/0x1a0\n ? __kmalloc_node_track_caller+0x184/0x320\n tcp_write_xmit+0x22a/0x1110\n __tcp_push_pending_frames+0x32/0xf0\n do_tcp_sendpages+0x62d/0x640\n tcp_bpf_push+0xae/0x2c0\n tcp_bpf_sendmsg_redir+0x260/0x410\n ? preempt_count_add+0x70/0xa0\n tcp_bpf_send_verdict+0x386/0x4b0\n tcp_bpf_sendmsg+0x21b/0x3b0\n sock_sendmsg+0x58/0x70\n __sys_sendto+0xfa/0x170\n ? xfd_validate_state+0x1d/0x80\n ? switch_fpu_return+0x59/0xe0\n __x64_sys_sendto+0x24/0x30\n do_syscall_64+0x37/0x90\n entry_SYSCALL_64_after_hwframe+0x63/0xcd","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Fix repeated calls to sock_put() when msg has more_data\n\nIn tcp_bpf_send_verdict() redirection, the eval variable is assigned to\n__SK_REDIRECT after the apply_bytes data is sent, if msg has more_data,\nsock_put() will be called multiple times.\n\nWe should reset the eval variable to __SK_NONE every time more_data\nstarts.\n\nThis causes:\n\nIPv4: Attempt to release TCP socket in state 1 00000000b4c925d7\n------------[ cut here ]------------\nrefcount_t: addition on 0; use-after-free.\nWARNING: CPU: 5 PID: 4482 at lib/refcount.c:25 refcount_warn_saturate+0x7d/0x110\nModules linked in:\nCPU: 5 PID: 4482 Comm: sockhash_bypass Kdump: loaded Not tainted 6.0.0 #1\nHardware name: Red Hat KVM, BIOS 1.11.0-2.el7 04/01/2014\nCall Trace:\n <TASK>\n __tcp_transmit_skb+0xa1b/0xb90\n ? __alloc_skb+0x8c/0x1a0\n ? __kmalloc_node_track_caller+0x184/0x320\n tcp_write_xmit+0x22a/0x1110\n __tcp_push_pending_frames+0x32/0xf0\n do_tcp_sendpages+0x62d/0x640\n tcp_bpf_push+0xae/0x2c0\n tcp_bpf_sendmsg_redir+0x260/0x410\n ? preempt_count_add+0x70/0xa0\n tcp_bpf_send_verdict+0x386/0x4b0\n tcp_bpf_sendmsg+0x21b/0x3b0\n sock_sendmsg+0x58/0x70\n __sys_sendto+0xfa/0x170\n ? xfd_validate_state+0x1d/0x80\n ? switch_fpu_return+0x59/0xe0\n __x64_sys_sendto+0x24/0x30\n do_syscall_64+0x37/0x90\n entry_SYSCALL_64_after_hwframe+0x63/0xcd","source":"cvelist"}],"published":"2025-10-07T15:21:03.056Z","modified":"2026-08-05T08:59:05.133Z","severity":{"scorer":"Linux","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":"Linux","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"},{"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":"5f0bfe21c853917aae4bc5a70fe57ddb4054443e","fixed":"7508b9f4daac4ec7dfe0b6fb2d688b1c1c105e10","status":"affected"},{"type":"git","introduced":"15dec6d8f8642a26d6a272af2d7f9877df8f02b8","fixed":"28e4a763cd4a2b1a78852216ef4bd7df3a05cec6","status":"affected"},{"type":"git","introduced":"cd9733f5d75c94a32544d6ce5be47e14194cf137","fixed":"8786bde11a4f31b63b3036731df0b47337a7a245","status":"affected"},{"type":"git","introduced":"cd9733f5d75c94a32544d6ce5be47e14194cf137","fixed":"578a7628b838a3ac8ad61deaab5a816ff032ac13","status":"affected"},{"type":"git","introduced":"cd9733f5d75c94a32544d6ce5be47e14194cf137","fixed":"113236e8f49f262f318c00ebb14b15f4834e87c1","status":"affected"},{"type":"git","introduced":"cd9733f5d75c94a32544d6ce5be47e14194cf137","fixed":"7a9841ca025275b5b0edfb0b618934abb6ceec15","status":"affected"},{"type":"git","version":"6f226ffe4458ea3b8c33287cb8c86f87dc198dce","status":"affected"},{"type":"semver","introduced":"5.4.157","fixed":"5.4.229","status":"affected"},{"type":"semver","introduced":"5.10.77","fixed":"5.10.163","status":"affected"},{"type":"semver","introduced":"5.14.16","fixed":"5.15","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"5.4.229","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.163","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.86","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.16","lastAffected":"6.0.*","status":"unaffected"},{"type":"semver","introduced":"6.1.2","lastAffected":"6.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.2","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":"5.4.157","fixed":"5.4.229"},{"status":"affected","introduced":"5.10.77","fixed":"5.10.163"},{"status":"affected","introduced":"5.14.16","fixed":"5.15"},{"status":"affected","introduced":"5.15.1","fixed":"5.15.86"},{"status":"affected","introduced":"5.16","fixed":"6.0.16"},{"status":"affected","introduced":"6.1","fixed":"6.1.2"},{"status":"affected","version":"5.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/7508b9f4daac4ec7dfe0b6fb2d688b1c1c105e10","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/28e4a763cd4a2b1a78852216ef4bd7df3a05cec6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8786bde11a4f31b63b3036731df0b47337a7a245","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/578a7628b838a3ac8ad61deaab5a816ff032ac13","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/113236e8f49f262f318c00ebb14b15f4834e87c1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7a9841ca025275b5b0edfb0b618934abb6ceec15","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50536","url":"https://www.cve.org/CVERecord?id=CVE-2022-50536","licence":"CVE Terms of Use","modified":"2026-08-05T08:59:05.133Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50536","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50536","licence":"Public domain","modified":"2026-08-04T10:18:19.070Z"}],"updatedAt":"2026-11-25T22:58:21.262Z","epss":{"score":0.00172,"percentile":0.06879,"date":"2026-12-01T12:00:22.000Z"}}