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

Possible abuse of proxy uri. #93

Open
ezequiel-umu opened this issue Feb 23, 2016 · 5 comments
Open

Possible abuse of proxy uri. #93

ezequiel-umu opened this issue Feb 23, 2016 · 5 comments

Comments

@ezequiel-umu
Copy link

I think there could be an abuse of proxy uri which makes this scenario going buggy:

  1. As there is no DTLS support, I've written a DTLS to UDP tunnel.
  2. Every packet received from UDP IoTAgent is then sended via DTLS.

The problem is basically this:

captura de pantalla de 2016-02-23 12 59 38

Every request generates an internal server error which have no sense as every packet is exactly the same but with different port configuration.

The scenario can be summarized as:

  1. A piece of software which listens to port 5689 for UDP packets (assuming CoAP packets).
  2. The same piece of software captures the payload, generates a new DTLS packet with that payload.
  3. DTLS packets are routed to a device, which is already connected by DTLS.
  4. A symmetric scenario follows the packets from DTLS to UDP.

The third point isn't represented by wireshark capture. Wireshark capture only contains the UDP part of the scenario, which in this case is local (using lo interface).

Any idea?

Note: It may have nothing to do with proxy uri, but I think it is the cause.

@dmoranj
Copy link
Contributor

dmoranj commented Feb 23, 2016

Difficult to say without replicating the whole scenario. Can you provide more details about how you created the DTLS tunnel and how are you trying to use the library (commands you are using and so on)?

@dmoranj
Copy link
Contributor

dmoranj commented Feb 23, 2016

Ok, it seems it doesn't have anything to do with DTLS, as the problem can be reproduced with a simple get request. I'm working on the problem.

@ezequiel-umu
Copy link
Author

I updated the issue.
By the way, I'm using lwm2m-iotagent from TelefonicaI+D as software, which uses this library.

@dmoranj
Copy link
Contributor

dmoranj commented Feb 23, 2016

Ok. The IoT Agent is using this library to deal with LWM2M, so I'll focus on solving the problem here, and it should be fixed then in the IOTA.

@dmoranj
Copy link
Contributor

dmoranj commented Feb 23, 2016

There seem to be a bug in node-coap, middleware.js, line 54: request.packet should be packet. It raises a "request not defined" error that goes all back to the parseRequest() catch, where it ends up converted in a 5.00 error. Tomorrow, first thing in the morning, I'll make a proposal bugfix to the repository.

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