<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/if_wg, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>base: remove if_wg(4) and associated utilities, manpage</title>
<updated>2021-03-17T14:14:48+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-16T02:38:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f187d6dfbf633665ba6740fe22742aec60ce02a2'/>
<id>f187d6dfbf633665ba6740fe22742aec60ce02a2</id>
<content type='text'>
After length decisions, we've decided that the if_wg(4) driver and
related work is not yet ready to live in the tree.  This driver has
larger security implications than many, and thus will be held to
more scrutiny than other drivers.

Please also see the related message sent to the freebsd-hackers@
and freebsd-arch@ lists by Kyle Evans &lt;kevans@FreeBSD.org&gt; on
2021/03/16, with the subject line "Removing WireGuard Support From Base"
for additional context.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After length decisions, we've decided that the if_wg(4) driver and
related work is not yet ready to live in the tree.  This driver has
larger security implications than many, and thus will be held to
more scrutiny than other drivers.

Please also see the related message sent to the freebsd-hackers@
and freebsd-arch@ lists by Kyle Evans &lt;kevans@FreeBSD.org&gt; on
2021/03/16, with the subject line "Removing WireGuard Support From Base"
for additional context.
</pre>
</div>
</content>
</entry>
<entry>
<title>if_wg: fix build with DIAGNOSTICS</title>
<updated>2021-03-15T12:36:02+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-15T12:31:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ff92a03616c5caec5ce0c42dd76722e1b6dc9e51'/>
<id>ff92a03616c5caec5ce0c42dd76722e1b6dc9e51</id>
<content type='text'>
This file got resynced with OpenBSD to pick up fixes that had taken
place after the version initially ported to FreeBSD.  KASSERT there is
more like MPASS here.

Reported by:	David Wolfskill &lt;david@catwhisker.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This file got resynced with OpenBSD to pick up fixes that had taken
place after the version initially ported to FreeBSD.  KASSERT there is
more like MPASS here.

Reported by:	David Wolfskill &lt;david@catwhisker.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>if_wg: close the sockets if wg_socket_bind() failed</title>
<updated>2021-03-15T06:23:56+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-15T06:23:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=25529f11cff891139bbddb257f54fcd67c1b3ef7'/>
<id>25529f11cff891139bbddb257f54fcd67c1b3ef7</id>
<content type='text'>
This fixes the remaining cred leak that prevented jails from fully dying
in some error cases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the remaining cred leak that prevented jails from fully dying
in some error cases.
</pre>
</div>
</content>
</entry>
<entry>
<title>if_wg: stop holding creds in wg_socket_init()</title>
<updated>2021-03-15T06:21:25+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-15T06:21:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=99158c7fbd565e0898ee31f47bbdf091e0c853d8'/>
<id>99158c7fbd565e0898ee31f47bbdf091e0c853d8</id>
<content type='text'>
We're now xlocked when we create sockets, so we're now guaranteed that
the creds won't be released out from underneath us over in
wg_prison_remove().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're now xlocked when we create sockets, so we're now guaranteed that
the creds won't be released out from underneath us over in
wg_prison_remove().
</pre>
</div>
</content>
</entry>
<entry>
<title>if_wg: fix the !INET6 support</title>
<updated>2021-03-15T05:41:38+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-15T05:38:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=11704859477cdb75a077807f53132be4d518e7f5'/>
<id>11704859477cdb75a077807f53132be4d518e7f5</id>
<content type='text'>
INET is still required, so formally don't build it in !INET
configurations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
INET is still required, so formally don't build it in !INET
configurations.
</pre>
</div>
</content>
</entry>
<entry>
<title>if_wg: import latest fixup work from the wireguard-freebsd project</title>
<updated>2021-03-15T04:52:04+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-15T02:25:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=74ae3f3e33b810248da19004c58b3581cd367843'/>
<id>74ae3f3e33b810248da19004c58b3581cd367843</id>
<content type='text'>
This is the culmination of about a week of work from three developers to
fix a number of functional and security issues.  This patch consists of
work done by the following folks:

- Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
- Matt Dunwoodie &lt;ncon@noconroy.net&gt;
- Kyle Evans &lt;kevans@FreeBSD.org&gt;

Notable changes include:
- Packets are now correctly staged for processing once the handshake has
  completed, resulting in less packet loss in the interim.
- Various race conditions have been resolved, particularly w.r.t. socket
  and packet lifetime (panics)
- Various tests have been added to assure correct functionality and
  tooling conformance
- Many security issues have been addressed
- if_wg now maintains jail-friendly semantics: sockets are created in
  the interface's home vnet so that it can act as the sole network
  connection for a jail
- if_wg no longer fails to remove peer allowed-ips of 0.0.0.0/0
- if_wg now exports via ioctl a format that is future proof and
  complete.  It is additionally supported by the upstream
  wireguard-tools (which we plan to merge in to base soon)
- if_wg now conforms to the WireGuard protocol and is more closely
  aligned with security auditing guidelines

Note that the driver has been rebased away from using iflib.  iflib
poses a number of challenges for a cloned device trying to operate in a
vnet that are non-trivial to solve and adds complexity to the
implementation for little gain.

The crypto implementation that was previously added to the tree was a
super complex integration of what previously appeared in an old out of
tree Linux module, which has been reduced to crypto.c containing simple
boring reference implementations.  This is part of a near-to-mid term
goal to work with FreeBSD kernel crypto folks and take advantage of or
improve accelerated crypto already offered elsewhere.

