lkml.org 
[lkml]   [1998]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.060 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site