# CVE-2022-49875: bpftool: Fix NULL pointer dereference when pin {PROG, MAP, LINK} without FILE

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2025-05-01T14:10:24.427Z
- Modified: 2026-06-17T05:19:23.300Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 75a1e792c335b5c6d7fdb1014da47aeb64c5944f before 8c80b2fca4112d724dde477aed13f7b0510a2792; from 75a1e792c335b5c6d7fdb1014da47aeb64c5944f before 6dcdd1b68b7f9333d48d48fc77b75e7f235f6a4a; from 75a1e792c335b5c6d7fdb1014da47aeb64c5944f before da5161ba94c5e9182c301dd4f09c94f715c068bd; from 75a1e792c335b5c6d7fdb1014da47aeb64c5944f before 34de8e6e0e1f66e431abf4123934a2581cb5f133; 5.7 (not affected: before 5.7; from 5.10.155 up to 5.10.*; from 5.15.79 up to 5.15.*; from 6.0.9 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 5.7 before 5.10.155; from 5.11 before 5.15.79; from 5.16 before 6.0.9; 6.1

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/8c80b2fca4112d724dde477aed13f7b0510a2792> (patch)
- <https://git.kernel.org/stable/c/6dcdd1b68b7f9333d48d48fc77b75e7f235f6a4a> (patch)
- <https://git.kernel.org/stable/c/da5161ba94c5e9182c301dd4f09c94f715c068bd> (patch)
- <https://git.kernel.org/stable/c/34de8e6e0e1f66e431abf4123934a2581cb5f133> (patch)

## Sources

- CVE List: [CVE-2022-49875](https://www.cve.org/CVERecord?id=CVE-2022-49875), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-49875](https://nvd.nist.gov/vuln/detail/CVE-2022-49875), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-49875 · Whole record: https://cve.day/CVE-2022-49875.json · Rebuilt by cve.day 2026-11-25T22:58:20.913Z
