MuscleNerd has confirmed that RedSn0w 0.9.5 Beta can jailbreak the pre-release of iOS 4.0 GM on the iPhone 3G for those with legit activations.
For those with legit iPhone3G activation on 4.0GM seed, redsn0w from 2 wks ago can JB your device.
RedSn0w 0.9.5 uses the same pwnage2 DFU-mode exploit that's been around since the 2.x days. Nothing new is revealed to Apple, and it's not applicable to the iPad. Don't go near it if you use yellowsn0w, ultrasn0w, or blacksn0w.
The iPhone Dev-Team also stresses that iOS 4 is only intended for developers with authorized access.
It's only for the 3g and it's the same exploit that was in 3.1.2, in 3.1.3, in the beta releases and it seems Apple hasn't closed the hole in this version as well. It's nothing new really.
It's the early unfinished pwnage tool that should have been held back.
Indeed it is possible with the 3gs, i've found a tutorial about going from 3.1.2 with redsnow and upgrade to iOs4, google will help you to find the package to add to pwnage...