Prev: [113/145] x86: Add iMac9,1 to pci_reboot_dmi_table
Next: [003/145] V4L/DVB: dvb: l64781.ko broken with gcc 4.5
From: Greg KH on 12 Mar 2010 19:40 2.6.32-stable review patch. If anyone has any objections, please let me know. ---------------- From: Eric W. Biederman <ebiederm(a)xmission.com> commit 76dadd76c265a0cdb5a76aa4eef03fcc9639b388 upstream. We use scm_send and scm_recv on both unix domain and netlink sockets, but only unix domain sockets support everything required for file descriptor passing, so error if someone attempts to pass file descriptors over netlink sockets. Signed-off-by: Eric W. Biederman <ebiederm(a)xmission.com> Signed-off-by: David S. Miller <davem(a)davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- net/core/scm.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/core/scm.c +++ b/net/core/scm.c @@ -156,6 +156,8 @@ int __scm_send(struct socket *sock, stru switch (cmsg->cmsg_type) { case SCM_RIGHTS: + if (!sock->ops || sock->ops->family != PF_UNIX) + goto error; err=scm_fp_copy(cmsg, &p->fp); if (err<0) goto error; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |