Igalia / pflua

Packet filtering in Lua
Other
313 stars 39 forks source link

pure-lua-opt: 'not len >= x' broken #210

Closed kbara closed 9 years ago

kbara commented 9 years ago

Simplified test case:

% ./pflua-pipelines-match ../tests/data/wingolog.pcap  "not len >= 1" 1                 
BUG: pipelines diverged.
 true: pure-lua-opt
 false: bpf-lua-unopt, libpcap-unopt, libpcap-opt, pure-lua-unopt, bpf-lua-opt

With the original bug, only the pure-lua-opt pipeline is broken.

% ./pflua-pipelines-match ../tests/data/wingolog.pcap  "not len >= 1 - 4294967295" 16059
BUG: pipelines diverged.
 true: pure-lua-opt
 false: bpf-lua-unopt, libpcap-unopt, libpcap-opt, pure-lua-unopt, bpf-lua-opt

How the bug was found:

Git revision b1d62924e22dc033b2f8610afe0b50cd7f0167cf
The property was falsified.
The pflang expression was not len >= 1 - 4294967295 and the packet number 16059
BPF: false, pure-lua: true
Rerun as: pflua-quickcheck --seed=690069675 --iterations=816 properties/pflua_pipelines_match data/wingolog.pcap

A second example:

Git revision b1d62924e22dc033b2f8610afe0b50cd7f0167cf
The property was falsified.
The pflang expression was not len >= 4294967295 * 4294967295 and the packet number 166
BPF: false, pure-lua: true
Rerun as: pflua-quickcheck --seed=15335788 --iterations=620 properties/pflua_pipelines_match data/wingolog.pcap
kbara commented 9 years ago

This is fixed by https://github.com/Igalia/pflua/pull/207 (which was already open when this bug was discovered).

kbara commented 9 years ago

This is a duplicate of https://github.com/Igalia/pflua/issues/205