{"id":"CVE-2024-50123","state":"PUBLISHED","title":"bpf: Add the missing BPF_LINK_TYPE invocation for sockmap","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Add the missing BPF_LINK_TYPE invocation for sockmap\n\nThere is an out-of-bounds read in bpf_link_show_fdinfo() for the sockmap\nlink fd. Fix it by adding the missing BPF_LINK_TYPE invocation for\nsockmap link\n\nAlso add comments for bpf_link_type to prevent missing updates in the\nfuture.","publishedAt":"2024-11-05T17:10:51.799Z","updatedAt":"2026-08-05T11:41:48.825Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"699c23f02c65cbfc3e638f14ce0d70c23a2e1f02","status":"affected","lessThan":"6d79f12c0ce2bc8ff5f109093df1734bd6450615","versionType":"git"},{"version":"699c23f02c65cbfc3e638f14ce0d70c23a2e1f02","status":"affected","lessThan":"c2f803052bc7a7feb2e03befccc8e49b6ff1f5f5","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_types.h","include/uapi/linux/bpf.h","tools/include/uapi/linux/bpf.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.10","versionType":"semver"},{"version":"6.11.6","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_types.h","include/uapi/linux/bpf.h","tools/include/uapi/linux/bpf.h"]}],"references":["https://git.kernel.org/stable/c/6d79f12c0ce2bc8ff5f109093df1734bd6450615","https://git.kernel.org/stable/c/c2f803052bc7a7feb2e03befccc8e49b6ff1f5f5"],"weaknesses":["CWE-125"],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/50xxx/CVE-2024-50123.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-50123","state":"PUBLISHED","datePublished":"2024-11-05T17:10:51.799Z","dateUpdated":"2026-08-05T11:41:48.825Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-10-21T19:36:19.954Z"},"containers":{"cna":{"title":"bpf: Add the missing BPF_LINK_TYPE invocation for sockmap","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Add the missing BPF_LINK_TYPE invocation for sockmap\n\nThere is an out-of-bounds read in bpf_link_show_fdinfo() for the sockmap\nlink fd. Fix it by adding the missing BPF_LINK_TYPE invocation for\nsockmap link\n\nAlso add comments for bpf_link_type to prevent missing updates in the\nfuture."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"699c23f02c65cbfc3e638f14ce0d70c23a2e1f02","status":"affected","lessThan":"6d79f12c0ce2bc8ff5f109093df1734bd6450615","versionType":"git"},{"version":"699c23f02c65cbfc3e638f14ce0d70c23a2e1f02","status":"affected","lessThan":"c2f803052bc7a7feb2e03befccc8e49b6ff1f5f5","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_types.h","include/uapi/linux/bpf.h","tools/include/uapi/linux/bpf.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.10","versionType":"semver"},{"version":"6.11.6","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_types.h","include/uapi/linux/bpf.h","tools/include/uapi/linux/bpf.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/6d79f12c0ce2bc8ff5f109093df1734bd6450615"},{"url":"https://git.kernel.org/stable/c/c2f803052bc7a7feb2e03befccc8e49b6ff1f5f5"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached through the bpf() syscall (BPF_MAP_CREATE/BPF_PROG_LOAD/BPF_LINK_CREATE, or BPF_OBJ_GET on a bpffs-pinned link) followed by a read of /proc/self/fdinfo/<fd>. There is no network-facing path to bpf_link_show_fdinfo().\nAC:L - Triggering is fully deterministic — link->type is unconditionally 14 for every sockmap link, so the out-of-bounds read at index 14 happens on every fdinfo read with no race, timing window, or memory-layout grooming required.\nPR:L - BPF token delegation (kernel 6.9+, present across the affected 6.10–6.11 range) routes the CAP_NET_ADMIN/CAP_BPF checks through ns_capable(token->userns, ...), letting an unprivileged user in a delegated user namespace create the sockmap link; separately, bpf_obj_get() enforces no capability check whatsoever, so any local user able to open a bpffs-pinned sockmap link obtains the fd and reads its own fdinfo.\nUI:N - The attacker performs every step — creating or opening the link and reading its fdinfo — within their own process. No victim action or interaction is required.\nS:U - The out-of-bounds read and the resulting disclosure or fault are confined to the kernel's own security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The out-of-bounds qword is dereferenced as a string by seq_printf(\"%s\") with precision -1, so string_nocheck() walks unbounded from an uncontrolled kernel address until a NUL byte and copies those kernel memory bytes into fdinfo output that userspace reads back.\nI:N - The defect is a pure read of one element past a global array; no kernel memory is written out of bounds and no attacker-controlled data modifies kernel state.\nA:H - vsnprintf only guards NULL, sub-PAGE_SIZE, and IS_ERR values, so any other adjacent .data qword becomes a wild kernel dereference and oops, and KASAN globals instrumentation turns the access into a hard report (a panic with panic_on_warn)."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:41:48.825Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"6.11.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.1,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-50123","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2025-10-01T20:21:36.865150Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-125","lang":"en","type":"CWE","description":"CWE-125 Out-of-bounds Read"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-01T20:27:16.209Z"}}]}}}