lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 Jan 2010 18:38:49 -0600
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc:	sam@...ack.fr, linux-security-module@...r.kernel.org,
	kaber@...sh.net, hadi@...erus.ca, zbr@...emap.net,
	nhorman@...driver.com, netdev@...r.kernel.org,
	netfilter-devel@...r.kernel.org
Subject: Re: [RFC 2/9] Revert "lsm: Remove the socket_post_accept() hook"

Quoting Tetsuo Handa (penguin-kernel@...ove.SAKURA.ne.jp):
> Serge E. Hallyn wrote:
> > Quoting Samir Bellabes (sam@...ack.fr):
> > > This reverts commit 8651d5c0b1f874c5b8307ae2b858bc40f9f02482.
> > > 
> > > snet needs to reintroduce this hook, as it was designed to be: a hook for
> > > updating security informations on objects.
> > > 
> > > Signed-off-by: Samir Bellabes <sam@...ack.fr>
> > 
> > Acked-by: Serge Hallyn <serue@...ibm.com>
> > 
> > (contingent of course on the proposed user actually going in :)
> > 
> > > diff --git a/net/socket.c b/net/socket.c
> > > index 8984973..fcd4f2b 100644
> > > --- a/net/socket.c
> > > +++ b/net/socket.c
> > > @@ -1557,6 +1557,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:
> 
> I think we should call security_socket_post_accept() before fd_install().
> Otherwise, other threads which share fd tables can use
> security-informations-not-yet-updated accept()ed sockets.

That makes sense.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