lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <a10a25dd-fa53-0e7f-d394-d0123bc95df9@gmail.com>
Date:   Wed, 22 Jan 2020 13:38:30 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     syzbot <syzbot+8ce4113dadc4789fac74@...kaller.appspotmail.com>,
        andriin@...com, ast@...nel.org, bpf@...r.kernel.org,
        corbet@....net, daniel@...earbox.net, davem@...emloft.net,
        dsahern@...il.com, hawk@...nel.org, john.fastabend@...il.com,
        kafai@...com, kuba@...nel.org, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        songliubraving@...com, syzkaller-bugs@...glegroups.com, yhs@...com
Subject: Re: WARNING in bpf_warn_invalid_xdp_action



On 1/22/20 1:01 PM, syzbot wrote:
> syzbot has bisected this bug to:
> 
> commit 58956317c8de52009d1a38a721474c24aef74fe7
> Author: David Ahern <dsahern@...il.com>
> Date:   Fri Dec 7 20:24:57 2018 +0000
> 
>     neighbor: Improve garbage collection
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=124a5985e00000
> start commit:   d0f41851 net, ip_tunnel: fix namespaces move
> git tree:       net
> final crash:    https://syzkaller.appspot.com/x/report.txt?x=114a5985e00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=164a5985e00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=d9290aeb7e6cf1c4
> dashboard link: https://syzkaller.appspot.com/bug?extid=8ce4113dadc4789fac74
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=11f99369e00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=13d85601e00000
> 
> Reported-by: syzbot+8ce4113dadc4789fac74@...kaller.appspotmail.com
> Fixes: 58956317c8de ("neighbor: Improve garbage collection")
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> 

bisection looks bogus...

It would be nice to have alternative helpers to conveniently replace some WARN_ON/WARN_ONCE/...
and not having to hand-code stuff like :

diff --git a/net/core/filter.c b/net/core/filter.c
index 538f6a735a19f017df8e10149cb578107ddc8cbb..633988f7c81b3b4f015d827ccb485e8b227ad20b 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -6913,11 +6913,15 @@ static bool xdp_is_valid_access(int off, int size,
 
 void bpf_warn_invalid_xdp_action(u32 act)
 {
+       static bool __section(.data.once) warned;
        const u32 act_max = XDP_REDIRECT;
 
-       WARN_ONCE(1, "%s XDP return value %u, expect packet loss!\n",
-                 act > act_max ? "Illegal" : "Driver unsupported",
-                 act);
+       if (!warned) {
+               warned = true;
+               pr_err("%s XDP return value %u, expect packet loss!\n",
+                      act > act_max ? "Illegal" : "Driver unsupported", act);
+               dump_stack();
+       }
 }
 EXPORT_SYMBOL_GPL(bpf_warn_invalid_xdp_action);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