Skip to content
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

Encrypted lease set reliably crashes i2pd (server) instance #2124

Closed
mashdragon opened this issue Nov 17, 2024 · 4 comments
Closed

Encrypted lease set reliably crashes i2pd (server) instance #2124

mashdragon opened this issue Nov 17, 2024 · 4 comments

Comments

@mashdragon
Copy link

mashdragon commented Nov 17, 2024

See PurpleI2P/i2pd_docs_en#101 for context. I wanted to set up an encrypted lease set, but when making the connection from client to server it ended up crashing i2pd with:
Floating point exception (core dumped)

I compiled with compiler hardening enabled.

Here is what my tunnels.conf looked like:

server:

[my-server]
type = server
host = 127.0.0.1
port = 5000
keys = my-server.dat
inbound.length = 1
outbound.length = 1
# For keys blinding (encrypted LeaseSet)
signaturetype = 11
# Lease set config
i2p.streaming.maxOutboundSpeed = 2000000000
i2p.streaming.maxInboundSpeed = 2000000000
i2p.streaming.profile = 2
i2cp.leaseSetType = 5
i2cp.leaseSetPrivKey = <base64 encoded 32 bytes>
i2cp.dontPublishLeaseSet = true

client (machine 2):

[my-client]
type = client
address = 127.0.0.1
port = 6000
destination = <Encrypted B33 address of server's I2P tunnel>
keys = my-server-keys.dat
inbound.length = 1
outbound.length = 1

This will always crash the server i2pd. Version 3c608ec

Also, the client gets a lot of "incoming tags". Sometimes it was small (like 26). Sometimes large (3000 or more). Is this expected? The "Tags sessions" was small, like 1.

Whether you have encrypted leases or not it still crashes. With its regular b32 address after removing the encrypted lease settings I was able to send some packets and get a response before it crashed.

The crash still happens with hardening off when compiling.

The crash still happens on release 2.54.0.

OS: Ubuntu 22.04.5 LTS

@orignal
Copy link
Contributor

orignal commented Nov 17, 2024

i2cp.dontPublishLeaseSet = true
why is it in a server tunnel?

Also try to remove i2p.streaming.maxOutboundSpeed and i2p.streaming.maxInboundSpeed .

@mashdragon
Copy link
Author

mashdragon commented Nov 17, 2024

Good question. The docs do not explain the context very much for this option, so I did not know it was not meant to be used for servers: https://i2pd.readthedocs.io/en/latest/user-guide/tunnels/#signature-types I have only a very beginner's knowledge of lease sets.

I was trying to follow #2104 and it looks like I mixed up client vs server for this option.

I will try making those changes and see if it does not crash.

@orignal
Copy link
Contributor

orignal commented Nov 17, 2024

Does it crash on high load or always?

@mashdragon
Copy link
Author

Thank you for your comments. I removed i2cp.dontPublishLeaseSet, i2p.streaming.maxOutboundSpeed, and i2p.streaming.maxInboundSpeed. Now i2pd no longer crashes under these settings.

The crash happened always.

@orignal orignal closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants