Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2c86366c authored by Lizhi Xu's avatar Lizhi Xu Committed by Greg Kroah-Hartman
Browse files

vmci: Prevent the dispatching of uninitialized payloads



[ Upstream commit bfb4cf9fb97e4063f0aa62e9e398025fb6625031 ]

The reproducer executes the host's unlocked_ioctl call in two different
tasks. When init_context fails, the struct vmci_event_ctx is not fully
initialized when executing vmci_datagram_dispatch() to send events to all
vm contexts. This affects the datagram taken from the datagram queue of
its context by another task, because the datagram payload is not initialized
according to the size payload_size, which causes the kernel data to leak
to the user space.

Before dispatching the datagram, and before setting the payload content,
explicitly set the payload content to 0 to avoid data leakage caused by
incomplete payload initialization.

Fixes: 28d6692c ("VMCI: context implementation.")
Reported-by: default avatar <syzbot+9b9124ae9b12d5af5d95@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=9b9124ae9b12d5af5d95


Tested-by: default avatar <syzbot+9b9124ae9b12d5af5d95@syzkaller.appspotmail.com>
Signed-off-by: default avatarLizhi Xu <lizhi.xu@windriver.com>
Link: https://lore.kernel.org/r/20250627055214.2967129-1-lizhi.xu@windriver.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 83ea0c7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment