Files
vuln-cve/data/2023/52xxx/CVE-2023-52523.json
T

248 lines
14 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2023-52523",
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"state": "PUBLISHED",
"assignerShortName": "Linux",
"dateReserved": "2024-02-20T12:30:33.317Z",
"datePublished": "2024-03-02T21:52:30.351Z",
"dateUpdated": "2026-08-05T09:10:23.650Z"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux",
"dateUpdated": "2026-08-05T09:10:23.650Z"
},
"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->sendmsg\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 <TASK>\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": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"baseScore": 7.8,
"baseSeverity": "HIGH"
},
"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 → 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’s 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 ≥1480) past udp_sock (1344) or unix_sock (1152), i.e. heap OOB reads of adjacent groomable objects.\nI:H - The same path writes tp->app_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."
}
]
}
],
"affected": [
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "unaffected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"net/core/sock_map.c"
],
"versions": [
{
"version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
"lessThan": "bc8b89b6963803a123f64aa9494155a037b3d728",
"status": "affected",
"versionType": "git"
},
{
"version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
"lessThan": "b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2",
"status": "affected",
"versionType": "git"
},
{
"version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
"lessThan": "ded6e448028f0f91b6af35985afca01fa02a9089",
"status": "affected",
"versionType": "git"
},
{
"version": "122e6c79efe1c25816118aca9cfabe54e99c2432",
"lessThan": "b80e31baa43614e086a9d29dc1151932b1bd7fc5",
"status": "affected",
"versionType": "git"
}
]
},
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "affected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"net/core/sock_map.c"
],
"versions": [
{
"version": "5.13",
"status": "affected"
},
{
"version": "0",
"lessThan": "5.13",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "5.15.135",
"lessThanOrEqual": "5.15.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.1.57",
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.5.7",
"lessThanOrEqual": "6.5.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.6",
"lessThanOrEqual": "*",
"status": "unaffected",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.13",
"versionEndExcluding": "5.15.135"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.13",
"versionEndExcluding": "6.1.57"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.13",
"versionEndExcluding": "6.5.7"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.13",
"versionEndExcluding": "6.6"
}
]
}
]
}
],
"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"
}
},
"adp": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2023-52523",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2024-03-04T15:32:59.403562Z"
}
}
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2024-06-04T17:22:46.142Z"
}
},
{
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-02T23:03:20.665Z"
},
"title": "CVE Program Container",
"references": [
{
"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",
"tags": [
"x_transferred"
]
}
]
}
]
}
}