Re: [PATCH net] bpf: uninitialized variables in test code
From: Dan Carpenter <hidden>
Date: 2018-12-03 10:33:08
Also in:
kernel-janitors
From: Dan Carpenter <hidden>
Date: 2018-12-03 10:33:08
Also in:
kernel-janitors
I'm afraid Roman's patch doesn't fix the bug. On Fri, Nov 30, 2018 at 02:58:03PM -0800, Alexei Starovoitov wrote:
On Thu, Nov 29, 2018 at 01:27:03PM +0300, Dan Carpenter wrote:quoted
Smatch complains that if bpf_test_run() fails with -ENOMEM at the begining then the "duration" is uninitialized. We then copy the unintialized variables to the user inside the bpf_test_finish() function. The functions require CAP_SYS_ADMIN so it's not really an information leak. Fixes: 1cf1cae963c2 ("bpf: introduce BPF_PROG_TEST_RUN command") Signed-off-by: Dan Carpenter <redacted>That is incorrect fixes tag.
Yeah. You're right. The Fixes tag is wrong. I spent some time looking at this too, because the code is old but the warning only just appeared... :/ Thanks for fixing this, Roman. regards, dan carpenter