Re: [RFC v2 00/10] snet: Security for NETwork syscalls

From: Tetsuo Handa
Date: Sun Mar 07 2010 - 00:48:02 EST


Samir Bellabes wrote:
> Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> writes:
>
> > Regarding [RFC v2 02/10] Revert "lsm: Remove the socket_post_accept() hook"
> > @@ -1538,6 +1538,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
> > fd_install(newfd, newfile);
> > err = newfd;
> >
> > + security_socket_post_accept(sock, newsock);
> > +
> > out_put:
> > fput_light(sock->file, fput_needed);
> > out:
> >
> > Please move security_socket_post_accept() to before fd_install().
> > Otherwise, other threads which share fd tables can use
> > security-informations-not-yet-updated accept()ed sockets.
>
> Tetsuo, what about this patch ?
>
Looks OK to me. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/