[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025050100-CVE-2022-49897-6af8@gregkh>
Date: Thu, 1 May 2025 16:11:27 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-49897: fscrypt: fix keyring memory leak on mount failure
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
fscrypt: fix keyring memory leak on mount failure
Commit d7e7b9af104c ("fscrypt: stop using keyrings subsystem for
fscrypt_master_key") moved the keyring destruction from __put_super() to
generic_shutdown_super() so that the filesystem's block device(s) are
still available. Unfortunately, this causes a memory leak in the case
where a mount is attempted with the test_dummy_encryption mount option,
but the mount fails after the option has already been processed.
To fix this, attempt the keyring destruction in both places.
The Linux kernel CVE team has assigned CVE-2022-49897 to this issue.
Affected and fixed versions
===========================
Issue fixed in mainline with commit ccd30a4
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-49897
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/crypto/keyring.c
fs/super.c
include/linux/fscrypt.h
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/29997a6fa60de1de2fa0de471e7652efa6e95868
https://git.kernel.org/stable/c/cff805b1518f38d57866065343db2285f2dcd5ab
https://git.kernel.org/stable/c/0b1747653b102c555bac745ebe5ca86cdd20e43f
https://git.kernel.org/stable/c/ccd30a476f8e864732de220bd50e6f372f5ebcab
Powered by blists - more mailing lists