Skip to contentSkip to conversation

CVE-2024-58058: ubifs: skip dumping tnc tree when zroot is null

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 6, 2025

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

ubifs: skip dumping tnc tree when zroot is null

Clearing slab cache will free all znode in memory and make c->zroot.znode = NULL, then dumping tnc tree will access c->zroot.znode which cause null pointer dereference.

The Linux kernel CVE team has assigned CVE-2024-58058 to this issue.

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

	Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.1.129 with commit e01b55f261ccc96e347eba4931e4429d080d879d
	Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.6.76 with commit 40e25a3c0063935763717877bb2a814c081509ff
	Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.12.13 with commit 77e5266e3d3faa6bdcf20d9c68a8972f6aa06522
	Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.13.2 with commit 2a987950df825d0144370e700dc5fb337684ffba
	Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.14-rc1 with commit bdb0ca39e0acccf6771db49c3f94ed787d05f2d7

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-2024-58058

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:
fs/ubifs/debug.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/e01b55f261ccc96e347eba4931e4429d080d879d
	https://git.kernel.org/stable/c/40e25a3c0063935763717877bb2a814c081509ff
	https://git.kernel.org/stable/c/77e5266e3d3faa6bdcf20d9c68a8972f6aa06522
	https://git.kernel.org/stable/c/2a987950df825d0144370e700dc5fb337684ffba
	https://git.kernel.org/stable/c/bdb0ca39e0acccf6771db49c3f94ed787d05f2d7