Source: scapy Version: 2.1.0-1 Severity: important attach_filter() in scapy/arch/linux.py is defined as:
| def attach_filter(s, filter):
| ...
| # XXX. Argl! We need to give the kernel a pointer on the BPF,
| # python object header seems to be 20 bytes. 36 bytes for x86 64bits arch.
| if scapy.arch.X86_64:
| bpfh = struct.pack("HL", nb, id(bpf)+36)
| else:
| bpfh = struct.pack("HI", nb, id(bpf)+20)
| s.setsockopt(SOL_SOCKET, SO_ATTACH_FILTER, bpfh)
This code will segfault (or at least won't do the right thing) on every
64-bit architecture except amd64 and on i386 running amd64 kernel.
-- Jakub Wilk
signature.asc
Description: Digital signature

