mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 08:38:45 +02:00 
			
		
		
		
	|  8d7861ac50 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:  | ||
|---|---|---|
| .. | ||
| monitors | ||
| Kconfig | ||
| Makefile | ||
| reactor_panic.c | ||
| reactor_printk.c | ||
| rv.c | ||
| rv.h | ||
| rv_reactors.c | ||
| rv_trace.h | ||