Commit graph

64 commits

Author SHA1 Message Date
Magnus Kroken
b6f6df1d77 strongswan: backport upstream fixes for CVEs in gmp plugin
This fixes:
* CVE-2018-16151
* CVE-2018-16152
* CVE-2018-17540

Details:
https://strongswan.org/blog/2018/09/24/strongswan-vulnerability-(cve-2018-16151,-cve-2018-16152).html
https://strongswan.org/blog/2018/10/01/strongswan-vulnerability-(cve-2018-17540).html

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
2018-11-19 21:58:23 +01:00
Hans Dedecker
e70b4775d3 strongswan: refresh patches
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit 3bc3949e28)
2018-09-24 08:49:41 +02:00
Hans Dedecker
88715598b1 strongswan: fix OpenWrt hotplug script handling
Commit 6cd8fcabe added ipsec hotplug script support by calling "exec
/sbin/hotplug-call ipsec".
Using the exec call breaks the insertion of iptables rules by the _updown.in
script as hotplug-call just replaces the current shell meaning the commands
following exec do not run since the shell is replaced and as a result lead to
connectivity issues.
Fix this by removing the exec command in front of /sbin/hotplug-call.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit d0ac611bf0)
2018-09-24 08:49:40 +02:00
Florian Eckert
1f4c93972e strongswan: add openwrt hotplug script handling
Ipsec user script (/etc/ipsec.user) now get called indirectly by openwrt
"/sbin/hotplug-call". So other packages could also install their scripts
in "/etc/hotplug.d/ipsec".

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 6cd8fcabe6)
2018-09-24 08:49:40 +02:00
Sebastian Kemper
c340159a92 strongswan: include nls.mk for mysql plugin
ibmariadb 10.2 needs to be linked in together with iconv.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
(cherry picked from commit 7a0aebbff2)
2018-09-24 08:49:40 +02:00
Stijn Tintel
8b76a11e67 strongswan: bump to 5.6.3
Fixes the following CVEs:
- CVE-2018-5388
- CVE-2018-10811

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 7bb68c74e2)
2018-06-27 16:33:58 +03:00
Stijn Tintel
ec623f6b42 strongswan: bump to 5.6.2
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-02-27 00:35:47 +01:00
Hans Dedecker
74dbf6bcbe strongswan: add interface uci list
The interface config option allows users to configure logical OpenWRT
interface names in the ipsec section; it allows StrongSwan to listen
and send traffic on specified interface(s). It translates to interfaces_use
StrongSwan option which is a comma sepearted list of network devices
that should be used by charon.
Since StrongSwan can only be started when one of the specified logical
OpenWRT interface is up procd interface triggers are installed to
trigger the reload script.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-12-13 18:46:37 +01:00
Hans Dedecker
1d31d840d4 strongswan: fix reload service
Based on the ipsec running state reload_service is either reloading ipsec
or starting ipsec. However in the latter case it calls ipsec start which
bypasses the procd start_service function which means the running ipsec
instance is not managed by procd.
Fix this by calling start in case ipsec is not running; at the same time
add service_running function which is used by procd provided running
function.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-12-13 10:49:55 +01:00
Stijn Tintel
e247b66790 strongswan: bump to 5.6.1
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-11-30 02:01:24 +01:00
Stijn Tintel
b5c75be32b strongswan: bump to 5.6.0
Fixes CVE-2017-11185.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-28 19:40:03 +03:00
Stijn Tintel
ba1ead54f0 strongswan: use -eq when testing booleans
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
6f00048eca strongswan: convert init script to procd
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
b93a53bd94 strongswan: check return value instead of output
When the strongswan service is running, `ipsec status` returns 0. Check
the return value instead of checking its output.

