Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
af_packet: avoid a false positive warning in packet_setsockopt()
[ Upstream commit 86d43e2 ] Although the code is correct, the following line copy_from_sockptr(&req_u.req, optval, len)); triggers this warning : memcpy: detected field-spanning write (size 28) of single field "dst" at include/linux/sockptr.h:49 (size 16) Refactor the code to be more explicit. Reported-by: syzbot <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Cc: Kees Cook <[email protected]> Cc: Willem de Bruijn <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information