Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5704128DB48 for ; Wed, 18 Jun 2025 11:12:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245165; cv=none; b=IPEqZkjFnGxXAAbkQ/1wgrhT0AejUwa/FeFQqDC+AKzqSacYdOhISUzz5CWg/Hai16yriiWs8Jtk4CtLcSvcf7/YVaBucotmWcNZ4G9U095cYWHSI9d1+HdpvIbUXNaJm3shiNidiH390nAqdVHGc9rm+fS54PmM6dxtPJrA/0g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245165; c=relaxed/simple; bh=rD9sKUzBkiEgiK6b2fhfCHnHFu6UbJBs++D+Lrzzo+w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WUL9FDxkxXl/ycMbhN0tw8GPkDVZq1o9KpCiEqRv35wuHCJZWId84AGlBSwUAu5/YHFqkseKgRMpqhVDYMx0YOH1dlwVRvK6On00MzMuwOQzBw3lpxBncFOIJrVK+l5iS2a/W9rgdhnMb/N9XlJdJ4qlVF494RUegif/nJvnDEs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=APXcuxnN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="APXcuxnN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57389C4CEE7; Wed, 18 Jun 2025 11:12:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245164; bh=rD9sKUzBkiEgiK6b2fhfCHnHFu6UbJBs++D+Lrzzo+w=; h=From:To:Cc:Subject:Date:Reply-to:From; b=APXcuxnNDkDFX72t4VZeie3wsllK2ax9iIt7wlIlTedeUcXGojxJVuq6qtTmZgg7g kq319xTJvVVCgsRwXEwp/TRv7iGlRmpxcM84bm4+ITXpW8L+/dOfOQsbU1Fe5hXI8J pY3zJilgOodcEI+Z6J3/Dr5ykOdrAfPuZLVLGq+A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50148: kernfs: fix potential NULL dereference in __kernfs_remove Date: Wed, 18 Jun 2025 13:03:33 +0200 Message-ID: <2025061821-CVE-2022-50148-371d@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2225; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=u9b1Vnw8aWLvTE347x4nfXSbLwlj/uIQOGrnRQFz5ts=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBcxo7+74GH6iNLM+0WKeXHRZdfezf9Hl2kU/CnJLcT aZutkrpiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIkEFzPMFfpjteq6VqLsBKWd RtukNn6dpTLvFcNc2W2Lb7ItnaIb1/WR0TqM79qmzKm7AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: kernfs: fix potential NULL dereference in __kernfs_remove When lockdep is enabled, lockdep_assert_held_write would cause potential NULL pointer dereference. Fix the following smatch warnings: fs/kernfs/dir.c:1353 __kernfs_remove() warn: variable dereferenced before check 'kn' (see line 1346) The Linux kernel CVE team has assigned CVE-2022-50148 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit 393c3714081a53795bbff0e985d24146def6f57f and fixed in 5.18.18 with commit b871986d9d3071f5082664ac274d93f08db257cd Issue introduced in 5.17 with commit 393c3714081a53795bbff0e985d24146def6f57f and fixed in 5.19.2 with commit 4a9f35b8729c5bf13ea671c908c17ed74c48fc50 Issue introduced in 5.17 with commit 393c3714081a53795bbff0e985d24146def6f57f and fixed in 6.0 with commit 72b5d5aef246a0387cefa23121dd90901c7a691a 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-50148 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/kernfs/dir.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/b871986d9d3071f5082664ac274d93f08db257cd https://git.kernel.org/stable/c/4a9f35b8729c5bf13ea671c908c17ed74c48fc50 https://git.kernel.org/stable/c/72b5d5aef246a0387cefa23121dd90901c7a691a