Messages in this thread | | | Date | Thu, 15 Oct 1998 20:16:38 +0200 | From | Andi Kleen <> | Subject | Re: LSF and SOCK_PACKET |
| |
On Thu, Oct 15, 1998 at 07:47:20PM +0200, kuznet@ms2.inr.ac.ru wrote: > Hello! > > > Do I miss something again, or do sk_attach_filter/sk_chk_filter really > > not bother to copy the filter instructions from user space to kernel space > > before checking it? > > No, you are right. Generally, sk_filter.c is too direct replica > from bpf. This code was good for bsd, where it was accessible > only by superuser... > > Before allowing to use it to all users it needs careful > line-by-line checking (especially arithmetic overflows!). > F.e. now: > > - it contains invalid unsigned comparisons. > - it has instanses of "long", where "u32" must be used > and does not work on 64bit archs. > - it gives access to small negative offsets (-4,-2,-1), > which is not dangerous, but forces to suspect more bugs.
In short it should be commented out or moved to "CONFIG_VERY_EXPERIMENTAL" for 2.2.0 and check CAP_NET_RAW ?
-Andi
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |