As suspected, earlier today, Apple has released an iOS update for iPhone, iPod Touch, and iPad, to patch the PDF exploit that allows the JailbreakMe jailbreak to work.
If you care about your jailbreak or unlock AVOID THIS UPDATE AT ALL COSTS. This patches the exploit used for the JailbreakMe jailbreak to work. iPhone 3G and iPod Touch 2g will most likely still be able to be jailbroken with Redsn0w, but this has not been confirmed.
This is bad news for folks who don’t have their iPhone 4 yet. All units currently on route, should be safe, but any new units leaving the manufacturer will surely come with 4.0.2 installed.
UPDATE #1: iOS 4.0.2 does NOT include a baseband update, so Ultrasn0w will still work. The trick is, you must be jailbroken to install Ultrasn0w. Avoid this update if you require an unlock.
UPDATE #2: MuscleNerd, of the iPhone Dev Team has confirmed Redsn0w is still good: “hah redsn0w from June http://is.gd/eduZD can still JB 4.0.2 for iPhone3G and ipt2G(non-MC) ONLY (point it at 4.0 IPSW)”