- Description
- In the Linux kernel, the following vulnerability has been resolved: bpf: Fix memleak due to fentry attach failure If it fails to attach fentry, the allocated bpf trampoline image will be left in the system. That can be verified by checking /proc/kallsyms. This meamleak can be verified by a simple bpf program as follows: SEC("fentry/trap_init") int fentry_run() { return 0; } It will fail to attach trap_init because this function is freed after kernel init, and then we can find the trampoline image is left in the system by checking /proc/kallsyms. $ tail /proc/kallsyms ffffffffc0613000 t bpf_trampoline_6442453466_1 [bpf] ffffffffc06c3000 t bpf_trampoline_6442453466_1 [bpf] $ bpftool btf dump file /sys/kernel/btf/vmlinux | grep "FUNC 'trap_init'" [2522] FUNC 'trap_init' type_id=119 linkage=static $ echo $((6442453466 & 0x7fffffff)) 2522 Note that there are two left bpf trampoline images, that is because the libbpf will fallback to raw tracepoint if -EINVAL is returned.
- Source
- 416baaa9-dc9f-4396-8d5f-8c081fb06d67
- NVD status
- Modified
- Products
- linux_kernel
CVSS 3.1
- Type
- Primary
- Base score
- 5.5
- Impact score
- 3.6
- Exploitability score
- 1.8
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Severity
- MEDIUM
- Hype score
- Not currently trending
[
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "5FB238AF-DE30-4383-9FB7-1425BA8B9BCC",
"versionEndExcluding": "5.11",
"versionStartIncluding": "5.10.28",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "18E94C1C-980B-4CC6-9C63-60B225E69968",
"versionEndExcluding": "5.12",
"versionStartIncluding": "5.11.11",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "E08F6A3C-3F8B-445B-97DB-1D37F6D7B2E1",
"versionEndExcluding": "6.1.39",
"versionStartIncluding": "5.12.1",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "95CB4836-7F5D-4C20-B025-8E046EC87B78",
"versionEndExcluding": "6.3.13",
"versionStartIncluding": "6.2",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "6AB81046-CB69-4115-924C-963B37C41385",
"versionEndExcluding": "6.4.4",
"versionStartIncluding": "6.4",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:5.12:-:*:*:*:*:*:*",
"matchCriteriaId": "75EB504D-4A83-4C67-9C8D-FD9C6C8EB4CD",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:5.12:rc5:*:*:*:*:*:*",
"matchCriteriaId": "A935F9F1-DA8B-49F4-BF2B-FA01A92F113E",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:5.12:rc6:*:*:*:*:*:*",
"matchCriteriaId": "DF0AF673-12B7-4274-9090-411D4939CB62",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:5.12:rc7:*:*:*:*:*:*",
"matchCriteriaId": "06AE06A6-A0C3-4556-BFFA-3D6E4BAC43C8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:5.12:rc8:*:*:*:*:*:*",
"matchCriteriaId": "FCE63934-38CF-4311-AD72-624E86AF3889",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
]