Skip to content
Commit 62652f32 authored by Hagar Gamal Halim Hemdan's avatar Hagar Gamal Halim Hemdan Committed by Yang Yingliang
Browse files

vmci: prevent speculation leaks by sanitizing event in event_deliver()

mainline inclusion
from mainline-v6.10-rc1
commit 8003f00d895310d409b2bf9ef907c56b42a4e0f4
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAD0E8
CVE: CVE-2024-39499

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8003f00d895310d409b2bf9ef907c56b42a4e0f4



---------------------------

Coverity spotted that event_msg is controlled by user-space,
event_msg->event_data.event is passed to event_deliver() and used
as an index without sanitization.

This change ensures that the event index is sanitized to mitigate any
possibility of speculative information leaks.

This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.

Only compile tested, no access to HW.

Fixes: 1d990201 ("VMCI: event handling implementation.")
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarHagar Gamal Halim Hemdan <hagarhem@amazon.com>
Link: https://lore.kernel.org/stable/20231127193533.46174-1-hagarhem%40amazon.com
Link: https://lore.kernel.org/r/20240430085916.4753-1-hagarhem@amazon.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent a96cb8eb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment