From: daniel@iogearbox.net (Daniel Borkmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] net: filter: make JITs zero A for SKF_AD_ALU_XOR_X
Date: Tue, 05 Jan 2016 17:36:47 +0100 [thread overview]
Message-ID: <568BF11F.1060507@iogearbox.net> (raw)
In-Reply-To: <1452007387-626-1-git-send-email-rabin@rab.in>
On 01/05/2016 04:23 PM, Rabin Vincent wrote:
> The SKF_AD_ALU_XOR_X ancillary is not like the other ancillary data
> instructions since it XORs A with X while all the others replace A with
> some loaded value. All the BPF JITs fail to clear A if this is used as
> the first instruction in a filter. This was found using american fuzzy
> lop.
>
> Add a helper to determine if A needs to be cleared given the first
> instruction in a filter, and use this in the JITs. Except for ARM, the
> rest have only been compile-tested.
>
> Fixes: 3480593131e0 ("net: filter: get rid of BPF_S_* enum")
> Signed-off-by: Rabin Vincent <rabin@rab.in>
Excellent catch, thanks a lot! The fix looks good to me and should
go to -net tree.
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
If you're interested, feel free to add a small test case for the
SKF_AD_ALU_XOR_X issue to lib/test_bpf.c for -net-next tree. Thanks!
next prev parent reply other threads:[~2016-01-05 16:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 15:23 [PATCH] net: filter: make JITs zero A for SKF_AD_ALU_XOR_X Rabin Vincent
2016-01-05 16:00 ` Eric Dumazet
2016-01-05 16:03 ` Rabin Vincent
2016-01-05 16:37 ` Daniel Borkmann
2016-01-05 16:36 ` Daniel Borkmann [this message]
2016-01-05 17:43 ` Alexei Starovoitov
2016-01-06 5:44 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=568BF11F.1060507@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).