bpftool: Fix NULL pointer dereference when pin {PROG, MAP, LINK} without FILE
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: do_pin do_pin_any do_pin_fd mount_bpffs_for_pin strlen(name) <- NULL pointer dereference Fix it by adding validation to the common process.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.155, 5.15.79, 6.0.9
- CVEs
- CVE-2022-49875
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 11:36 UTC · Revision 1
Source evidence
bpftool: Fix NULL pointer dereference when pin {PROG, MAP, LINK} without FILE
core-osv · Original sourcePublished 1 May 2025, 14:10 UTC
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: do_pin do_pin_any do_pin_fd mount_bpffs_for_pin strlen(name) <- NULL pointer dereference Fix it by adding validation to the common process.
osv:CVE-2022-49875
Kernel
Fixed versions: 5.10.155, 5.15.79, 6.0.9
Complete source record
{
"id": "9fa45338fef9866730510ff1b119417b7d3c55cdb69a8b85a2306430c69fa924",
"url": "https://osv.dev/vulnerability/CVE-2022-49875",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "bpftool: Fix NULL pointer dereference when pin {PROG, MAP, LINK} without FILE",
"summary": "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: do_pin do_pin_any do_pin_fd mount_bpffs_for_pin strlen(name) <- NULL pointer dereference Fix it by adding validation to the common process.",
"evidence": "osv:CVE-2022-49875",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.10.155",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.79",
"evidence": "/affected/1/ranges"
},
{
"value": "6.0.9",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2022-49875",
"aliases": [
"CVE-2022-49875"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "75a1e792c335b5c6d7fdb1014da47aeb64c5944f"
},
{
"fixed": "8c80b2fca4112d724dde477aed13f7b0510a2792"
},
{
"fixed": "6dcdd1b68b7f9333d48d48fc77b75e7f235f6a4a"
},
{
"fixed": "da5161ba94c5e9182c301dd4f09c94f715c068bd"
},
{
"fixed": "34de8e6e0e1f66e431abf4123934a2581cb5f133"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49875.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.7.0"
},
{
"fixed": "5.10.155"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.79"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.0.9"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49875.json"
}
}
],
"modified": "2026-10-28T02:30:28.548089622Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/34de8e6e0e1f66e431abf4123934a2581cb5f133",
"https://git.kernel.org/stable/c/6dcdd1b68b7f9333d48d48fc77b75e7f235f6a4a",
"https://git.kernel.org/stable/c/8c80b2fca4112d724dde477aed13f7b0510a2792",
"https://git.kernel.org/stable/c/da5161ba94c5e9182c301dd4f09c94f715c068bd",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49875.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-49875",
"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/2022/49xxx/CVE-2022-49875.json"
}
},
"related_cves": [
{
"value": "CVE-2022-49875",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 495030,
"published_at": "2025-05-01T14:10:24.427+00:00"
}