From mboxrd@z Thu Jan 1 00:00:00 1970 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 8D69D28313F for ; Wed, 18 Jun 2025 11:06:47 +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=1750244807; cv=none; b=uRR4+2gWXOTELcjroQjQVcqK4bcDqCIWn+hVDx+U3/eekgB6WmJY1pUejJQ4DCoKXAPSEHv/pjHoroeARSuBW+KCnqxAHePMJzCGK8XoWq/2V9R2ivDCkcYzxll/bG1zLzhQdwfWKVxKxWz8bMDFMGMXNKxIfJztI40v0TZWzSU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244807; c=relaxed/simple; bh=5rXRrbGF7wqEkQgQaI3xeuOvSuUeaVc80vUC2yogS7M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uvkaXCmU3eta/A5JFiRZrTGh1cHkM3dGCb+5++hwZNpJJuG8AVV2T8bwmdspxoLzEkfaWg/G8DR/w28WJQ95hPBX3Al2e3zae0TrSpnlM0rutYxjkqXyjuNuKrmP2aI4LtxzS0/XFpPAdBxVytQqLF/uBX2JGactjQiF8cTSJo8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=s/k/1GKm; 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="s/k/1GKm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE5CCC4CEE7; Wed, 18 Jun 2025 11:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244807; bh=5rXRrbGF7wqEkQgQaI3xeuOvSuUeaVc80vUC2yogS7M=; h=From:To:Cc:Subject:Date:Reply-to:From; b=s/k/1GKm0/scNxDx7zq4Y24OohPb718oudamPGnX1OSJqAvNYoNb6yE5+2TBkt3Vo u3E6gR9jOE0Xd6+FUd+hk5wYijY4Oh4GRcOxYMwR6tc8cUkOMwHGSh6yVsuaQLlo03 f4JEimFSHE3kYmeIZ2ZxiWm8cgEqZRanAi4EM5Go= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50043: net: fix potential refcount leak in ndisc_router_discovery() Date: Wed, 18 Jun 2025 13:01:48 +0200 Message-ID: <2025061843-CVE-2022-50043-e7dc@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=2531; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OAdKc9SaE2vqpktGJ1SrbpcCs3Hk68Z6216UwzzQbAM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc6KnKbzcarD6u9W5I2YvLX53X/uyymzViXivPtX1d +0q4v03d8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEPjQyzI+vMzx/mF/37bvf q0/Y+hocFq/a9IJhwcE17Pe+ZFx18lRb1PX61GP5jK/nTwIA 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: net: fix potential refcount leak in ndisc_router_discovery() The issue happens on specific paths in the function. After both the object `rt` and `neigh` are grabbed successfully, when `lifetime` is nonzero but the metric needs change, the function just deletes the route and set `rt` to NULL. Then, it may try grabbing `rt` and `neigh` again if above conditions hold. The function simply overwrite `neigh` if succeeds or returns if fails, without decreasing the reference count of previous `neigh`. This may result in memory leaks. Fix it by decrementing the reference count of `neigh` in place. The Linux kernel CVE team has assigned CVE-2022-50043 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 6b2e04bc240fe9be9e690059f710e9f95346d34d and fixed in 5.15.63 with commit ffb15594433391fd7885eb88ce5a7f7bdeefbb15 Issue introduced in 5.12 with commit 6b2e04bc240fe9be9e690059f710e9f95346d34d and fixed in 5.19.4 with commit 7998043d31d000c3a93f46182e6569dd0eecda34 Issue introduced in 5.12 with commit 6b2e04bc240fe9be9e690059f710e9f95346d34d and fixed in 6.0 with commit 7396ba87f1edf549284869451665c7c4e74ecd4f 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-50043 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: net/ipv6/ndisc.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/ffb15594433391fd7885eb88ce5a7f7bdeefbb15 https://git.kernel.org/stable/c/7998043d31d000c3a93f46182e6569dd0eecda34 https://git.kernel.org/stable/c/7396ba87f1edf549284869451665c7c4e74ecd4f