There's additional test suite effort underway out-of-tree taking
advantage of the aforementioned jail-friendly semantics to test a number
of real-world topologies, based on netns.sh.

Also note that this is still a work in progress; work going further will
be much smaller in nature.

MFC after:	1 month (maybe)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the culmination of about a week of work from three developers to
fix a number of functional and security issues.  This patch consists of
work done by the following folks:

- Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
- Matt Dunwoodie &lt;ncon@noconroy.net&gt;
- Kyle Evans &lt;kevans@FreeBSD.org&gt;

Notable changes include:
- Packets are now correctly staged for processing once the handshake has
  completed, resulting in less packet loss in the interim.
- Various race conditions have been resolved, particularly w.r.t. socket
  and packet lifetime (panics)
- Various tests have been added to assure correct functionality and
  tooling conformance
- Many security issues have been addressed
- if_wg now maintains jail-friendly semantics: sockets are created in
  the interface's home vnet so that it can act as the sole network
  connection for a jail
- if_wg no longer fails to remove peer allowed-ips of 0.0.0.0/0
- if_wg now exports via ioctl a format that is future proof and
  complete.  It is additionally supported by the upstream
  wireguard-tools (which we plan to merge in to base soon)
- if_wg now conforms to the WireGuard protocol and is more closely
  aligned with security auditing guidelines

Note that the driver has been rebased away from using iflib.  iflib
poses a number of challenges for a cloned device trying to operate in a
vnet that are non-trivial to solve and adds complexity to the
implementation for little gain.

The crypto implementation that was previously added to the tree was a
super complex integration of what previously appeared in an old out of
tree Linux module, which has been reduced to crypto.c containing simple
boring reference implementations.  This is part of a near-to-mid term
goal to work with FreeBSD kernel crypto folks and take advantage of or
improve accelerated crypto already offered elsewhere.

There's additional test suite effort underway out-of-tree taking
advantage of the aforementioned jail-friendly semantics to test a number
of real-world topologies, based on netns.sh.

Also note that this is still a work in progress; work going further will
be much smaller in nature.

MFC after:	1 month (maybe)
</pre>
</div>
</content>
</entry>
<entry>
<title>if_wg: export tx_bytes, rx_bytes, and last_handshake</title>
<updated>2021-03-09T19:50:41+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-09T10:57:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=94dddbfd00b9d53d1b6a45a58bc87b323cae6791'/>
<id>94dddbfd00b9d53d1b6a45a58bc87b323cae6791</id>
<content type='text'>
The names are self-explanatory; these are currently only used by the
wg(8) tool, but they are handy data points to have.

Reviewed by:	grehan
MFC after:	3 days
Discussed with:	decke
Differential Revision:	https://reviews.freebsd.org/D29143
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The names are self-explanatory; these are currently only used by the
wg(8) tool, but they are handy data points to have.

Reviewed by:	grehan
MFC after:	3 days
Discussed with:	decke
Differential Revision:	https://reviews.freebsd.org/D29143
</pre>
</div>
</content>
</entry>
<entry>
<title>if_wg: wg_input: remove a couple locals (NFC)</title>
<updated>2021-03-09T19:49:13+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-09T10:59:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=299f8977cef66d19c05d52d19b892fd8c7a235ea'/>
<id>299f8977cef66d19c05d52d19b892fd8c7a235ea</id>
<content type='text'>
We have no use for the udphdr or this hlen local, just spell out the
addition inline.

MFC after:	3 days
Reviewed by:	grehan, markj
Differential Revision:	https://reviews.freebsd.org/D29142
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have no use for the udphdr or this hlen local, just spell out the
addition inline.

MFC after:	3 days
Reviewed by:	grehan, markj
Differential Revision:	https://reviews.freebsd.org/D29142
</pre>
</div>
</content>
</entry>
<entry>
<title>ifconfig: allow displaying/setting persistent-keepalive</title>
<updated>2021-03-09T11:16:42+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-08T01:00:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b3dac3913dc90fbc6f909ee5c4a876097cd90791'/>
<id>b3dac3913dc90fbc6f909ee5c4a876097cd90791</id>
<content type='text'>
The kernel-side already accepted a persistent-keepalive-interval, so
just add a verb to ifconfig(8) for it and start exporting it so that
ifconfig(8) can view it.

PR:		253790
MFC after:	3 days
Discussed with:	decke
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The kernel-side already accepted a persistent-keepalive-interval, so
just add a verb to ifconfig(8) for it and start exporting it so that
ifconfig(8) can view it.

PR:		253790
MFC after:	3 days
Discussed with:	decke
</pre>
</div>
</content>
</entry>
<entry>
<title>if_wg: avoid sleeping under the net epoch</title>
<updated>2021-03-09T11:16:30+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-03-08T06:06:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e80e371d79d825712a9078e0d1a14b62567291c4'/>
<id>e80e371d79d825712a9078e0d1a14b62567291c4</id>
<content type='text'>
No sleeping allowed here, so avoid it.  Collect the subset of data we
want inside of the epoch, as we'll need extra allocations when we add
items to the nvlist.

Reviewed by:	grehan (earlier version), markj
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D29124
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No sleeping allowed here, so avoid it.  Collect the subset of data we
want inside of the epoch, as we'll need extra allocations when we add
items to the nvlist.

Reviewed by:	grehan (earlier version), markj
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D29124
</pre>
</div>
</content>
</entry>
</feed>
