Skip to content
Commit 1f6e04a1 authored by Xu Kuohai's avatar Xu Kuohai Committed by Andrii Nakryiko
Browse files

bpf: Fix offset calculation error in __copy_map_value and zero_map_value

Function __copy_map_value and zero_map_value miscalculated copy offset,
resulting in possible copy of unwanted data to user or kernel.

Fix it.

Fixes: cc487558 ("bpf: Add zero_map_value to zero map value with special fields")
Fixes: 4d7d7f69

 ("bpf: Adapt copy_map_value for multiple offset case")
Signed-off-by: default avatarXu Kuohai <xukuohai@huawei.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarKumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/20221111125620.754855-1-xukuohai@huaweicloud.com
parent 4b45cd81
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment