Date: Fri, 13 Nov 2020 15:52:54 +0300 From: Yuri Pankov <ypankov@xsmail.com> To: Andrea Venturoli <ml@netfence.it>, freebsd-ports@freebsd.org, freebsd@gregv.net Subject: Re: Sudden trouble with net/rdesktop Message-ID: <a8c01ca0-7d4c-7d8a-e07c-b328ac0b9e20@xsmail.com> In-Reply-To: <8d25cba0-63ca-076e-2340-22e31a3015d5@netfence.it> References: <1420575d-2622-2063-3a2f-bb0591b9f71c@netfence.it> <0af296a2-2896-87ba-3f8e-de68276a3baf@xsmail.com> <e7783ede-e860-8498-6acc-3f5b15d58e89@xsmail.com> <8d25cba0-63ca-076e-2340-22e31a3015d5@netfence.it>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------B328E1E40C653729868F259C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Andrea Venturoli wrote: > On 11/12/20 5:18 PM, Yuri Pankov wrote: > >>> Could it be something that changed on remote side, e.g. any recent >>> updates? > > Sure. > Most targets are Windows 10 machines, so they possibly updated to a > newer version, but I don't know. > One is Windows 2012, though, so I don't think that changed that much. OK, I was able to reproduce this; actually, it hit that assertion for all Windows 10 20H2 installs I have, all are updated to latest patches, so I can't tell when this started to happen. Adding a debug print before that assert() shows the following: $ DISPLAY=mercury:0.0 /usr/ports/net/rdesktop/work/rdesktop-1.9.0/rdesktop orion len=128 size=128 Assertion failed: ((len * 2) < size), function _utils_data_to_hex, file utils.c, line 501. So we need the len of 128 we need size of digest buf to be > 256, the following patch worked for me: polaris:ypankov:/usr/ports/net/rdesktop$ cat files/patch-utils.c --- utils.c.orig 2020-11-13 12:40:51 UTC +++ utils.c @@ -584,7 +584,7 @@ _utils_cert_get_info(gnutls_x509_crt_t cert, char *out { char buf[128]; size_t buf_size; - char digest[128]; + char digest[512]; gnutls_x509_dn_t dn; time_t expire_ts, activated_ts; Also attached so you could simply drop it to files/ directory (if the list will pass it through). Though I must admit I have no idea what changed exactly on Windows side caused the digest size to grow that much. >>> As a workaround, try increasing the buf size to e.g. 512 in >>> utils.c:_utils_cert_get_info(). >> >> Sorry, looks like I'm reading that backwards, and increasing the buf >> size will actually make it worse. >> >> BTW, did you previously have rdesktop compiled without DEBUG option, >> so that assert() simply didn't fire, and now it's ON? > > Actually I built it in poudriere *without* DEBUG option. > > I might as well enable it and investigate, then. Sorry, that was another shot in the dark, without actually trying something, and wrong one at it. --------------B328E1E40C653729868F259C Content-Type: text/plain; charset=UTF-8; name="patch-utils.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-utils.c" LS0tIHV0aWxzLmMub3JpZwkyMDIwLTExLTEzIDEyOjQwOjUxIFVUQworKysgdXRpbHMuYwpA QCAtNTg0LDcgKzU4NCw3IEBAIF91dGlsc19jZXJ0X2dldF9pbmZvKGdudXRsc194NTA5X2Ny dF90IGNlcnQsIGNoYXIgKm91dAogewogCWNoYXIgYnVmWzEyOF07CiAJc2l6ZV90IGJ1Zl9z aXplOwotCWNoYXIgZGlnZXN0WzEyOF07CisJY2hhciBkaWdlc3RbNTEyXTsKIAlnbnV0bHNf eDUwOV9kbl90IGRuOwogCXRpbWVfdCBleHBpcmVfdHMsIGFjdGl2YXRlZF90czsKIAo= --------------B328E1E40C653729868F259C--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a8c01ca0-7d4c-7d8a-e07c-b328ac0b9e20>