summaryrefslogtreecommitdiff
path: root/drivers/net/wwan/iosm/iosm_ipc_irq.h
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2025-04-11 09:37:17 +0200
committerSteven Rostedt (Google) <rostedt@goodmis.org>2025-04-12 12:13:30 -0400
commit8d7861ac507d23024c7d74b6cb59a9cca248bcb7 (patch)
tree6e75d16d16f1b6bfad855f9cc3a45dfbf4a4db26 /drivers/net/wwan/iosm/iosm_ipc_irq.h
parent485acd207d7daf8cf941a5f0fd0c09bc6d049402 (diff)
downloadlwn-8d7861ac507d23024c7d74b6cb59a9cca248bcb7.tar.gz
lwn-8d7861ac507d23024c7d74b6cb59a9cca248bcb7.zip
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>
Diffstat (limited to 'drivers/net/wwan/iosm/iosm_ipc_irq.h')
0 files changed, 0 insertions, 0 deletions