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 DB5D128A1F3 for ; Wed, 18 Jun 2025 11:08:43 +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=1750244923; cv=none; b=PM+P2Qnq5EtIBboeK/UM27HYIpVNqrl6syS+zQ0eeNsyW6PC43MTf5w/voUpRxzNwuRjcapTQSVxxAIRu0D9z7BVyeHjSdGuhb661TqSzpEND6At23rfgbWnVXI3B33LHSzArLVLL2aLSosB2wboy9F4i38nPeuVpXe021LY31I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244923; c=relaxed/simple; bh=GftNaiNyvTB81a2gri7qJyYyRs66qeY4LcaMs89Eato=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=pLrS9k1vEx5kVQKh643e37I1Jv1wQhuKa8wiXuUrh+tfi0Xpfncl2OgNOUA/TsO7R0+ZA5xg7RD25fJq1UafBE8Lc+eNPzSkITbmcu6DlGWATA+MIy+osnkOeeNBAwJROY1z2KWfAGrKsZwBrXGJZKdUCQC29rU2cT+A/H1spy8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eTQM+aAP; 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="eTQM+aAP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A803C4CEE7; Wed, 18 Jun 2025 11:08:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244923; bh=GftNaiNyvTB81a2gri7qJyYyRs66qeY4LcaMs89Eato=; h=From:To:Cc:Subject:Date:Reply-to:From; b=eTQM+aAPhGx8+W1lW+rlJBZNlXmU46205xFfxWWD+Gdw8orhoQqABWpybzB9HOUhP 8U1qdF8M+FuJkP9rR5tD6BARXAk37x07lFnlJ7ZcJttN1UduKRSJJV2khrfY1DIUBV 42uWsEk0DJaRXJ0r3f//Di6c4AZCV317r4R9K7Qw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50077: apparmor: fix reference count leak in aa_pivotroot() Date: Wed, 18 Jun 2025 13:02:22 +0200 Message-ID: <2025061855-CVE-2022-50077-a544@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=3252; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vNwlV6wKjC5VPCDWh5PwXOH0V0GbGrkxx1FB+fC/dvY=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc9JdT+yod6+x3cFcWztj9pPpUjuzti/bflTHq+WS4 v4Uh438HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjAR0eMMCxqkGJKP9/wMmjXR V0opRGL7O/XAEIb5sXcOuu4p+bvKOfvJyWXcV15sWSFiBwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: apparmor: fix reference count leak in aa_pivotroot() The aa_pivotroot() function has a reference counting bug in a specific path. When aa_replace_current_label() returns on success, the function forgets to decrement the reference count of “target”, which is increased earlier by build_pivotroot(), causing a reference leak. Fix it by decreasing the refcount of “target” in that path. The Linux kernel CVE team has assigned CVE-2022-50077 to this issue. Affected and fixed versions =========================== Issue introduced in 4.14 with commit 2ea3ffb7782a84da33a8382f13ebd016da50079b and fixed in 4.14.291 with commit d53194707d2a1851be027cd74266b96ceff799d3 Issue introduced in 4.14 with commit 2ea3ffb7782a84da33a8382f13ebd016da50079b and fixed in 4.19.256 with commit f4d5c7796571624e3f380b447ada52834270a287 Issue introduced in 4.14 with commit 2ea3ffb7782a84da33a8382f13ebd016da50079b and fixed in 5.4.211 with commit ef6fb6f0d0d8440595b45a7e53c6162c737177f4 Issue introduced in 4.14 with commit 2ea3ffb7782a84da33a8382f13ebd016da50079b and fixed in 5.10.138 with commit 2ceeb3296e9dde1d5772348046affcefdea605e2 Issue introduced in 4.14 with commit 2ea3ffb7782a84da33a8382f13ebd016da50079b and fixed in 5.15.63 with commit 64103ea357734b82384c925cba4758fdb909be0c Issue introduced in 4.14 with commit 2ea3ffb7782a84da33a8382f13ebd016da50079b and fixed in 5.19.4 with commit 3ca40ad7afae144169a43988ef1a3f16182faf0a Issue introduced in 4.14 with commit 2ea3ffb7782a84da33a8382f13ebd016da50079b and fixed in 6.0 with commit 11c3627ec6b56c1525013f336f41b79a983b4d46 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-50077 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: security/apparmor/mount.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/d53194707d2a1851be027cd74266b96ceff799d3 https://git.kernel.org/stable/c/f4d5c7796571624e3f380b447ada52834270a287 https://git.kernel.org/stable/c/ef6fb6f0d0d8440595b45a7e53c6162c737177f4 https://git.kernel.org/stable/c/2ceeb3296e9dde1d5772348046affcefdea605e2 https://git.kernel.org/stable/c/64103ea357734b82384c925cba4758fdb909be0c https://git.kernel.org/stable/c/3ca40ad7afae144169a43988ef1a3f16182faf0a https://git.kernel.org/stable/c/11c3627ec6b56c1525013f336f41b79a983b4d46