Date: Sun, 04 Jun 2017 23:08:27 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 219790] Unable to build bhyve with error in rfb.c Message-ID: <bug-219790-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219790 Bug ID: 219790 Summary: Unable to build bhyve with error in rfb.c Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: mshirk@daemon-security.com Trying to build CURRENT as of 6/4/2017 12:00 Noticed parallel builds failing, so I removed my "make -j8" and found I was still getting the following errors while building: /usr/src/usr.sbin/bhyve/rfb.c:835:25: error: expected expression DES_set_key((C_Block *)keystr, &ks); ^ /usr/src/usr.sbin/bhyve/rfb.c:835:16: error: use of undeclared identifier 'C_Block' DES_set_key((C_Block *)keystr, &ks); ^ /usr/src/usr.sbin/bhyve/rfb.c:836:29: error: expected expression DES_ecb_encrypt((C_Block *)challenge, ^ /usr/src/usr.sbin/bhyve/rfb.c:836:20: error: use of undeclared identifier 'C_Block' DES_ecb_encrypt((C_Block *)challenge, ^ /usr/src/usr.sbin/bhyve/rfb.c:837:15: error: expected expression (C_Block *)crypt_expected, &ks, DES_ENCRYPT= ); ^ /usr/src/usr.sbin/bhyve/rfb.c:837:6: error: use of undeclared identifier 'C_Block' (C_Block *)crypt_expected, &ks, DES_ENCRYPT= ); ^ /usr/src/usr.sbin/bhyve/rfb.c:838:29: error: expected expression DES_ecb_encrypt((C_Block *)(challenge + PASSWD_LENGTH), ^ /usr/src/usr.sbin/bhyve/rfb.c:838:20: error: use of undeclared identifier 'C_Block' DES_ecb_encrypt((C_Block *)(challenge + PASSWD_LENGTH), ^ /usr/src/usr.sbin/bhyve/rfb.c:839:15: error: expected expression (C_Block *)(crypt_expected + PASSWD_LENGTH), ^ /usr/src/usr.sbin/bhyve/rfb.c:839:6: error: use of undeclared identifier 'C_Block' (C_Block *)(crypt_expected + PASSWD_LENGTH), ^ 10 errors generated. *** Error code 1 This is a HardenedBSD server with LibreSSL in base, however I noticed that = in rfb.c if NO_OPENSSL is defined, <openssl/des.h> is included, and there is no C_Block struct in that header. I noticed these functions expected a const_DES_cblock type. So making the following changes made bhyve build for me: diff --git a/usr.sbin/bhyve/rfb.c b/usr.sbin/bhyve/rfb.c index 3eb67314c02..c3c31729b96 100644 --- a/usr.sbin/bhyve/rfb.c +++ b/usr.sbin/bhyve/rfb.c @@ -832,11 +832,11 @@ rfb_handle(struct rfb_softc *rc, int cfd) memcpy(crypt_expected, challenge, AUTH_LENGTH); /* Encrypt the Challenge with DES */ - DES_set_key((C_Block *)keystr, &ks); - DES_ecb_encrypt((C_Block *)challenge, - (C_Block *)crypt_expected, &ks, DES_ENCRYPT= ); - DES_ecb_encrypt((C_Block *)(challenge + PASSWD_LENGTH), - (C_Block *)(crypt_expected + PASSWD_LENGTH), + DES_set_key((const_DES_cblock *)keystr, &ks); + DES_ecb_encrypt((const_DES_cblock *)challenge, + (const_DES_cblock *)crypt_expected, &ks, DES_ENCRYPT); + DES_ecb_encrypt((const_DES_cblock *)(challenge + PASSWD_LENGTH), + (const_DES_cblock *)(crypt_expected + PASSWD_LENGTH), &ks, DES_ENCRYPT); if (memcmp(crypt_expected, buf, AUTH_LENGTH) !=3D 0) { It looks like these changes were added with this commit: commit fa2245832bde97021dc63f35729cb10228d0204d=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 Author: araujo <araujo@FreeBSD.org>=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 AuthorDate: Fri Jun 2 02:35:16 20= 17 +0000=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 Commit: araujo <araujo@FreeBSD.org>=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 CommitDate: Fri Jun 2 02:35:16 20= 17 +0000=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 Add VNC Authentication support based on RFC6143 section 7.2.2.=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 Submitted by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 Reworked by: myself=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 Reviewed by: grehan, rgrim= es and jilles=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 MFC after: 1 week. Relnotes: Yes. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D10818 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-219790-8>