Got an iPhone or iPad? Be sure to update to iOS 4.0.2 for iPhone and iOS 3.2.2 for iPad. The two updates fix the nasty security flaw that made the widely publicised JailbreakMe hack possible.

The JailbreakMe exploit was, well, nasty. It made use of an apparent flaw in how iOS handles PDF documents (this bug shouldn't affect other PDF readers, just the iOS one, according to Sophos).

Security expert Charlie miller characterised the JailbreakMe exploit as "very beautiful work," and said that it's " scary how it totally defeats apple's [sic] security architecture." So while jailbreakers might be disappointed to see this hack go away, for everyone else it's probably for the best. I mean, if a security bug can jailbreak your phone, there's no telling what else it could do.

There's no word yet on whether or not iOS 4.0.2 un-jailbreaks your phone if you've already done the deed.

For more details, see the iOS 4.0.2 and iOS 3.2.2 pages on Apple's support site. Both updates are available via iTunes upon connecting their respective iOS devices, but update size will vary by device model. iOS 4.0.2 is compatible with any iPhone 3G, iPhone 3GS, iPhone 4, or second- and third-generation iPod touch running iOS 4.0 or later; iOS 3.2.2 is compatible with iPads running iOS 3.2 or later.

Apple iPhone 4

[via Daring Fireball]