While at it, remove the [[ ]] bashism, use rereadall instead of
(reread)secrets, and move it inside the if statement.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
44ef6048e2 strongswan: remove checks for UCI config
In commit 36e073d820, some checks were
added to see if the UCI config file exists and if there are any peers
configured in it. Due to these checks, if /etc/config/ipsec exists, but
contains no enabled peers, strongswan will not be started. This is not
ideal, as a user might want to experiment with the UCI config while
keeping existing connections in /etc/ipsec.conf operational.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
3097a8919e strongswan: add charon-cmd utility
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
6cd24ed87c strongswan: add missing charon config files
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
4e94a3ddfd strongswan: add swanctl utility
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
4bb5d8d892 strongswan: add vici plugin
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
0c30b50fe2 strongswan: rename -utils to -ipsec
Since the strongswan-utils package now only contains the aging ipsec
utility, rename it to strongswan-ipsec.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
1a621aaa35 strongswan: split scepclient into separate package
We currently include the SCEP client in strongswan-utils, which is a
dependency of the strongswan-default meta-package. As it's generally not
recommended to generate keys on embedded devices due to lack of entropy,
move the SCEP client to a separate package, and only depend on it in the
strongswan-full meta-package.

While at it, add scepclient.conf to the package.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
ebf304edf6 strongswan: split PKI tool into separate package
We currently include the PKI tool in strongswan-utils, which is a
dependency of the strongswan-default meta-package. As it's generally not
recommended to generate keys on embedded devices due to lack of entropy,
move the PKI tool to a separate package, and only depend on it in the
strongswan-full meta-package.

While at it, add pki.conf to the package.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-08-07 20:19:18 +02:00
Stijn Tintel
4660504c61 strongswan: fix typo
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-05-30 19:25:54 +02:00
Stijn Tintel
a268689adc strongswan: add curve25519 plugin
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-05-30 15:14:13 +02:00
Stijn Tintel
960006be50 strongswan: bump to 5.5.3
Fixes CVE-2017-9022, CVE-2017-9023.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-05-30 15:14:04 +02:00
Stijn Tintel
18b076ab93 strongswan: bump to 5.5.2
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-04-26 23:31:27 +02:00
Stijn Tintel
7db2439564 Merge pull request #3585 from dedeckeh/strongswan_uci
strongswan: UCI support
2017-03-09 03:59:56 +01:00
Stijn Tintel
f84dfc1c06 strongswan: enable IKEv2 Mediation Extension
Closes #3905.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-01-30 14:05:05 +01:00
Hans Dedecker
36e073d820 strongswan: uci config support
Add support to configure strongswan via uci.

