iPhone Dev Team has released Redsn0w 0.9.5 beta 2 for iPhone OS 4.0 as it released OS 4.0 jailbreak tool redsn0w 0.9.5 beta 1 a day before.
The new redsn0w 0.9.5 beta version resolves the SMS or data issues which the users have observed with redsn0w 0.9.5 beta 1 while they try to jailbreak iPhone OS 4.0.
So, you can grab redsn0w 0.9.5 beta 2 from the following link, as right now redsn0w 0.9.5 beta 2 just supports iPhone 3G, Mac OS X and iPhone OS 4.0 beta 1 firmware.
Download Redsn0w 0.9.5 Beta 2 for iPhone OS 4