netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bpf_test_finish()
@ 2017-05-02  3:56 David Miller
  2017-05-02  4:46 ` bpf_test_finish() Alexei Starovoitov
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2017-05-02  3:56 UTC (permalink / raw)
  To: ast; +Cc: daniel, netdev


It dereferences a user pointer:

static int bpf_test_finish(union bpf_attr __user *uattr, const void *data,
			   u32 size, u32 retval, u32 duration)
{
	void __user *data_out = u64_to_user_ptr(uattr->test.data_out);
                                                ^^^^^^^^^^^^^^^^^^^^
Which of course doesn't work so well :-)

I really wish that didn't silently work on x86/x86_64.

You're going to have to do a "get_user(&uattr->test.data_out)"

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-02 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-02  3:56 bpf_test_finish() David Miller
2017-05-02  4:46 ` bpf_test_finish() Alexei Starovoitov
2017-05-02 15:14   ` bpf_test_finish() David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).