In the Linux kernel, the following vulnerability has been resolved:
bpftool: Fix NULL pointer dereference when pin {PROG, MAP, LINK} without FILE
When using bpftool to pin {PROG, MAP, LINK} without FILE, segmentation fault will occur. The reson is that the lack of FILE will cause strlen to trigger NULL pointer dereference. The corresponding stacktrace is shown below:
dopin dopinany dopinfd mountbpffsforpin strlen(name) <- NULL pointer dereference
Fix it by adding validation to the common process.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49875.json"
}[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"161631083255705325801764560376273053375",
"99350642215116661599420847916760390081",
"70984296318041493357457056094384833197"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-49875-19ae0612",
"target": {
"file": "tools/bpf/bpftool/common.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c80b2fca4112d724dde477aed13f7b0510a2792"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"161631083255705325801764560376273053375",
"99350642215116661599420847916760390081",
"70984296318041493357457056094384833197"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-49875-211d31ea",
"target": {
"file": "tools/bpf/bpftool/common.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6dcdd1b68b7f9333d48d48fc77b75e7f235f6a4a"
},
{
"digest": {
"length": 259.0,
"function_hash": "240265292130261260263379687269742653216"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-49875-7e7c05b9",
"target": {
"function": "do_pin_any",
"file": "tools/bpf/bpftool/common.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@da5161ba94c5e9182c301dd4f09c94f715c068bd"
},
{
"digest": {
"length": 259.0,
"function_hash": "240265292130261260263379687269742653216"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-49875-8ce0c8df",
"target": {
"function": "do_pin_any",
"file": "tools/bpf/bpftool/common.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@34de8e6e0e1f66e431abf4123934a2581cb5f133"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"161631083255705325801764560376273053375",
"99350642215116661599420847916760390081",
"70984296318041493357457056094384833197"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-49875-b4b5dfe4",
"target": {
"file": "tools/bpf/bpftool/common.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@da5161ba94c5e9182c301dd4f09c94f715c068bd"
},
{
"digest": {
"length": 259.0,
"function_hash": "240265292130261260263379687269742653216"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-49875-b55ecaf2",
"target": {
"function": "do_pin_any",
"file": "tools/bpf/bpftool/common.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c80b2fca4112d724dde477aed13f7b0510a2792"
},
{
"digest": {
"length": 259.0,
"function_hash": "240265292130261260263379687269742653216"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-49875-c0d5e424",
"target": {
"function": "do_pin_any",
"file": "tools/bpf/bpftool/common.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6dcdd1b68b7f9333d48d48fc77b75e7f235f6a4a"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"161631083255705325801764560376273053375",
"99350642215116661599420847916760390081",
"70984296318041493357457056094384833197"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-49875-f0aabdfa",
"target": {
"file": "tools/bpf/bpftool/common.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@34de8e6e0e1f66e431abf4123934a2581cb5f133"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49875.json"