Bug 2363423 (CVE-2022-49875) - CVE-2022-49875 kernel: bpftool: Fix NULL pointer dereference when pin {PROG, MAP, LINK} without FILE
Summary: CVE-2022-49875 kernel: bpftool: Fix NULL pointer dereference when pin {PROG, ...
Keywords:
Status: NEW
Alias: CVE-2022-49875
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-01 15:04 UTC by OSIDB Bzimport
Modified: 2025-07-21 13:31 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-05-01 15:04:04 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.

Comment 1 Avinash Hanwate 2025-05-02 04:05:49 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025050152-CVE-2022-49875-9422@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.