lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 May 2020 17:15:39 -0700
From:   Andrii Nakryiko <>
To:     Jesper Dangaard Brouer <>
Cc:     Networking <>, bpf <>,
        Daniel Borkmann <>,
        Alexei Starovoitov <>,
        "David S. Miller" <>
Subject: Re: [PATCH bpf-next] bpf: fix too large copy from user in bpf_test_init

On Mon, May 18, 2020 at 6:08 AM Jesper Dangaard Brouer
<> wrote:
> Commit bc56c919fce7 ("bpf: Add xdp.frame_sz in bpf_prog_test_run_xdp().")
> recently changed bpf_prog_test_run_xdp() to use larger frames for XDP in
> order to test tail growing frames (via bpf_xdp_adjust_tail) and to have
> memory backing frame better resemble drivers.
> The commit contains a bug, as it tries to copy the max data size from
> userspace, instead of the size provided by userspace.  This cause XDP
> unit tests to fail sporadically with EFAULT, an unfortunate behavior.
> The fix is to only copy the size specified by userspace.
> Fixes: bc56c919fce7 ("bpf: Add xdp.frame_sz in bpf_prog_test_run_xdp().")
> Signed-off-by: Jesper Dangaard Brouer <>
> ---


Acked-by: Andrii Nakryiko <>

>  net/bpf/test_run.c |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)


Powered by blists - more mailing lists