uci support is based on the following sections
-ipsec : Global config items belonging in the strongswan.conf file
-remote : Defines the remote peer(s)
-tunnel : Defines the IPSec connections in tunnel mode
-transport : Defines the IPSec connections in transport mode
-crypto_proposal : Defines the different crypto proposals

Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>
Signed-off-by: Gino Peeters <peeters.gino@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-01-06 13:32:13 +01:00
Hans Dedecker
8b69c86664 strongswan: Fix compile error due to __kernel_nlink_t being re-defined
Patch 101-musl-fixes defines __kernel_nlink_t as void; but using
a pre-3.6.11 kernel on an arm cortex defines __kernel_nlink_t as
unsigned short using uclibc
Fix the compile issue by not redefining __kernel_nlink_t

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-11-09 11:32:54 +01:00
Stijn Tintel
e122cb0571 Merge pull request #3039 from dedeckeh/strongswan-musl
strongswan: Include musl.h after _GNU_SOURCE define
2016-11-02 14:51:32 +02:00
Hans Dedecker
fbbab2e7a7 strongswan: Include musl.h after _GNU_SOURCE define
musl.h was included before _GNU_SOURCE in 101-musl-fixes patch
leading to compilation issue on gcc (RTLD_DEFAULT not being
defined in dlfcn.h due to __USE_GNU not being set).
As described in the feature test macro man page feature macro
can be defined in the source code but need to be defined before
including any headers.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-11-02 13:44:43 +01:00
Stijn Tintel
37f4ba2377 strongswan: take over maintainership
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-10-31 11:01:30 +02:00
Stijn Tintel
7d0ee222df strongswan: bump to 5.5.1
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-10-31 11:01:30 +02:00
Stijn Tintel
fc67bf7c2b strongswan: preserve /etc/strongswan.d during upgrade
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-10-31 11:01:30 +02:00
Stijn Tintel
1138d6fee0 strongswan: bump to 5.5.0 (#2976)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-07-18 17:33:46 +02:00
Stijn Tintel
108197ddcf strongswan: bump to 5.4.0
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-07-06 19:54:40 +02:00
Stijn Tintel
475be1df93 strongswan: add forecast plugin
Closes #1868.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-07-06 19:54:40 +02:00
Stijn Tintel
06cf48b15e strongswan: fix alignment in connmark plugin
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-07-06 19:54:40 +02:00
Stijn Tintel
064d166efd strongswan: run sleep with integer argument
The default busybox config used by OpenWrt does not enable floating
point number support for the sleep applet. This can cause an error when
stopping or restarting strongswan:

sleep: invalid number '0.1'

Replace the float with an integer to fix this.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-07-06 19:54:40 +02:00
Stefan Weil
6d2c0fd06f net: Fix typos (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-10 12:51:10 +02:00
Steven Barth
393a788cc0 strongswan: bump to 5.3.5
Signed-off-by: Steven Barth <steven@midlink.org>
2016-01-20 14:45:46 +01:00
Stijn Tintel
e8d9c06e2e strongswan: preserve /etc/ipsec.d during upgrade
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-01-19 15:36:15 +01:00
Stijn Tintel
f3d1722bb2 strongswan: add upstream patch for bug in 5.3.4
See https://wiki.strongswan.org/issues/1213

Removed the changes to charon-xpc.c because they didn't apply and are
only used on OS X anyway.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2015-11-28 12:38:40 -05:00
Steven Barth
8bf976096e strongswan: update to 5.3.4
Fixes CVE-2015-8023

Signed-off-by: Steven Barth <steven@midlink.org>
2015-11-23 14:25:41 +01:00
brainsucker-na
f705b3c0bf strongswan: gmpdh plugin, package and strongswan-isakmp metapackage
gmpdh plugin implements DH Groups (same as normal GMP plugin), but links to GMP statically and is stripped of all RSA based stuff. Binary size for plugin is ~20kbytes with no dependency on libgmp (200+ kbytes after squash), easilly fitting into flash space restricted devices.

strongswan-isakmp metapackage defines a minimal set of strongswan plugins (including gmpdh) for ISAKMP / IKEv1 PSK tunnels. Will fit even 4mb routers (like tplink wr841n) with disabled IPv6 support and packages (so its a trade - IPv6 or ipsec tunnels).

Signed-of-by: Mikalai Miadzvedz <brainsucker.na@gmail.com>
2015-11-19 00:45:41 +03:00
Steven Barth
7bb0dc34f3 strongswan: bump to 5.3.3
Signed-off-by: Steven Barth <steven@midlink.org>
2015-09-07 11:06:37 +02:00
Marcin Jurkowski
734d3e2284 strongswan: make kmod-ipsec6 dependency conditional
Makes kmod-ipsec6 requirement dependent on IPv6 support for packages.
This allows to disable unnecessary IPv6 kernel modules, saving
considerable amount of space.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
2015-09-01 15:06:52 +02:00
Dirk Feytons
54ff3f0996 strongswan: add a couple more plugins
Signed-off-by: Dirk Feytons <dirk.feytons@gmail.com>
2015-08-27 14:09:18 +02:00
Ulrich Weber
2b3784cdb1 strongswan: dont overwrite ipsec.conf and ipsec.user during upgrade
Signed-off-by: Ulrich Weber <uw@ocedo.com>
2015-08-25 10:12:58 +02:00