Go to file
Lakshmi Ramasubramanian bd78cec3a5 ima: Free IMA measurement buffer on error
[ Upstream commit 6d14c6517885fa68524238787420511b87d671df ]

IMA allocates kernel virtual memory to carry forward the measurement
list, from the current kernel to the next kernel on kexec system call,
in ima_add_kexec_buffer() function.  In error code paths this memory
is not freed resulting in memory leak.

Free the memory allocated for the IMA measurement list in
the error code paths in ima_add_kexec_buffer() function.

Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Suggested-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Fixes: 7b8589cc29e7 ("ima: on soft reboot, save the measurement list")
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-12 12:52:21 +08:00
Documentation KVM: Forbid the use of tagged userspace addresses for memslots 2021-04-12 12:51:44 +08:00
LICENSES Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
arch MIPS: properly stop .eh_frame generation 2021-04-12 12:52:19 +08:00
block bsg: free the request before return error code 2021-04-12 12:52:19 +08:00
certs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
crypto crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key() 2021-04-12 12:52:21 +08:00
drivers hwrng: timeriomem - Fix cooldown period calculation 2021-04-12 12:52:21 +08:00
fs btrfs: clarify error returns values in __load_free_space_cache 2021-04-12 12:52:21 +08:00
include tcp: fix SO_RCVLOWAT related hangs under mem pressure 2021-04-12 12:52:15 +08:00
init fgraph: Initialize tracing_graph_pause at task creation 2021-04-12 12:51:55 +08:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2021-03-16 16:27:51 +08:00
kernel sched/eas: Don't update misfit status if the task is pinned 2021-04-12 12:52:20 +08:00
lib udp: fix skb_copy_and_csum_datagram with odd segment sizes 2021-04-12 12:52:05 +08:00
mm mm: provide a saner PTE walking API for modules 2021-04-12 12:52:09 +08:00
net bpf: Fix bpf_fib_lookup helper MTU check for SKB ctx 2021-04-12 12:52:15 +08:00
package generate-rpms: modify the name of the kernel tag for x86 and arm64 2021-04-07 06:53:59 +00:00
samples samples: bpf: Fix lwt_len_hist reusing previous BPF map 2021-03-16 16:42:53 +08:00
scripts scripts/recordmcount.pl: support big endian for ARCH sh 2021-04-12 12:52:10 +08:00
security ima: Free IMA measurement buffer on error 2021-04-12 12:52:21 +08:00
sound ASoC: SOF: debug: Fix a potential issue on string buffer termination 2021-04-12 12:52:21 +08:00
tools selftests: txtimestamp: fix compilation issue 2021-04-12 12:52:04 +08:00
usr Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
virt KVM: Use kvm_pfn_t for local PFN variable in hva_to_pfn_remapped() 2021-04-12 12:52:09 +08:00
.clang-format Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.cocciconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.get_maintainer.ignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitattributes Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
COPYING Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
CREDITS Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kbuild Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
MAINTAINERS Documentation/llvm: add documentation on building w/ Clang/LLVM 2021-03-16 16:34:24 +08:00
Makefile x86/build: Disable CET instrumentation in the kernel 2021-04-12 12:51:57 +08:00
README Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
README.md Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
backport_remove_lists.txt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tools_key.pub Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00

README.md

Tencent Linux Kernel 4.0