Apple has just released iOS 4.0.2 for all iPhones, iPod touches, and iOS 3.2.2 for iPad to patch the PDF exploit which was used by JailbreakMe to jailbreak all iOS devices on iOS 4.0.1. If you want to keep your jailbreak and unlock, you better not update to this latest firmware now or you will be out of luck for long. Incase you have decided not to update, make sure you use PDF Loading Warner app which will make your web browsing safe. Of course if you care about security of your iPhone, then you can go ahead and update to the latest firmware from iTunes.
To update to iOS 4.0.2 for iPhone, and iOS 3.2.2 for iPad, all you need to do is to connect your iPhone/iPod touch/iPad with your computer via USB and start iTunes. You should now see a message as shown below. Simply click on “Download and Install” button to get on to the new firmware.
Direct Download Links for iOS 4.0.2 (Official from Apple)
Download iTunes 9.2.1 for Windows and Mac