Files
linux/kernel
Daniel Borkmann eb9b195c53 bpf: fix partial copy of map_ptr when dst is scalar
commit 0962590e55 upstream.

ALU operations on pointers such as scalar_reg += map_value_ptr are
handled in adjust_ptr_min_max_vals(). Problem is however that map_ptr
and range in the register state share a union, so transferring state
through dst_reg->range = ptr_reg->range is just buggy as any new
map_ptr in the dst_reg is then truncated (or null) for subsequent
checks. Fix this by adding a raw member and use it for copying state
over to dst_reg.

Fixes: f1174f77b5 ("bpf/verifier: rework value tracking")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Edward Cree <ecree@solarflare.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-10 07:48:34 -08:00
..
2018-05-30 07:52:41 +02:00
2017-05-18 10:30:19 -06:00
2018-08-03 07:50:38 +02:00
2018-02-03 17:38:47 +01:00
2015-11-23 09:44:58 +01:00
2018-08-03 07:50:22 +02:00
2017-08-21 12:47:31 -07:00
2018-02-22 15:42:24 +01:00
2018-05-09 09:51:50 +02:00