Linux kernel stable tree
Go to file
Eric Biggers 29997a6fa6 fscrypt: fix keyring memory leak on mount failure
commit ccd30a476f upstream.

Commit d7e7b9af10 ("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.

Reported-by: syzbot+104c2a89561289cec13e@syzkaller.appspotmail.com
Fixes: d7e7b9af10 ("fscrypt: stop using keyrings subsystem for fscrypt_master_key")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Link: https://lore.kernel.org/r/20221011213838.209879-1-ebiggers@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-10 18:14:25 +01:00
arch arm64: dts: juno: Add thermal critical trip points 2022-11-10 18:14:23 +01:00
block block, bfq: protect 'bfqd->queued' by 'bfqd->lock' 2022-11-10 18:14:24 +01:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:13:17 +02:00
crypto crypto: akcipher - default implementation for setting a private key 2022-10-26 13:25:42 +02:00
Documentation arm64: errata: Remove AES hwcap for COMPAT tasks 2022-10-30 09:41:16 +01:00
drivers i2c: piix4: Fix adapter not be removed in piix4_remove() 2022-11-10 18:14:24 +01:00
fs fscrypt: fix keyring memory leak on mount failure 2022-11-10 18:14:25 +01:00
include fscrypt: fix keyring memory leak on mount failure 2022-11-10 18:14:25 +01:00
init Kconfig: Add option for asm goto w/ tied outputs to workaround clang-13 bug 2022-06-09 10:21:25 +02:00
ipc ipc/mqueue: use get_tree_nodev() in mqueue_get_tree() 2022-06-09 10:21:17 +02:00
kernel PM: hibernate: Allow hybrid sleep to work with s2idle 2022-11-03 23:57:52 +09:00
lib dyndbg: drop EXPORTed dynamic_debug_exec_queries 2022-10-26 13:25:34 +02:00
LICENSES LICENSES/deprecated: add Zlib license text 2020-09-16 14:33:49 +02:00
mm mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages 2022-11-03 23:57:50 +09:00
net Bluetooth: L2CAP: Fix attempting to access uninitialized memory 2022-11-10 18:14:24 +01:00
samples x86: Prepare inline-asm for straight-line-speculation 2022-07-25 11:26:29 +02:00
scripts kbuild: Add skip_encoding_btf_enum64 option to pahole 2022-10-28 12:57:12 +02:00
security selinux: enable use of both GFP_KERNEL and GFP_ATOMIC in convert_context() 2022-10-30 09:41:15 +01:00
sound ALSA: usb-audio: Add quirks for MacroSilicon MS2100/MS2106 devices 2022-11-10 18:14:24 +01:00
tools perf auxtrace: Fix address filter symbol name match for modules 2022-11-03 23:57:50 +09:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2022-02-01 17:25:48 +01:00
virt kvm: Add support for arch compat vm ioctls 2022-10-30 09:41:15 +01:00
.clang-format RDMA 5.10 pull request 2020-10-17 11:18:18 -07:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
.mailmap mailmap: add two more addresses of Uwe Kleine-König 2020-12-06 10:19:07 -08:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Move Jason Cooper to CREDITS 2020-11-30 10:20:34 +01:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS MAINTAINERS: add Amir as xfs maintainer for 5.10.y 2022-07-02 16:39:22 +02:00
Makefile Linux 5.10.153 2022-11-03 23:57:54 +09:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.