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 8551528312D for ; Tue, 16 Sep 2025 16:14:13 +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=1758039253; cv=none; b=ZSe8/ULGGxHhsTAUs3FCbQqECJaP972rLQm+0f1EAPy3RE+HIRs47QZevD+F48gm/lcvJqYK0PaobKx7JLTrZcDq7TD6Yci34hrqCM3suQdl2cR9Wmic4reh0rS+qHsFE1F314ArMPzoqQEGMkbExtadK6vzwIZftOvGRLA1IX4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758039253; c=relaxed/simple; bh=fA5pPkcpOUEEc5FvJvlUaZjrn9y9PlXsye4UB659ttM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UnAtFVueVRQ1fuwbUJHgb7t0Tgbp5l3LEGzibNdq/ylgjwqH1u+4J5BTJllHN8bt0B3oU6KkXPa0s2Jq/tGL6Xfm0s1ONcmtyR51c2r5N6xNrzWmviDBowQkykUrnC2wQOdL03azA0pLuZ9lOedu2UGNGy3HNqtjW3JGXiBHHtE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0wvL0UHo; 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="0wvL0UHo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F21ADC4CEEB; Tue, 16 Sep 2025 16:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758039253; bh=fA5pPkcpOUEEc5FvJvlUaZjrn9y9PlXsye4UB659ttM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0wvL0UHoB29PEZ2QOjLC603Mi87OBgXr2u4jP2kavYBXTJS+ttII8EfgZPZvYBhNR aLW1/zzq6WkqpCfO7WOuEBvpUQ4s9mKHiCBBpi3h7ium6m46lhavfU4ixZ//adGFS8 EJGVJkBLW+yFaSG6a1hqAlaYKEbd0MUt4MpQRn7M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50348: nfsd: Fix a memory leak in an error handling path Date: Tue, 16 Sep 2025 18:11:44 +0200 Message-ID: <2025091640-CVE-2022-50348-534c@gregkh> X-Mailer: git-send-email 2.51.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=2792; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5p2KCdlAxO41+MCM0SeDfaOy48UN5EcoZ7LLs9IGJwM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkne2wOLKu/HdQs/21ijcircxvmtOic2js15ukMw+QvH 1KizvWe7ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ7NjOsGD5o08K9tqcSmmc DW9fFUza9dj55QWGBZsEvtjPd8y5pi+oyR3z/amjwakN9wE= 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: nfsd: Fix a memory leak in an error handling path If this memdup_user() call fails, the memory allocated in a previous call a few lines above should be freed. Otherwise it leaks. The Linux kernel CVE team has assigned CVE-2022-50348 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4 with commit 6ee95d1c899186c0798cafd25998d436bcdb9618 and fixed in 5.4.220 with commit acc393aecda05bf64ed13b732931462e07a1bf08 Issue introduced in 5.4 with commit 6ee95d1c899186c0798cafd25998d436bcdb9618 and fixed in 5.10.150 with commit e060c4b9f33c1fca74df26d57a98e784295327e6 Issue introduced in 5.4 with commit 6ee95d1c899186c0798cafd25998d436bcdb9618 and fixed in 5.15.75 with commit aed8816305575b38dcc77feb6f1bc1d0ed32f5b8 Issue introduced in 5.4 with commit 6ee95d1c899186c0798cafd25998d436bcdb9618 and fixed in 5.19.17 with commit 733dd17158f96aaa25408dc39bbb2738fda9300e Issue introduced in 5.4 with commit 6ee95d1c899186c0798cafd25998d436bcdb9618 and fixed in 6.0.3 with commit cc3bca2110ac85cd964da997ef83d84cab0d49fb Issue introduced in 5.4 with commit 6ee95d1c899186c0798cafd25998d436bcdb9618 and fixed in 6.1 with commit fd1ef88049de09bc70d60b549992524cfc0e66ff 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-50348 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/nfsd/nfs4recover.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/acc393aecda05bf64ed13b732931462e07a1bf08 https://git.kernel.org/stable/c/e060c4b9f33c1fca74df26d57a98e784295327e6 https://git.kernel.org/stable/c/aed8816305575b38dcc77feb6f1bc1d0ed32f5b8 https://git.kernel.org/stable/c/733dd17158f96aaa25408dc39bbb2738fda9300e https://git.kernel.org/stable/c/cc3bca2110ac85cd964da997ef83d84cab0d49fb https://git.kernel.org/stable/c/fd1ef88049de09bc70d60b549992524cfc0e66ff