This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
blunty666's profile picture

[CC 1.6x] Can crash any computer with rednet

Started by blunty666, 25 August 2014 - 04:40 PM
blunty666 #1
Posted 25 August 2014 - 06:40 PM
VERSION:
ComputerCraft 1.6x

DESCRIPTION:
Can crash any computer with an open rednet modem by broadcasting an empty "dns" message from another computer. Also, any program can crash the computer it's running on simply by queueing a correctly formed "rednet_message" event.

EXPECTED RESULT:
No crash :P/>

REPRODUCTION STEPS:
Get any computer, turtle or pocket computer with a wireless modem and open rednet on that modem. On another computer with a wireless modem also, use the code:

rednet.open(modemSide)
rednet.broadcast(0, "dns")
The first computer receives this message on it's open modem and it crashes the rednet.run coroutine ran from the bios.

This is also done by queueing the event:

os.queueEvent("rednet_message", 0, 0, "dns")
on any computer, again crashing the rednet.run coroutine.

SCREENSHOT/VIDEO:
None

CAUSE:
In the rednet.run function, when a "rednet_message" event is fired it doesn't check if tMessage is a table before trying to index sType to see if it is a "lookup" message.
Bomb Bloke #2
Posted 11 February 2015 - 10:16 AM
Bumpity - still a thing under 1.66pr4.
blunty666 #3
Posted 07 September 2015 - 06:12 PM
Not sure if I'm allowed to bump my own bug post but it's still present in 1.74. I've been in two minds as to whether or not to highlight this bug again as it can be used maliciously very easily, especially considering the dns message gets re-broadcast by the repeat program.
Edited on 07 September 2015 - 04:13 PM
dan200 #4
Posted 11 December 2015 - 03:27 PM
fixed in 1.76