lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025050152-CVE-2022-49875-9422@gregkh>
Date: Thu,  1 May 2025 16:11:05 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-49875: bpftool: Fix NULL pointer dereference when pin {PROG, MAP, LINK} without FILE

From: Greg Kroah-Hartman <gregkh@...nel.org>

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.

The Linux kernel CVE team has assigned CVE-2022-49875 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 5.7 with commit 75a1e792c335b5c6d7fdb1014da47aeb64c5944f and fixed in 5.10.155 with commit 8c80b2fca4112d724dde477aed13f7b0510a2792
	Issue introduced in 5.7 with commit 75a1e792c335b5c6d7fdb1014da47aeb64c5944f and fixed in 5.15.79 with commit 6dcdd1b68b7f9333d48d48fc77b75e7f235f6a4a
	Issue introduced in 5.7 with commit 75a1e792c335b5c6d7fdb1014da47aeb64c5944f and fixed in 6.0.9 with commit da5161ba94c5e9182c301dd4f09c94f715c068bd
	Issue introduced in 5.7 with commit 75a1e792c335b5c6d7fdb1014da47aeb64c5944f and fixed in 6.1 with commit 34de8e6e0e1f66e431abf4123934a2581cb5f133

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2022-49875
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	tools/bpf/bpftool/common.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/8c80b2fca4112d724dde477aed13f7b0510a2792
	https://git.kernel.org/stable/c/6dcdd1b68b7f9333d48d48fc77b75e7f235f6a4a
	https://git.kernel.org/stable/c/da5161ba94c5e9182c301dd4f09c94f715c068bd
	https://git.kernel.org/stable/c/34de8e6e0e1f66e431abf4123934a2581cb5f133

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