CVE-2023-52523 (GCVE-0-2023-52523)

Vulnerability from cvelistv5 – Published: 2024-03-02 21:52 – Updated: 2026-08-05 09:10
VLAI
Title
bpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets
Summary
In the Linux kernel, the following vulnerability has been resolved: bpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets With a SOCKMAP/SOCKHASH map and an sk_msg program user can steer messages sent from one TCP socket (s1) to actually egress from another TCP socket (s2): tcp_bpf_sendmsg(s1) // = sk_prot->sendmsg tcp_bpf_send_verdict(s1) // __SK_REDIRECT case tcp_bpf_sendmsg_redir(s2) tcp_bpf_push_locked(s2) tcp_bpf_push(s2) tcp_rate_check_app_limited(s2) // expects tcp_sock tcp_sendmsg_locked(s2) // ditto There is a hard-coded assumption in the call-chain, that the egress socket (s2) is a TCP socket. However in commit 122e6c79efe1 ("sock_map: Update sock type checks for UDP") we have enabled redirects to non-TCP sockets. This was done for the sake of BPF sk_skb programs. There was no indention to support sk_msg send-to-egress use case. As a result, attempts to send-to-egress through a non-TCP socket lead to a crash due to invalid downcast from sock to tcp_sock: BUG: kernel NULL pointer dereference, address: 000000000000002f ... Call Trace: <TASK> ? show_regs+0x60/0x70 ? __die+0x1f/0x70 ? page_fault_oops+0x80/0x160 ? do_user_addr_fault+0x2d7/0x800 ? rcu_is_watching+0x11/0x50 ? exc_page_fault+0x70/0x1c0 ? asm_exc_page_fault+0x27/0x30 ? tcp_tso_segs+0x14/0xa0 tcp_write_xmit+0x67/0xce0 __tcp_push_pending_frames+0x32/0xf0 tcp_push+0x107/0x140 tcp_sendmsg_locked+0x99f/0xbb0 tcp_bpf_push+0x19d/0x3a0 tcp_bpf_sendmsg_redir+0x55/0xd0 tcp_bpf_send_verdict+0x407/0x550 tcp_bpf_sendmsg+0x1a1/0x390 inet_sendmsg+0x6a/0x70 sock_sendmsg+0x9d/0xc0 ? sockfd_lookup_light+0x12/0x80 __sys_sendto+0x10e/0x160 ? syscall_enter_from_user_mode+0x20/0x60 ? __this_cpu_preempt_check+0x13/0x20 ? lockdep_hardirqs_on+0x82/0x110 __x64_sys_sendto+0x1f/0x30 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Reject selecting a non-TCP sockets as redirect target from a BPF sk_msg program to prevent the crash. When attempted, user will receive an EACCES error from send/sendto/sendmsg() syscall.
SSVC
Exploitation: none Automatable: no Technical Impact: partial
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2024-03-04 15:32 UTC
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 122e6c79efe1c25816118aca9cfabe54e99c2432 , < bc8b89b6963803a123f64aa9494155a037b3d728 (git)
Affected: 122e6c79efe1c25816118aca9cfabe54e99c2432 , < b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2 (git)
Affected: 122e6c79efe1c25816118aca9cfabe54e99c2432 , < ded6e448028f0f91b6af35985afca01fa02a9089 (git)
Affected: 122e6c79efe1c25816118aca9cfabe54e99c2432 , < b80e31baa43614e086a9d29dc1151932b1bd7fc5 (git)
guessed Create a notification for this product.
Linux Linux Affected: 5.13
Unaffected: 0 , < 5.13 (semver)
Unaffected: 5.15.135 , ≤ 5.15.* (semver)
Unaffected: 6.1.57 , ≤ 6.1.* (semver)
Unaffected: 6.5.7 , ≤ 6.5.* (semver)
Unaffected: 6.6 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-52523",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-03-04T15:32:59.403562Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:22:46.142Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T23:03:20.665Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/bc8b89b6963803a123f64aa9494155a037b3d728"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/ded6e448028f0f91b6af35985afca01fa02a9089"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b80e31baa43614e086a9d29dc1151932b1bd7fc5"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/core/sock_map.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "bc8b89b6963803a123f64aa9494155a037b3d728",
              "status": "affected",
              "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
              "versionType": "git"
            },
            {
              "lessThan": "b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2",
              "status": "affected",
              "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
              "versionType": "git"
            },
            {
              "lessThan": "ded6e448028f0f91b6af35985afca01fa02a9089",
              "status": "affected",
              "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
              "versionType": "git"
            },
            {
              "lessThan": "b80e31baa43614e086a9d29dc1151932b1bd7fc5",
              "status": "affected",
              "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/core/sock_map.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.13"
            },
            {
              "lessThan": "5.13",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.135",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.57",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.5.*",
              "status": "unaffected",
              "version": "6.5.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.6",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.135",
                  "versionStartIncluding": "5.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.57",
                  "versionStartIncluding": "5.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.5.7",
                  "versionStartIncluding": "5.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6",
                  "versionStartIncluding": "5.13",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets\n\nWith a SOCKMAP/SOCKHASH map and an sk_msg program user can steer messages\nsent from one TCP socket (s1) to actually egress from another TCP\nsocket (s2):\n\ntcp_bpf_sendmsg(s1)\t\t// = sk_prot-\u003esendmsg\n  tcp_bpf_send_verdict(s1)\t// __SK_REDIRECT case\n    tcp_bpf_sendmsg_redir(s2)\n      tcp_bpf_push_locked(s2)\n\ttcp_bpf_push(s2)\n\t  tcp_rate_check_app_limited(s2) // expects tcp_sock\n\t  tcp_sendmsg_locked(s2)\t // ditto\n\nThere is a hard-coded assumption in the call-chain, that the egress\nsocket (s2) is a TCP socket.\n\nHowever in commit 122e6c79efe1 (\"sock_map: Update sock type checks for\nUDP\") we have enabled redirects to non-TCP sockets. This was done for the\nsake of BPF sk_skb programs. There was no indention to support sk_msg\nsend-to-egress use case.\n\nAs a result, attempts to send-to-egress through a non-TCP socket lead to a\ncrash due to invalid downcast from sock to tcp_sock:\n\n BUG: kernel NULL pointer dereference, address: 000000000000002f\n ...\n Call Trace:\n  \u003cTASK\u003e\n  ? show_regs+0x60/0x70\n  ? __die+0x1f/0x70\n  ? page_fault_oops+0x80/0x160\n  ? do_user_addr_fault+0x2d7/0x800\n  ? rcu_is_watching+0x11/0x50\n  ? exc_page_fault+0x70/0x1c0\n  ? asm_exc_page_fault+0x27/0x30\n  ? tcp_tso_segs+0x14/0xa0\n  tcp_write_xmit+0x67/0xce0\n  __tcp_push_pending_frames+0x32/0xf0\n  tcp_push+0x107/0x140\n  tcp_sendmsg_locked+0x99f/0xbb0\n  tcp_bpf_push+0x19d/0x3a0\n  tcp_bpf_sendmsg_redir+0x55/0xd0\n  tcp_bpf_send_verdict+0x407/0x550\n  tcp_bpf_sendmsg+0x1a1/0x390\n  inet_sendmsg+0x6a/0x70\n  sock_sendmsg+0x9d/0xc0\n  ? sockfd_lookup_light+0x12/0x80\n  __sys_sendto+0x10e/0x160\n  ? syscall_enter_from_user_mode+0x20/0x60\n  ? __this_cpu_preempt_check+0x13/0x20\n  ? lockdep_hardirqs_on+0x82/0x110\n  __x64_sys_sendto+0x1f/0x30\n  do_syscall_64+0x38/0x90\n  entry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nReject selecting a non-TCP sockets as redirect target from a BPF sk_msg\nprogram to prevent the crash. When attempted, user will receive an EACCES\nerror from send/sendto/sendmsg() syscall."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - Exploitation requires local bpf() setup of a SOCKMAP/SOCKHASH with an sk_msg verdict program plus send/sendto/sendmsg on a sockmap-enrolled TCP socket; the crash path is the local tcp_bpf_sendmsg \u2192 tcp_bpf_sendmsg_redir chain, not remote packet processing.\nAC:L - The attacker fully controls map population (TCP source and non-TCP redirect target), the sk_msg redirect verdict, and the triggering sendmsg; the type confusion is deterministic and needs no race or uncontrolled layout.\nPR:L - SOCKMAP/sk_msg creation needs CAP_NET_ADMIN/CAP_BPF, but those are commonly held by networking containers and can be delegated via BPF tokens; once a sockmap sk_msg redirect path exists, the send trigger is an ordinary local operation, matching other sockmap scores.\nUI:N - The attacker performs map setup, program attach, and the triggering sendmsg themselves; no victim action is required.\nS:U - The type confusion and resulting heap OOB/crash remain inside the host kernel\u2019s security authority; this is standard local kernel impact, not a VM/IOMMU/sandbox boundary crossing.\nC:H - tcp_bpf_push runs tcp_rate_check_app_limited() on the non-TCP target, reading tcp_sock fields (e.g. write_seq/mss_cache/delivered at offsets \u22651480) past udp_sock (1344) or unix_sock (1152), i.e. heap OOB reads of adjacent groomable objects.\nI:H - The same path writes tp-\u003eapp_limited at offset 1780 past the smaller socket object (heap OOB write), and treating a non-TCP sock as tcp_sock is type confusion, which is High integrity impact under scoring guidance.\nA:H - The demonstrated result is a kernel NULL pointer dereference in tcp_tso_segs (icsk_ca_ops) reached via tcp_sendmsg_locked, causing an oops/panic that the attacker can repeat at will."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T09:10:23.650Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/bc8b89b6963803a123f64aa9494155a037b3d728"
        },
        {
          "url": "https://git.kernel.org/stable/c/b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2"
        },
        {
          "url": "https://git.kernel.org/stable/c/ded6e448028f0f91b6af35985afca01fa02a9089"
        },
        {
          "url": "https://git.kernel.org/stable/c/b80e31baa43614e086a9d29dc1151932b1bd7fc5"
        }
      ],
      "title": "bpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-52523",
    "datePublished": "2024-03-02T21:52:30.351Z",
    "dateReserved": "2024-02-20T12:30:33.317Z",
    "dateUpdated": "2026-08-05T09:10:23.650Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2023-52523",
      "date": "2026-09-25",
      "epss": "0.00236",
      "percentile": "0.13041"
    },
    "fkie_nvd": {
      "configurations": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "0988674C-BFC5-4018-840B-F6E3C9B45A62",
                  "versionEndExcluding": "5.15.135",
                  "versionStartIncluding": "5.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "8629E5D1-351D-4D4B-8D05-E10BD4A1CFD0",
                  "versionEndExcluding": "6.1.57",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "830A824C-F212-4FDC-ADEF-0EBEC6B2365B",
                  "versionEndExcluding": "6.5.7",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:6.6:rc1:*:*:*:*:*:*",
                  "matchCriteriaId": "84267A4F-DBC2-444F-B41D-69E15E1BEC97",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:6.6:rc2:*:*:*:*:*:*",
                  "matchCriteriaId": "FB440208-241C-4246-9A83-C1715C0DAA6C",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:6.6:rc3:*:*:*:*:*:*",
                  "matchCriteriaId": "0DC421F1-3D5A-4BEF-BF76-4E468985D20B",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:6.6:rc4:*:*:*:*:*:*",
                  "matchCriteriaId": "00AB783B-BE05-40E8-9A55-6AA457D95031",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets\n\nWith a SOCKMAP/SOCKHASH map and an sk_msg program user can steer messages\nsent from one TCP socket (s1) to actually egress from another TCP\nsocket (s2):\n\ntcp_bpf_sendmsg(s1)\t\t// = sk_prot-\u003esendmsg\n  tcp_bpf_send_verdict(s1)\t// __SK_REDIRECT case\n    tcp_bpf_sendmsg_redir(s2)\n      tcp_bpf_push_locked(s2)\n\ttcp_bpf_push(s2)\n\t  tcp_rate_check_app_limited(s2) // expects tcp_sock\n\t  tcp_sendmsg_locked(s2)\t // ditto\n\nThere is a hard-coded assumption in the call-chain, that the egress\nsocket (s2) is a TCP socket.\n\nHowever in commit 122e6c79efe1 (\"sock_map: Update sock type checks for\nUDP\") we have enabled redirects to non-TCP sockets. This was done for the\nsake of BPF sk_skb programs. There was no indention to support sk_msg\nsend-to-egress use case.\n\nAs a result, attempts to send-to-egress through a non-TCP socket lead to a\ncrash due to invalid downcast from sock to tcp_sock:\n\n BUG: kernel NULL pointer dereference, address: 000000000000002f\n ...\n Call Trace:\n  \u003cTASK\u003e\n  ? show_regs+0x60/0x70\n  ? __die+0x1f/0x70\n  ? page_fault_oops+0x80/0x160\n  ? do_user_addr_fault+0x2d7/0x800\n  ? rcu_is_watching+0x11/0x50\n  ? exc_page_fault+0x70/0x1c0\n  ? asm_exc_page_fault+0x27/0x30\n  ? tcp_tso_segs+0x14/0xa0\n  tcp_write_xmit+0x67/0xce0\n  __tcp_push_pending_frames+0x32/0xf0\n  tcp_push+0x107/0x140\n  tcp_sendmsg_locked+0x99f/0xbb0\n  tcp_bpf_push+0x19d/0x3a0\n  tcp_bpf_sendmsg_redir+0x55/0xd0\n  tcp_bpf_send_verdict+0x407/0x550\n  tcp_bpf_sendmsg+0x1a1/0x390\n  inet_sendmsg+0x6a/0x70\n  sock_sendmsg+0x9d/0xc0\n  ? sockfd_lookup_light+0x12/0x80\n  __sys_sendto+0x10e/0x160\n  ? syscall_enter_from_user_mode+0x20/0x60\n  ? __this_cpu_preempt_check+0x13/0x20\n  ? lockdep_hardirqs_on+0x82/0x110\n  __x64_sys_sendto+0x1f/0x30\n  do_syscall_64+0x38/0x90\n  entry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nReject selecting a non-TCP sockets as redirect target from a BPF sk_msg\nprogram to prevent the crash. When attempted, user will receive an EACCES\nerror from send/sendto/sendmsg() syscall."
        },
        {
          "lang": "es",
          "value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf, sockmap: rechaza las redirecciones de salida de sk_msg a sockets que no son TCP. Con un mapa SOCKMAP/SOCKHASH y un programa sk_msg, el usuario puede dirigir los mensajes enviados desde un socket TCP (s1) para que realmente salgan desde otro socket TCP (s2): tcp_bpf_sendmsg(s1) // = sk_prot-\u0026gt;sendmsg tcp_bpf_send_verdict(s1) // __SK_REDIRECT caso tcp_bpf_sendmsg_redir(s2) tcp_bpf_push_locked(s2) tcp_bpf_push(s2) tcp_rate_check_ app_limited(s2) // espera tcp_sock tcp_sendmsg_locked(s2 ) // \u00eddem Hay una suposici\u00f3n codificada en la cadena de llamadas de que el socket de salida (s2) es un socket TCP. Sin embargo, en el commit 122e6c79efe1 (\"sock_map: Actualizar comprobaciones de tipo de calcet\u00edn para UDP\") hemos habilitado redirecciones a sockets que no son TCP. Esto se hizo por el bien de los programas BPF sk_skb. No hab\u00eda ninguna sangr\u00eda para admitir el caso de uso de env\u00edo a salida de sk_msg. Como resultado, los intentos de env\u00edo a salida a trav\u00e9s de un socket que no es TCP provocan un bloqueo debido a una conversi\u00f3n no v\u00e1lida de sock a tcp_sock: ERROR: desreferencia del puntero NULL del n\u00facleo, direcci\u00f3n: 0000000000000002f... Seguimiento de llamadas: . mostrar_regs+0x60/0x70? __die+0x1f/0x70 ? page_fault_oops+0x80/0x160? do_user_addr_fault+0x2d7/0x800? rcu_is_watching+0x11/0x50? exc_page_fault+0x70/0x1c0? asm_exc_page_fault+0x27/0x30? tcp_tso_segs+0x14/0xa0 tcp_write_xmit+0x67/0xce0 __tcp_push_pending_frames+0x32/0xf0 tcp_push+0x107/0x140 tcp_sendmsg_locked+0x99f/0xbb0 tcp_bpf_push+0x19d/0x3a0 tcp_bpf_sendmsg_redir+0x55/0xd0 tcp_bpf_send_verdict+0x407/0x550 tcp_bpf_sendmsg+0x1a1/0x390 inet_sendmsg+0x6a/0x70 sock_sendmsg+0x9d/0xc0? sockfd_lookup_light+0x12/0x80 __sys_sendto+0x10e/0x160 ? syscall_enter_from_user_mode+0x20/0x60? __this_cpu_preempt_check+0x13/0x20? lockdep_hardirqs_on+0x82/0x110 __x64_sys_sendto+0x1f/0x30 do_syscall_64+0x38/0x90 Entry_SYSCALL_64_after_hwframe+0x63/0xcd Rechace la selecci\u00f3n de sockets que no sean TCP como destino de redireccionamiento desde un programa BPF sk_msg para evitar el bloqueo. Cuando lo intente, el usuario recibir\u00e1 un error EACCES de la llamada al sistema send/sendto/sendmsg()."
        }
      ],
      "id": "CVE-2023-52523",
      "lastModified": "2025-01-13T19:57:06.317",
      "metrics": {
        "cvssMetricV31": [
          {
            "cvssData": {
              "attackComplexity": "LOW",
              "attackVector": "LOCAL",
              "availabilityImpact": "HIGH",
              "baseScore": 5.5,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "NONE",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
              "version": "3.1"
            },
            "exploitabilityScore": 1.8,
            "impactScore": 3.6,
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ]
      },
      "published": "2024-03-02T22:15:48.213",
      "references": [
        {
          "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/b80e31baa43614e086a9d29dc1151932b1bd7fc5"
        },
        {
          "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2"
        },
        {
          "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/bc8b89b6963803a123f64aa9494155a037b3d728"
        },
        {
          "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/ded6e448028f0f91b6af35985afca01fa02a9089"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/b80e31baa43614e086a9d29dc1151932b1bd7fc5"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/bc8b89b6963803a123f64aa9494155a037b3d728"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/ded6e448028f0f91b6af35985afca01fa02a9089"
        }
      ],
      "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "vulnStatus": "Analyzed",
      "weaknesses": [
        {
          "description": [
            {
              "lang": "en",
              "value": "CWE-476"
            }
          ],
          "source": "nvd@nist.gov",
          "type": "Primary"
        }
      ]
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "net/core/sock_map.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "bc8b89b6963803a123f64aa9494155a037b3d728",
                    "status": "affected",
                    "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2",
                    "status": "affected",
                    "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "ded6e448028f0f91b6af35985afca01fa02a9089",
                    "status": "affected",
                    "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "b80e31baa43614e086a9d29dc1151932b1bd7fc5",
                    "status": "affected",
                    "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "net/core/sock_map.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "5.13"
                  },
                  {
                    "lessThan": "5.13",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "5.15.*",
                    "status": "unaffected",
                    "version": "5.15.135",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.1.*",
                    "status": "unaffected",
                    "version": "6.1.57",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.5.*",
                    "status": "unaffected",
                    "version": "6.5.7",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.6",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "configurations": [
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "0988674C-BFC5-4018-840B-F6E3C9B45A62",
                    "versionEndExcluding": "5.15.135",
                    "versionStartIncluding": "5.13",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "8629E5D1-351D-4D4B-8D05-E10BD4A1CFD0",
                    "versionEndExcluding": "6.1.57",
                    "versionStartIncluding": "5.16",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "830A824C-F212-4FDC-ADEF-0EBEC6B2365B",
                    "versionEndExcluding": "6.5.7",
                    "versionStartIncluding": "6.2",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.6:rc1:*:*:*:*:*:*",
                    "matchCriteriaId": "84267A4F-DBC2-444F-B41D-69E15E1BEC97",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.6:rc2:*:*:*:*:*:*",
                    "matchCriteriaId": "FB440208-241C-4246-9A83-C1715C0DAA6C",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.6:rc3:*:*:*:*:*:*",
                    "matchCriteriaId": "0DC421F1-3D5A-4BEF-BF76-4E468985D20B",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.6:rc4:*:*:*:*:*:*",
                    "matchCriteriaId": "00AB783B-BE05-40E8-9A55-6AA457D95031",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets\n\nWith a SOCKMAP/SOCKHASH map and an sk_msg program user can steer messages\nsent from one TCP socket (s1) to actually egress from another TCP\nsocket (s2):\n\ntcp_bpf_sendmsg(s1)\t\t// = sk_prot-\u003esendmsg\n  tcp_bpf_send_verdict(s1)\t// __SK_REDIRECT case\n    tcp_bpf_sendmsg_redir(s2)\n      tcp_bpf_push_locked(s2)\n\ttcp_bpf_push(s2)\n\t  tcp_rate_check_app_limited(s2) // expects tcp_sock\n\t  tcp_sendmsg_locked(s2)\t // ditto\n\nThere is a hard-coded assumption in the call-chain, that the egress\nsocket (s2) is a TCP socket.\n\nHowever in commit 122e6c79efe1 (\"sock_map: Update sock type checks for\nUDP\") we have enabled redirects to non-TCP sockets. This was done for the\nsake of BPF sk_skb programs. There was no indention to support sk_msg\nsend-to-egress use case.\n\nAs a result, attempts to send-to-egress through a non-TCP socket lead to a\ncrash due to invalid downcast from sock to tcp_sock:\n\n BUG: kernel NULL pointer dereference, address: 000000000000002f\n ...\n Call Trace:\n  \u003cTASK\u003e\n  ? show_regs+0x60/0x70\n  ? __die+0x1f/0x70\n  ? page_fault_oops+0x80/0x160\n  ? do_user_addr_fault+0x2d7/0x800\n  ? rcu_is_watching+0x11/0x50\n  ? exc_page_fault+0x70/0x1c0\n  ? asm_exc_page_fault+0x27/0x30\n  ? tcp_tso_segs+0x14/0xa0\n  tcp_write_xmit+0x67/0xce0\n  __tcp_push_pending_frames+0x32/0xf0\n  tcp_push+0x107/0x140\n  tcp_sendmsg_locked+0x99f/0xbb0\n  tcp_bpf_push+0x19d/0x3a0\n  tcp_bpf_sendmsg_redir+0x55/0xd0\n  tcp_bpf_send_verdict+0x407/0x550\n  tcp_bpf_sendmsg+0x1a1/0x390\n  inet_sendmsg+0x6a/0x70\n  sock_sendmsg+0x9d/0xc0\n  ? sockfd_lookup_light+0x12/0x80\n  __sys_sendto+0x10e/0x160\n  ? syscall_enter_from_user_mode+0x20/0x60\n  ? __this_cpu_preempt_check+0x13/0x20\n  ? lockdep_hardirqs_on+0x82/0x110\n  __x64_sys_sendto+0x1f/0x30\n  do_syscall_64+0x38/0x90\n  entry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nReject selecting a non-TCP sockets as redirect target from a BPF sk_msg\nprogram to prevent the crash. When attempted, user will receive an EACCES\nerror from send/sendto/sendmsg() syscall."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf, sockmap: rechaza las redirecciones de salida de sk_msg a sockets que no son TCP. Con un mapa SOCKMAP/SOCKHASH y un programa sk_msg, el usuario puede dirigir los mensajes enviados desde un socket TCP (s1) para que realmente salgan desde otro socket TCP (s2): tcp_bpf_sendmsg(s1) // = sk_prot-\u0026gt;sendmsg tcp_bpf_send_verdict(s1) // __SK_REDIRECT caso tcp_bpf_sendmsg_redir(s2) tcp_bpf_push_locked(s2) tcp_bpf_push(s2) tcp_rate_check_ app_limited(s2) // espera tcp_sock tcp_sendmsg_locked(s2 ) // \u00eddem Hay una suposici\u00f3n codificada en la cadena de llamadas de que el socket de salida (s2) es un socket TCP. Sin embargo, en el commit 122e6c79efe1 (\"sock_map: Actualizar comprobaciones de tipo de calcet\u00edn para UDP\") hemos habilitado redirecciones a sockets que no son TCP. Esto se hizo por el bien de los programas BPF sk_skb. No hab\u00eda ninguna sangr\u00eda para admitir el caso de uso de env\u00edo a salida de sk_msg. Como resultado, los intentos de env\u00edo a salida a trav\u00e9s de un socket que no es TCP provocan un bloqueo debido a una conversi\u00f3n no v\u00e1lida de sock a tcp_sock: ERROR: desreferencia del puntero NULL del n\u00facleo, direcci\u00f3n: 0000000000000002f... Seguimiento de llamadas: . mostrar_regs+0x60/0x70? __die+0x1f/0x70 ? page_fault_oops+0x80/0x160? do_user_addr_fault+0x2d7/0x800? rcu_is_watching+0x11/0x50? exc_page_fault+0x70/0x1c0? asm_exc_page_fault+0x27/0x30? tcp_tso_segs+0x14/0xa0 tcp_write_xmit+0x67/0xce0 __tcp_push_pending_frames+0x32/0xf0 tcp_push+0x107/0x140 tcp_sendmsg_locked+0x99f/0xbb0 tcp_bpf_push+0x19d/0x3a0 tcp_bpf_sendmsg_redir+0x55/0xd0 tcp_bpf_send_verdict+0x407/0x550 tcp_bpf_sendmsg+0x1a1/0x390 inet_sendmsg+0x6a/0x70 sock_sendmsg+0x9d/0xc0? sockfd_lookup_light+0x12/0x80 __sys_sendto+0x10e/0x160 ? syscall_enter_from_user_mode+0x20/0x60? __this_cpu_preempt_check+0x13/0x20? lockdep_hardirqs_on+0x82/0x110 __x64_sys_sendto+0x1f/0x30 do_syscall_64+0x38/0x90 Entry_SYSCALL_64_after_hwframe+0x63/0xcd Rechace la selecci\u00f3n de sockets que no sean TCP como destino de redireccionamiento desde un programa BPF sk_msg para evitar el bloqueo. Cuando lo intente, el usuario recibir\u00e1 un error EACCES de la llamada al sistema send/sendto/sendmsg()."
          }
        ],
        "id": "CVE-2023-52523",
        "lastModified": "2026-08-04T10:18:31.813",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            },
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 5.5,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "NONE",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 3.6,
              "source": "nvd@nist.gov",
              "type": "Primary"
            }
          ],
          "ssvcV203": [
            {
              "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "ssvcData": {
                "id": "CVE-2023-52523",
                "options": [
                  {
                    "exploitation": "none"
                  },
                  {
                    "automatable": "no"
                  },
                  {
                    "technicalImpact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-03-04T15:32:59.403562Z",
                "version": "2.0.3"
              }
            }
          ]
        },
        "published": "2024-03-02T22:15:48.213",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/b80e31baa43614e086a9d29dc1151932b1bd7fc5"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/bc8b89b6963803a123f64aa9494155a037b3d728"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/ded6e448028f0f91b6af35985afca01fa02a9089"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/b80e31baa43614e086a9d29dc1151932b1bd7fc5"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/bc8b89b6963803a123f64aa9494155a037b3d728"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/ded6e448028f0f91b6af35985afca01fa02a9089"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Modified",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-476"
              }
            ],
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ]
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-08-04T22:57:39+00:00",
      "cve": "CVE-2023-52523",
      "id": "CVE-2023-52523",
      "initial_release_date": "2023-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "198",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: bpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2023/cve-2023-52523.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-09-01T01:18:17Z",
      "cve": "CVE-2023-52523",
      "id": "CVE-2023-52523",
      "initial_release_date": "2024-03-06T04:34:32Z",
      "product_status:known_affected": "260",
      "product_status:known_not_affected": "294",
      "product_status:recommended": "673",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2023-52523",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2023-52523.json",
      "version": "62"
    },
    "vulnrichment": {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-02T23:03:20.665Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://git.kernel.org/stable/c/bc8b89b6963803a123f64aa9494155a037b3d728"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://git.kernel.org/stable/c/b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://git.kernel.org/stable/c/ded6e448028f0f91b6af35985afca01fa02a9089"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://git.kernel.org/stable/c/b80e31baa43614e086a9d29dc1151932b1bd7fc5"
              }
            ],
            "title": "CVE Program Container"
          },
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2023-52523",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2024-03-04T15:32:59.403562Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2024-05-23T19:01:14.699Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "defaultStatus": "unaffected",
              "product": "Linux",
              "programFiles": [
                "net/core/sock_map.c"
              ],
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "vendor": "Linux",
              "versions": [
                {
                  "lessThan": "bc8b89b6963803a123f64aa9494155a037b3d728",
                  "status": "affected",
                  "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
                  "versionType": "git"
                },
                {
                  "lessThan": "b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2",
                  "status": "affected",
                  "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
                  "versionType": "git"
                },
                {
                  "lessThan": "ded6e448028f0f91b6af35985afca01fa02a9089",
                  "status": "affected",
                  "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
                  "versionType": "git"
                },
                {
                  "lessThan": "b80e31baa43614e086a9d29dc1151932b1bd7fc5",
                  "status": "affected",
                  "version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
                  "versionType": "git"
                }
              ]
            },
            {
              "defaultStatus": "affected",
              "product": "Linux",
              "programFiles": [
                "net/core/sock_map.c"
              ],
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "vendor": "Linux",
              "versions": [
                {
                  "status": "affected",
                  "version": "5.13"
                },
                {
                  "lessThan": "5.13",
                  "status": "unaffected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "5.15.*",
                  "status": "unaffected",
                  "version": "5.15.135",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "6.1.*",
                  "status": "unaffected",
                  "version": "6.1.57",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "6.5.*",
                  "status": "unaffected",
                  "version": "6.5.7",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "*",
                  "status": "unaffected",
                  "version": "6.6",
                  "versionType": "original_commit_for_fix"
                }
              ]
            }
          ],
          "cpeApplicability": [
            {
              "nodes": [
                {
                  "cpeMatch": [
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "5.15.135",
                      "versionStartIncluding": "5.13",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "6.1.57",
                      "versionStartIncluding": "5.13",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "6.5.7",
                      "versionStartIncluding": "5.13",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "6.6",
                      "versionStartIncluding": "5.13",
                      "vulnerable": true
                    }
                  ],
                  "negate": false,
                  "operator": "OR"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets\n\nWith a SOCKMAP/SOCKHASH map and an sk_msg program user can steer messages\nsent from one TCP socket (s1) to actually egress from another TCP\nsocket (s2):\n\ntcp_bpf_sendmsg(s1)\t\t// = sk_prot-\u003esendmsg\n  tcp_bpf_send_verdict(s1)\t// __SK_REDIRECT case\n    tcp_bpf_sendmsg_redir(s2)\n      tcp_bpf_push_locked(s2)\n\ttcp_bpf_push(s2)\n\t  tcp_rate_check_app_limited(s2) // expects tcp_sock\n\t  tcp_sendmsg_locked(s2)\t // ditto\n\nThere is a hard-coded assumption in the call-chain, that the egress\nsocket (s2) is a TCP socket.\n\nHowever in commit 122e6c79efe1 (\"sock_map: Update sock type checks for\nUDP\") we have enabled redirects to non-TCP sockets. This was done for the\nsake of BPF sk_skb programs. There was no indention to support sk_msg\nsend-to-egress use case.\n\nAs a result, attempts to send-to-egress through a non-TCP socket lead to a\ncrash due to invalid downcast from sock to tcp_sock:\n\n BUG: kernel NULL pointer dereference, address: 000000000000002f\n ...\n Call Trace:\n  \u003cTASK\u003e\n  ? show_regs+0x60/0x70\n  ? __die+0x1f/0x70\n  ? page_fault_oops+0x80/0x160\n  ? do_user_addr_fault+0x2d7/0x800\n  ? rcu_is_watching+0x11/0x50\n  ? exc_page_fault+0x70/0x1c0\n  ? asm_exc_page_fault+0x27/0x30\n  ? tcp_tso_segs+0x14/0xa0\n  tcp_write_xmit+0x67/0xce0\n  __tcp_push_pending_frames+0x32/0xf0\n  tcp_push+0x107/0x140\n  tcp_sendmsg_locked+0x99f/0xbb0\n  tcp_bpf_push+0x19d/0x3a0\n  tcp_bpf_sendmsg_redir+0x55/0xd0\n  tcp_bpf_send_verdict+0x407/0x550\n  tcp_bpf_sendmsg+0x1a1/0x390\n  inet_sendmsg+0x6a/0x70\n  sock_sendmsg+0x9d/0xc0\n  ? sockfd_lookup_light+0x12/0x80\n  __sys_sendto+0x10e/0x160\n  ? syscall_enter_from_user_mode+0x20/0x60\n  ? __this_cpu_preempt_check+0x13/0x20\n  ? lockdep_hardirqs_on+0x82/0x110\n  __x64_sys_sendto+0x1f/0x30\n  do_syscall_64+0x38/0x90\n  entry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nReject selecting a non-TCP sockets as redirect target from a BPF sk_msg\nprogram to prevent the crash. When attempted, user will receive an EACCES\nerror from send/sendto/sendmsg() syscall."
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2025-05-04T07:38:31.613Z",
            "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "shortName": "Linux"
          },
          "references": [
            {
              "url": "https://git.kernel.org/stable/c/bc8b89b6963803a123f64aa9494155a037b3d728"
            },
            {
              "url": "https://git.kernel.org/stable/c/b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2"
            },
            {
              "url": "https://git.kernel.org/stable/c/ded6e448028f0f91b6af35985afca01fa02a9089"
            },
            {
              "url": "https://git.kernel.org/stable/c/b80e31baa43614e086a9d29dc1151932b1bd7fc5"
            }
          ],
          "title": "bpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets",
          "x_generator": {
            "engine": "bippy-1.2.0"
          }
        }
      },
      "cveMetadata": {
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "assignerShortName": "Linux",
        "cveId": "CVE-2023-52523",
        "datePublished": "2024-03-02T21:52:30.351Z",
        "dateReserved": "2024-02-20T12:30:33.317Z",
        "dateUpdated": "2025-05-04T07:38:31.613Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…