Skip to content
Commit f4a2da75 authored by Loris Reiff's avatar Loris Reiff Committed by Daniel Borkmann
Browse files

bpf, cgroup: Fix problematic bounds check



Since ctx.optlen is signed, a larger value than max_value could be
passed, as it is later on used as unsigned, which causes a WARN_ON_ONCE
in the copy_to_user.

Fixes: 0d01da6a ("bpf: implement getsockopt and setsockopt hooks")
Signed-off-by: default avatarLoris Reiff <loris.reiff@liblor.ch>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Reviewed-by: default avatarStanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20210122164232.61770-2-loris.reiff@liblor.ch
parent bb8b81e3
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