Apple has just released iOS 4.0.2 firmware upgrade for iPhone & iPod Touch (and iOS 3.2.2 for iPad) which patches the dangerous PDF exploit. Needless to say, if you have a jailbroken iPhone, refrain from updating as this patch closes the loophole used by JailbreakMe tool to jailbreak all iDevices on iOS 4.0.1
The update is available for the iPhone 3G, 3GS, and 4, iPod Touch 2G and 3G. If you have not jailbroken your iDevice and if you don’t intend to, then go right ahead and connect your iPhone/iPod touch/iPad with your computer via USB and start iTunes. As always, you will see a pop-up informing the new update being available.
Direct Download Links for iOS 4.0.2
In case you wish to download the firmware update manually, here are the direct download links