wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: Andrej Mihajlov <and@mullvad.net>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: David Crawshaw <crawshaw@tailscale.com>,
	WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: WireGuard is broken on iOS 15 beta
Date: Fri, 11 Jun 2021 10:42:14 +0200	[thread overview]
Message-ID: <3BD85DF3-A8B2-45BF-A78C-D03524A226DC@mullvad.net> (raw)
In-Reply-To: <CAHmME9rs3g9ar7Fh-BduNFiD4GipuHbQNALOcstVBd-q3OmHdw@mail.gmail.com>

Jason,

My bad, you’re right regarding the Personal VPN.

I just ran your patch and it works great. As David pointed out, the call to valueForKeyPath should be guarded because it throws exception if the given key path does not exist. I use the availability check to bruteforce utun on iOS 15, macOS 12 and onwards while keeping the Key value coding approach on older iOS and macOS as we know that it works great on iOS < 15 and macOS < 12. Just ran the app on macOS 11.4 and it’s still working and using the old code path.

I took a liberty to refactor the proposed solution (see: https://git.zx2c4.com/wireguard-apple/commit/?id=a7ccc8e3031f3502ea4b53a914d37589186e40f8)

Cheers,
Andrej

> On 11 Jun 2021, at 09:53, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> 
> On 6/11/21, Andrej Mihajlov <and@mullvad.net> wrote:
>> IIRC one thing to consider with that lookup: iOS enables users to run
>> Personal VPN and Custom VPN (aka WireGuard) side-by-side so there is a
>> chance you may pick the wrong utun.
> 
> That doesn't make any sense. File descriptors are not OS-global;
> they're process-local. That's how Unix FDs have worked since forever.
> Unless you're suggesting "personal VPN" is somehow resident in the
> same network extension process as WireGuard's "custom VPN"?
> 
> By the way, did the experiment in your branch work? I'd prefer a
> direct route to brute forcing FDs, if possible. But if not, seems like
> my kludge might ultimately do the trick.


  reply	other threads:[~2021-06-11  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 11:44 WireGuard is broken on iOS 15 beta Andrej Mihajlov
2021-06-10 11:51 ` Jason A. Donenfeld
2021-06-10 15:39   ` Jason A. Donenfeld
2021-06-10 22:33     ` David Crawshaw
2021-06-11  7:16       ` Andrej Mihajlov
2021-06-11  7:53         ` Jason A. Donenfeld
2021-06-11  8:42           ` Andrej Mihajlov [this message]
2021-06-11  8:50             ` Jason A. Donenfeld
2021-06-11  9:02               ` Andrej Mihajlov
2021-06-11  9:09                 ` Jason A. Donenfeld
2021-06-16 13:25   ` Andrej Mihajlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BD85DF3-A8B2-45BF-A78C-D03524A226DC@mullvad.net \
    --to=and@mullvad.net \
    --cc=Jason@zx2c4.com \
    --cc=crawshaw@tailscale.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).