-
Notifications
You must be signed in to change notification settings - Fork 9
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
Supernode crash when creating dynamic keys for username-password auth #30
Comments
For more context: Windows Event Viewer reports this Error as exception code 0xc0000374 (Heap Corruption) for module ntdll.dll
Watching ProcessMonitor this appears to happen soon after the supernode closes the community.list file. Using WinDbg and running !analyze -v on crash .dmp file:
|
The speck_init() function will always allocate its own buffer, so dont allocate one as that leads to memory leaks. In some configuations, the speck_init will not use the standard malloc() and this may cause issues when trying to use free() on the returned ctx. This issue definitely occurs with the Windows builds and lead to the supernode aborting with "exception code 0xc0000374 (Heap Corruption)" (Ref n42n#30)
Thank you for your clear and concise reproduction steps - that was very helpful. I believe I have addressed this bug in 51eb3d7 - are you able to test the windows binaries from https://github.com/hamishcoleman/n3n/actions/runs/9088706213/artifacts/1503386924 ? |
Thank you! The issue is fixed with these binaries and I was able to get a supernode running with successful edge connections. |
Great to hear. Thanks for confirming that. I will make a new bugfix release with this change shortly. |
The speck_init() function will always allocate its own buffer, so dont allocate one as that leads to memory leaks. In some configuations, the speck_init will not use the standard malloc() and this may cause issues when trying to use free() on the returned ctx. This issue definitely occurs with the Windows builds and lead to the supernode aborting with "exception code 0xc0000374 (Heap Corruption)" (Ref n42n#30)
Hey,
This is a repeat of the following issue: ntop/n2n#1161
Testing on a Windows 11 machine this happens on both n3n 3.3.4 and n2n 3.1.1 binaries with minimal config settings.
If username/password auth is enabled and community.list has any users listed the supernode process closes after announcing it is calculating dynamic keys.
e.g. the following is ran and the program closes with no error code.
community.list
dynkey_test.conf
The text was updated successfully, but these errors were encountered: