-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ncat segfault in __strlen_avx2 () from /usr/lib64/haswell/libc.so.6 #2154
Comments
Could you please test the following patch and report back? --- a/ncat/ncat_main.c 2020-10-07 17:21:42.253789857 -0600
+++ b/ncat/ncat_main.c 2020-10-14 21:37:31.527610020 -0600
@@ -846,7 +846,7 @@
targetaddrs->addr.un.sun_family = AF_UNIX;
strncpy(targetaddrs->addr.un.sun_path, argv[optind], sizeof(targetaddrs->addr.un.sun_path));
targetaddrs->addrlen = SUN_LEN(&targetaddrs->addr.un);
- o.target = argv[optind];
+ o.sslservername = o.target = argv[optind];
optind++;
} else
#endif
@@ -865,7 +865,7 @@
targetaddrs->addr.vm.svm_cid = long_cid;
targetaddrs->addrlen = sizeof(targetaddrs->addr.vm);
- o.target = argv[optind];
+ o.sslservername = o.target = argv[optind];
optind++;
}
} else |
Confirmed
|
The patch has been committed as r38121. Thank you for reporting the issue and pin-pointing the offending commit; my bad. |
I'll apply the committed patch to Clear tomorrow. |
@nnposter Can the fix be backported to the 7.9x release branch, please? |
I am not quite sure what specifically you are asking for. The patch above (f6b4061) can be certainly applied to 7.91 source code and there should be no dependencies on other changes introduced after 7.91. The traditional backporting (i.e. patching the old source code, recompiling, and releasing new packages) could be done by the various distro maintainers, not by Nmap maintainers. I am confident that the next Nmap release will include the fix as well, as this is a straightforward bug fix. |
I was talking about applying that patch to the 7.90 release branch: https://svn.nmap.org/nmap-releases/nmap-7.90/; the 7.91 release has been created from that branch. Otherwise if the next release of nmap (7.92) is created from that branch, it will not include this fix. At least one fix has already been backported to that branch after 7.91 release (r38105, "fix the windows timestamp/timezone problem"), so I assume another 7.9x release from that branch is possible. |
I'm closing this since I believe it has been fixed in Nmap version 7.92. Please post if you are still experiencing the problem with 7.92. |
@stilor The branches in nmap-releases are public for convenience, but not used in a strict release-branch workflow. We branched the 7.92 release off of the main trunk, for instance. |
…to connect libvirt - Update from 7.80 to 7.91 - Update of rootfile - Changelog is too long to include here Full details can be found in the CHANGELOG file in the source tarball - Added patch to fix segfault - nmap/nmap#2154 - Ran with unpatched 7.91 version $ touch /tmp/foo $ nc -U /tmp/foo Segmentation fault - flagged problem in #12647 - Ran with patched 7.91 version $ touch /tmp/foo $ nc -U /tmp/foo Ncat: Connection refused. - Expected behaviour Tested-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> Reviewed-by: Michael Tremer <michael.tremer@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Describe the bug
When invoking ncat over a Unix socket (for example with
nc -U /var/run/libvirt/libvirt-sock
), the application segfaultsTo Reproduce
Expected behavior
In the example above, the expected behavior is:
Version info (please complete the following information):
5.8.14-991.native
ncat --version
:Ncat: Version 7.91 ( https://nmap.org/ncat )
Additional context
To quote clearlinux/distribution#2152 (comment):
As mentioned by @thiagomacieira, the bug was introduced in 7d6cf3a which introduced
o.sslservername
, but that's only for TCP connections, not unix sockets./cc @nnposter as you may have context
/cc clearlinux/distribution#2152
The text was updated successfully, but these errors were encountered: