summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/monitor_fdpass.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2008-03-24 16:07:37 +0000
committerderaadt <deraadt@openbsd.org>2008-03-24 16:07:37 +0000
commit1b373d95a3cd9be4650f2188421c16de78cfd118 (patch)
tree1079a682b2f825a58e6c1c52c24d99ff7460772c /usr.bin/ssh/monitor_fdpass.c
parent- since we are in control of shared library versions, advise people to (diff)
downloadwireguard-openbsd-1b373d95a3cd9be4650f2188421c16de78cfd118.tar.xz
wireguard-openbsd-1b373d95a3cd9be4650f2188421c16de78cfd118.zip
We were led astray (like many others before us) to believe that
msg_controllen should be CMSG_LEN() instead of CMSG_SPACE() because the kernel fd passing code was erroring out when "cm->cmsg_len != control->m_len" instead of "CMSG_ALIGN(cm->cmsg_len) != control->m_len". On machines with 16-byte alignment, when one thinks about how the ALIGN padding happens, it is clear that msg_controllen has to be CMSG_SPACE() or the kernel cannot hope to bounds check the messages correctly. For now, change the check to cm->cmsg_len > control->m_len to permit the old ABI to continue working. Later perhaps when all the old binaries are gone we can stop permitting their use. lots of discussion with kettenis
Diffstat (limited to 'usr.bin/ssh/monitor_fdpass.c')
0 files changed, 0 insertions, 0 deletions