Go to file
Tuo Li c7858c55cb ceph: fix possible null-pointer dereference in ceph_mdsmap_decode()
[ Upstream commit a9e6ffbc5b ]

kcalloc() is called to allocate memory for m->m_info, and if it fails,
ceph_mdsmap_destroy() behind the label out_err will be called:
  ceph_mdsmap_destroy(m);

In ceph_mdsmap_destroy(), m->m_info is dereferenced through:
  kfree(m->m_info[i].export_targets);

To fix this possible null-pointer dereference, check m->m_info before the
for loop to free m->m_info[i].export_targets.

[ jlayton: fix up whitespace damage
	   only kfree(m->m_info) if it's non-NULL ]

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Tuo Li <islituo@gmail.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-08 08:50:20 +02:00
arch perf/x86/intel/pt: Fix mask of num_address_ranges 2021-09-08 08:50:20 +02:00
block blk-mq: don't grab rq's refcount in blk_mq_check_expired() 2021-09-03 10:23:03 +02:00
certs Kbuild updates for v5.13 (2nd) 2021-05-08 10:00:11 -07:00
crypto crypto: sm2 - fix a memory leak in sm2 2021-07-14 17:06:44 +02:00
Documentation dt-bindings: sifive-l2-cache: Fix 'select' matching 2021-09-03 10:22:47 +02:00
drivers qede: Fix memset corruption 2021-09-08 08:50:20 +02:00
fs ceph: fix possible null-pointer dereference in ceph_mdsmap_decode() 2021-09-08 08:50:20 +02:00
include net: don't unconditionally copy_from_user a struct ifreq for socket ioctls 2021-09-03 10:23:08 +02:00
init sched/core: Initialize the idle task with preemption disabled 2021-07-14 17:06:21 +02:00
ipc ipc/mqueue, msg, sem: avoid relying on a stack reference past its expiry 2021-05-22 15:09:07 -10:00
kernel audit: move put_tree() to avoid trim_trees refcount underflow and UAF 2021-09-03 10:23:08 +02:00
lib once: Fix panic when module unload 2021-09-03 10:22:46 +02:00
LICENSES LICENSES: Add the CC-BY-4.0 license 2020-12-08 10:33:27 -07:00
mm mm/memory_hotplug: fix potential permanent lru cache disable 2021-09-03 10:22:48 +02:00
net net: don't unconditionally copy_from_user a struct ifreq for socket ioctls 2021-09-03 10:23:08 +02:00
samples bpf, samples: Fix xdpsock with '-M' parameter missing unload process 2021-07-28 14:37:21 +02:00
scripts scripts/tracing: fix the bug that can't parse raw_trace_func 2021-08-12 13:32:16 +02:00
security bpf: Add lockdown check for probe_write_user helper 2021-08-15 14:01:56 +02:00
sound ASoC: component: Remove misplaced prefix handling in pin control functions 2021-09-03 10:22:44 +02:00
tools tools/virtio: fix build 2021-09-03 10:23:01 +02:00
usr .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
virt KVM: Do not leak memory for duplicate debugfs directories 2021-08-12 13:32:23 +02:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap mailmap: add Marek's other e-mail address and identity without diacritics 2021-06-24 19:40:54 -07:00
COPYING
CREDITS MAINTAINERS: move Murali Karicheri to credits 2021-04-29 15:47:30 -07:00
Kbuild
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS Merge branch 'akpm' (patches from Andrew) 2021-06-25 11:05:03 -07:00
Makefile Linux 5.13.14 2021-09-03 10:23:08 +02:00
README

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.