summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_usrreq.c
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1999-09-29 21:09:41 +0000
committerguido <guido@FreeBSD.org>1999-09-29 21:09:41 +0000
commit12294bc989808231a33a98291c237ff526bfbafb (patch)
tree63777199e1afdc19e63fd4f41692f70e3eaa55ce /sys/kern/uipc_usrreq.c
parent221c15bec1f15af57b4938585fa8b960a5f7cf87 (diff)
downloadFreeBSD-src-12294bc989808231a33a98291c237ff526bfbafb.zip
FreeBSD-src-12294bc989808231a33a98291c237ff526bfbafb.tar.gz
Do not follow symlinks when binding a unix domain socket.
This fixes the ssh 1.2.27 vulnerability as reported in bugtraq.
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r--sys/kern/uipc_usrreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 66352aa..7f9304a 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -548,7 +548,7 @@ unp_bind(unp, nam, p)
return EINVAL;
strncpy(buf, soun->sun_path, namelen);
buf[namelen] = 0; /* null-terminate the string */
- NDINIT(&nd, CREATE, FOLLOW | LOCKPARENT, UIO_SYSSPACE,
+ NDINIT(&nd, CREATE, NOFOLLOW | LOCKPARENT, UIO_SYSSPACE,
buf, p);
/* SHOULD BE ABLE TO ADOPT EXISTING AND wakeup() ALA FIFO's */
error = namei(&nd);
OpenPOWER on IntegriCloud