No description
Find a file
Li Nan 374fb91430 md/raid10: check slab-out-of-bounds in md_bitmap_get_counter
[ Upstream commit 301867b1c1 ]

If we write a large number to md/bitmap_set_bits, md_bitmap_checkpage()
will return -EINVAL because 'page >= bitmap->pages', but the return value
was not checked immediately in md_bitmap_get_counter() in order to set
*blocks value and slab-out-of-bounds occurs.

Move check of 'page >= bitmap->pages' to md_bitmap_get_counter() and
return directly if true.

Fixes: ef42567335 ("md/bitmap: optimise scanning of empty bitmaps.")
Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230515134808.3936750-2-linan666@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:02 +02:00
arch treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
block block: bio-integrity: Copy flags when bio_integrity_payload is cloned 2023-03-11 16:31:33 +01:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-25 11:49:16 +02:00
crypto crypto: drbg - Only fail when jent is unavailable in FIPS mode 2023-05-17 11:13:13 +02:00
Documentation Documentation/x86: Fix backwards on/off logic about YMM support 2023-08-08 19:49:19 +02:00
drivers md/raid10: check slab-out-of-bounds in md_bitmap_get_counter 2023-08-11 11:45:02 +02:00
firmware
fs treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
include init: Remove check_bugs() leftovers 2023-08-08 19:49:18 +02:00
init init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init() 2023-08-08 19:49:18 +02:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:18:35 +01:00
kernel treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
lib treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
LICENSES
mm treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
net treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
samples samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() 2023-01-18 11:30:28 +01:00
scripts scripts/tags.sh: Resolve gtags empty index generation 2023-08-11 11:45:01 +02:00
security selinux: don't use make's grouped targets feature yet 2023-06-09 10:24:03 +02:00
sound treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
tools selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET 2023-06-21 15:39:59 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt KVM: arm64: vgic: Fix exit condition in scan_its_table() 2022-11-03 23:52:24 +09:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Remove DECnet support from kernel 2023-06-21 15:39:57 +02:00
Makefile Linux 4.19.290 2023-08-08 19:49:19 +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.
See Documentation/00-INDEX for a list of what is contained in each file.

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.