bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos
In the Linux kernel, the following vulnerability has been resolved: bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos In case of malformed relocation record of kind BPF_CORE_TYPE_ID_LOCAL referencing a non-existing BTF type, function bpf_core_calc_relo_insn would cause a null pointer deference. Fix this by adding a proper check upper in call stack, as malformed relocation records could be passed from user space. Simplest reproducer is a program: r0 = 0 exit With a single relocation record: .insn_off = 0, /* patch first instruction */ .type_id = 100500, /* this type id does not exist */ .access_str_off = 6, /* offset of string "0" */ .kind = BPF_CORE_TYPE_ID_LOCAL, See the link for original reproducer or next commit for a test case.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.113, 6.10.13, 6.11.2, 6.6.54
- CVEs
- CVE-2024-49850
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 17:46 UTC · Revision 1
Source evidence
bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos
core-osv · Original sourcePublished 21 Oct 2024, 12:18 UTC
In the Linux kernel, the following vulnerability has been resolved: bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos In case of malformed relocation record of kind BPF_CORE_TYPE_ID_LOCAL referencing a non-existing BTF type, function bpf_core_calc_relo_insn would cause a null pointer deference. Fix this by adding a proper check upper in call stack, as malformed relocation records could be passed from user space. Simplest reproducer is a program: r0 = 0 exit With a single relocation record: .insn_off = 0, /* patch first instruction */ .type_id = 100500, /* this type id does not exist */ .access_str_off = 6, /* offset of string "0" */ .kind = BPF_CORE_TYPE_ID_LOCAL, See the link for original reproducer or next commit for a test case.
osv:CVE-2024-49850
Kernel
Fixed versions: 6.1.113, 6.6.54, 6.10.13, 6.11.2
Complete source record
{
"id": "fa49a48085ee022ce64f9de3e9b796c983866295dd5200480e0c605215f93ac7",
"url": "https://osv.dev/vulnerability/CVE-2024-49850",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos",
"summary": "In the Linux kernel, the following vulnerability has been resolved: bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos In case of malformed relocation record of kind BPF_CORE_TYPE_ID_LOCAL referencing a non-existing BTF type, function bpf_core_calc_relo_insn would cause a null pointer deference. Fix this by adding a proper check upper in call stack, as malformed relocation records could be passed from user space. Simplest reproducer is a program: r0 = 0 exit With a single relocation record: .insn_off = 0, /* patch first instruction */ .type_id = 100500, /* this type id does not exist */ .access_str_off = 6, /* offset of string \"0\" */ .kind = BPF_CORE_TYPE_ID_LOCAL, See the link for original reproducer or next commit for a test case.",
"evidence": "osv:CVE-2024-49850",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.113",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.54",
"evidence": "/affected/1/ranges"
},
{
"value": "6.10.13",
"evidence": "/affected/1/ranges"
},
{
"value": "6.11.2",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2024-49850",
"aliases": [
"CVE-2024-49850"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "74753e1462e77349525daf9eb60ea21ed92d3a97"
},
{
"fixed": "dc7ce14f00bcd50641f2110b7a32aa6552e0780f"
},
{
"fixed": "2288b54b96dcb55bedebcef3572bb8821fc5e708"
},
{
"fixed": "584cd3ff792e1edbea20b2a7df55897159b0be3e"
},
{
"fixed": "e7e9c5b2dda29067332df2a85b0141a92b41f218"
},
{
"fixed": "3d2786d65aaa954ebd3fcc033ada433e10da21c4"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-49850.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.17.0"
},
{
"fixed": "6.1.113"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.54"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.10.13"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.11.0"
},
{
"fixed": "6.11.2"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-49850.json"
}
}
],
"modified": "2026-10-28T02:30:45.073283567Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/2288b54b96dcb55bedebcef3572bb8821fc5e708",
"https://git.kernel.org/stable/c/3d2786d65aaa954ebd3fcc033ada433e10da21c4",
"https://git.kernel.org/stable/c/584cd3ff792e1edbea20b2a7df55897159b0be3e",
"https://git.kernel.org/stable/c/dc7ce14f00bcd50641f2110b7a32aa6552e0780f",
"https://git.kernel.org/stable/c/e7e9c5b2dda29067332df2a85b0141a92b41f218",
"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49850.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-49850",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49850.json"
}
},
"related_cves": [
{
"value": "CVE-2024-49850",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 512576,
"published_at": "2024-10-21T12:18:44.098+00:00"
}