Re: [RFC 0/9] snet: Security for NETwork syscalls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tetsuo Handa (penguin-kernel@xxxxxxxxxxxxxxxxxxx):
> Samir Bellabes wrote:
> > I'm currently testing security_sock_rcv_skb() hook - which is inside
> > sk_filter() - to get skbuffs when then are arriving, and so trying to
> > push the buffer to userspace. In case this is not userfull, userspace
> > is able to use the NFQUEUE of netfilter to get skbuff, and deal
> > with incoming datas.
> 
> Pushing buffer to userspace and wait for userspace's decision will sleep.
> sk_filter() which calls security_sock_rcv_skb() hook is called from
> (e.g.) tcp_v6_do_rcv() and comment of tcp_v6_do_rcv() says that
> "The socket must have it's spinlock held when we get here." 
> Also, comment of rxrpc_queue_rcv_skb() says that
> "the caller must hold a lock on call->lock".
> I think it is not permitted to do sleeping operation inside
> security_sock_rcv_skb().

Ah, there it is, thanks for finding a specific instance.  I'd looked
a bit yesterday but couldn't find it.

Tetsuo, would you mind sending a patch to add a note to security.h's
comment for socket_sock_rcv_skb: that it can't sleep?  It also used
to be the case for security_task_free() which presumably would be
hooked by the ssyscall or whatever was mentioned.

thanks,
-serge
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux