Go to file
Gabriele Monaco 5127322f3e rv: Fix out-of-bound memory access in rv_is_container_monitor()
JIRA: https://issues.redhat.com/browse/RHEL-92623

commit 8d7861ac507d23024c7d74b6cb59a9cca248bcb7
Author: Nam Cao <namcao@linutronix.de>
Date:   Fri Apr 11 09:37:17 2025 +0200

    rv: Fix out-of-bound memory access in rv_is_container_monitor()

    When rv_is_container_monitor() is called on the last monitor in
    rv_monitors_list, KASAN yells:

      BUG: KASAN: global-out-of-bounds in rv_is_container_monitor+0x101/0x110
      Read of size 8 at addr ffffffff97c7c798 by task setup/221

      The buggy address belongs to the variable:
       rv_monitors_list+0x18/0x40

    This is due to list_next_entry() is called on the last entry in the list.
    It wraps around to the first list_head, and the first list_head is not
    embedded in struct rv_monitor_def.

    Fix it by checking if the monitor is last in the list.

    Cc: stable@vger.kernel.org
    Cc: Gabriele Monaco <gmonaco@redhat.com>
    Fixes: cb85c660fcd4 ("rv: Add option for nested monitors and include sched")
    Link: https://lore.kernel.org/e85b5eeb7228bfc23b8d7d4ab5411472c54ae91b.1744355018.git.namcao@linutronix.de
    Signed-off-by: Nam Cao <namcao@linutronix.de>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
2025-06-02 12:47:32 +02:00
Documentation Documentation/rv: Add sched pages to the indices 2025-06-02 12:47:31 +02:00
LICENSES
arch Merge: Performance regression in LinuxBridge test case up to 45% throughput drop on kernel-5.14.0-530.el9 [rhel-9.7] 2025-05-21 18:34:45 -03:00
block Merge: block: three misc fixes 2025-05-06 11:46:15 -03:00
certs certs: Add support for using elliptic curve keys for signing modules 2025-03-05 22:29:46 +08:00
crypto crypto,fs: Separate out hkdf_extract() and hkdf_expand() 2025-05-09 07:27:10 +02:00
drivers Merge: mpt3sas: Driver update 2025-05-26 10:33:51 +02:00
fs Merge: CVE-2025-21962: cifs: Fix integer overflow while processing closetimeo mount option 2025-05-21 18:34:52 -03:00
include rv: Add option for nested monitors and include sched 2025-06-02 12:47:30 +02:00
init Merge: cgroup: Backport upstream cgroup commits up to v6.12 2025-05-26 10:33:48 +02:00
io_uring Merge: CVE-2025-21863: io_uring: prevent opcode speculation 2025-05-21 18:34:45 -03:00
ipc ipc/sem: use flexible array in 'struct sem_undo' 2025-03-21 11:02:00 -04:00
kernel rv: Fix out-of-bound memory access in rv_is_container_monitor() 2025-06-02 12:47:32 +02:00
lib Merge: objtool: enable CONFIG_OBJTOOL_WERROR 2025-05-06 11:46:13 -03:00
mm Merge: cgroup: Backport upstream cgroup commits up to v6.12 2025-05-26 10:33:48 +02:00
net Merge: net/other: phase-2 backports for RHEL-9.7 2025-05-21 18:34:54 -03:00
redhat handle man-page for rv-mon-sched in redhat/kernel.spec.template 2025-06-02 12:47:31 +02:00
samples livepatch: convert timeouts to secs_to_jiffies() 2025-04-03 13:25:22 -04:00
scripts Merge: objtool: enable CONFIG_OBJTOOL_WERROR 2025-05-06 11:46:13 -03:00
security Merge: CVE-2024-50301: security/keys: fix slab-out-of-bounds in key_task_permission 2025-05-21 18:34:49 -03:00
sound Merge: ALSA - update drivers for 9.7 - upstream 6.13 2025-05-06 11:46:15 -03:00
tools tools/rv: Allow rv list to filter for container 2025-06-02 12:47:31 +02:00
usr
virt kvm/vfio: Constify struct kvm_device_ops 2025-04-08 12:33:50 -06:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.gitlab-ci.yml Merge tag 'kernel-5.14.0-570.3.1.el9_6' into 'main' 2025-03-10 17:24:30 -04:00
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
Kconfig.redhat
MAINTAINERS Merge: cgroup: Backport upstream cgroup commits up to v6.12 2025-05-26 10:33:48 +02:00
Makefile Merge: Suppress linker warnings about having a LOAD segment with RWX permissions 2025-02-13 02:24:26 -05:00
Makefile.rhelver [redhat] kernel-5.14.0-588.el9 2025-05-26 15:17:04 +02:00
README
makefile

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.