top | item 41583689

iOS 18 breaks IMAPS self-signed certs

118 points| mmd45 | 1 year ago |forums.developer.apple.com

148 comments

order

walrus01|1 year ago

I think the solution to this is to:

a) run your own private root CA

b) install the public part of the root CA on your device and trust it (basically the same as many major enterprise end users of android and ios devices need to do already, so this functionality is extremely unlikely to be removed from the operating system)

c) use the root CA to sign a cert for your mail server

Yes it's a bit more hassle than just trying to tell the mail client to trust your self-signed cert that was generated on the mail server and signed by nothing, but I can understand why apple (given the population of hundreds of millions of NON TECHNICAL end users) doesn't want people just blindly clicking through "yes/I accept/trust this server" self signed cert warnings.

Arnt|1 year ago

I switched to letsencrypt certs for my imap server. Works well, IMO better than the self-signed ones I used before.

hedora|1 year ago

That adds a lot of attack surface vs. issuing a self-signed cert and confirming it was securely verified by your imap client.

Not only could let’s encrypt issue a mitm cert for your imap connections, so could other CAs, and any cloud providers / dns providers you use.

ytch|1 year ago

ACME DNS-01 Challenge doesn't need a public resolvable and reachable host, it just sets a temporary DNS record to verify.

mmd45|1 year ago

I'm using a private ip over a vpn so I don't think that workaround will work for me. I don't really want a public dns record.

punnerud|1 year ago

I wish they could break Snapchat, Facebook etcs ‘s self-signed certs. I own the device, why can’t I see the traffic to and from all of these apps if I add my self-signed cert and approve to use a MITM-proxy.

Most apps work, but not everyone.

Often called certificate pinning.

tadfisher|1 year ago

Apple isn't doing certificate pinning, it's the apps verifying the certificate chain themselves by baking in public keys (or hashes/fingerprints). So there's not really a way for Apple to break this.

benmmurphy|1 year ago

If you jailbreak your phone then you are able to remove certificate pinning. If you just want to do this for research purposes then you can buy an old iPhone6s, iPhone8 or iPhoneX and use checkra1n which uses a bug early in the bootchain in order to jailbreak the phone. I think palera1n is based on checkra1n and might have better support for newer iOS versions: https://palera.in/

mmd45|1 year ago

i saw a video on youtube where a guy intercepted https app traffic from an android app for a smart scale where the app used certificate pinning. there was some very automated tool for defeating the cert pinning. unfortunately i can't find the video link.

apparentorder|1 year ago

I run my own CA and install it as a trusted CA via Configuration Profiles. This works fine, including iOS 17.

Does this break in iOS 18 or does this affect only self-signed (untrusted) certificates?

blcknight|1 year ago

I have the same setup and it works fine on iOS 18.

yieldcrv|1 year ago

I feel like this going to happen to the permissionless side of crypto assets just like whats happened to most of the web 1.0 stuff

Walled garden things will take over and something is going to happen to EOAs that make them nerfed or rare

but at the same time, that might take 40 years just like these web 1.0 problems so its fine for now

rmoriz|1 year ago

I had this issue with let's encrypt certificates. IMHO it's unreleated to the issue. IOS18 mail initially connected using TLSv1.3. Afer deleting and re-installing Mail, the connection falls back to TLSSv1.2 and another set of ciphers. Then downloading of mails works again.

Using dovecot 2.3/Ubuntu on the server.

sgt|1 year ago

I think I've seen this before, in previous versions of iOS. You used to be able to just force a trust, but it would ask you again sometimes. I ended up just using LetsEncrypt certs, the one I use on the main website. Then I have a hook that also copies it to mailu.

techbrovanguard|1 year ago

tangent, but you can’t send mail on ios with an idn because “the sender address was invalid”, despite it working in macos. i’ve read this is caused by a broken regex check. if any apple employees are reading please take a look

schoen|1 year ago

Does some other software (like the MUA) need to convert the IDN to punycode before submitting it to the OS?

snapetom|1 year ago

There are so many quirks between the way Mail behaves on iOS vs Mac, its infuriating. At the core of it, if you are manually adding IMAP/SMTP/POP, both just need to get out of the way and stop trying to help. Very typical of Apple to think it knows better than you.

m463|1 year ago

Can you add your own CA cert to your device?

urda|1 year ago

Yes, I have a private CA I install on all my Apple devices for my self-signed certs. After I have the root CA on the device, it looks like any other valid SSL to iOS / macOS.

lxgr|1 year ago

You can, but I find that much less secure than being able to TOFU a self-signed certificate:

I once did this, and besides being incredibly unergonomic, now I have to either securely destroy or safely store the signing key for the self-signed CA, or risk malware from performing an MITM against any app on my device, and not just e.g. the email client.

mysteria|1 year ago

At least with Safari all my internal SSL web services work properly on iOS with the root cert installed. Not sure about IMAP.

farnwomt|1 year ago

I use letsencrypt for my mail server and I have done so for years, but iOS 18 appears to have broken my configuration which has worked perfectly for as long as I can remember. I believe my certificates were all set up correctly because it never gave me a problem up until now and never asked for authorisation of any kind. At this stage MacOSX works just fine, but iOS 18 and iPadOS 18 just do nothing.

stephenmac98|1 year ago

It's 2024, PKI best practices are well known and well documented, anybody still using a self-signed certs on their mail server (or anywhere) is either lazy or stupid.

Plenty of existing applications will refuse to connect to a self-signed certificate on the belief that allowing the end-user to confirm a certificate offers basically 0 protection against malicious actors.

shakow|1 year ago

There is no security hole if I am singing my own certificate for my own mails on my own server; it would mean that I do not trust... myself?

Now if I were to provide this as a commercial service, sure, my customers may be worried.

kortilla|1 year ago

It’s 2024, we’ve seen countless examples of sophisticated hackers getting into all kinds of systems. Anybody who makes a blanket statement that you have to trust the public PKI is either lazy or stupid.

SSH has TOFU and it works very well if you don’t want a key infrastructure.

mmd45|1 year ago

explain how a pinned self signed cert is insecure. i don't see it. it would seem to be more secure than one signed by a public CA that's not pinned.

lxgr|1 year ago

Or is operating a local-only mailserver not connected to the larger internet? I guess that's a lazy or stupid thing too, these days...

I'm a fan of having TLS on by default for everything on the Internet, but I'm seriously annoyed by the collateral damage to local self-hosted services the implementation of that has caused.

It shouldn't be this hard to e.g. host web server on my local network that browsers grace with "trusted website APIs", but it really is. Why on earth do I need to set up Letsencrypt (and by extension at least DNS) on a local website if I want to be able to use a game pad on it, for example!? https://developer.mozilla.org/en-US/docs/Web/Security/Secure...

We absolutely need a localhost and local domain exemption for both TLS/X.509 certificate validation and web APIs. For example, TOFU seems like a much better model for that use case than trying to bend the "public Internet" model until it fits. SSH has had considerable success in that model, for example.

tiberious726|1 year ago

Does anyone know if there is any way to get iOS's mail client to present a client cert? Or, barring that, any form of self-hosted MFA.

mmd45|1 year ago

:-(

hey lurking apple devs- can someone please escalate this?

cpach|1 year ago

I would not bet money that Apple is willing to change their mind regarding this question.

xg15|1 year ago

And the Apple fanboys are loose again...

Regardless how your opinion on PKI and self-signed certificates is, shouldn't we at least be bothered by the fact that Apple just switched off this feature without any communication whatsoever? The community was literally in the dark about whether this is an official policy change or a bug.

Google, in situations like this, at least made some corpospeak press release officially "sunsetting" the feature and provided an official deprecation timeline so users have time to adapt.

Apple is apparently just leaving their users stranded and unable to access their email.

ben_w|1 year ago

I suspect it's worse than that.

Since the UK's Investigatory Powers Act 2016, I've noted that every web browser is necessarily an end-to-end encrypted communication system.

This isn't compatible with what all the spy agencies want. The US can kinda get past that with the reporting obligation for anyone publishing on an app store controlled by a US company. (As a British citizen living in Berlin, the corresponding checkbox when publishing apps is mildly infuriating).

Now that Apple is obligated to allow competitors, that doesn't work. Or perhaps the agencies finally noticed that this problem applies to websites and not just apps (perhaps web apps are finally good enough?)

So the agencies find another way — and this time it comes with an obligation to not report what they're doing.

This smells like that other way.

Might not be correct, but intelligence agencies' long-standing history means it's not paranoia.

nerdile|1 year ago

So in summary: iOS used to accept untrusted certificates, yikes! Now, it validates the server cert, and people are upset? This blatantly insecure thing is broken now and the posters don't want to set it up securely?

It seems like these people are just struggling with how to properly set up their email server and clients when using a private CA. If you're going to use your own CA, then configure your client to trust it. The rest of us should be able to enjoy secure defaults and not have to worry about our less informed family members being tricked into bypassing basic security protections like TLS validation.

mmd45|1 year ago

bad summary. it prompted you to accept the certificate upon first use and then pinned it which is far different than what you are describing in terms of security implications.