Pan17WJ / tinyos-main

Automatically exported from code.google.com/p/tinyos-main
1 stars 0 forks source link

[patch] CoAP overwrites arbitrary memory when receiving a too large packet #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Send a CoAP packet larger than COAP_MAX_PDU_SIZE to the node.
2. Continue as usual.
3. Wonder why the node is acting so strangely after a while...
4. Spend lots of time tracking down the source of the memory corruption.
5. ???
6. Profit!

What is the expected output? What do you see instead?
Too large packets should be ignored rather than copied over other people's 
memory.

What version of the product are you using? On what operating system?
TinyOS 2.x trunk as of a couple of weeks ago.

Please provide any additional information below.
Testing an unsigned number for < 0 seems a bit unnecessary too, but presumably 
the compiler is clever enough to optimize that away.

Original issue reported on code.google.com by jmatts...@dius.com.au on 21 Dec 2011 at 5:00

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by marku...@gmail.com on 22 Dec 2011 at 3:44

GoogleCodeExporter commented 9 years ago
In r5866.

Original comment by marku...@gmail.com on 12 Jan 2012 at 8:52