16804 Commits

Author SHA1 Message Date
Tobias Brunner
9fb00bf89f android: Make sure we actually have a tile when updating it
Not sure when this happens exactly, in particular because the reported
stack traces look like this

java.lang.NullPointerException:
  at org.strongswan.android.ui.VpnTileService.updateTile (VpnTileService.java:220)
  at org.strongswan.android.ui.VpnTileService.onStartListening (VpnTileService.java:97)
  at android.service.quicksettings.TileService$H.handleMessage (TileService.java:407)

which violates the API documentation for getQsTile(), which states:

  This tile is only valid for updates between onStartListening() and
  onStopListening().

But apparently that's not always the case. There have been two reports
of such a crash, both on Android 8.0 and on Xiaomi Mi 5/6 devices, so
maybe it's a bug in that particular image.
2018-10-17 11:56:30 +02:00
Tobias Brunner
4bd4750131 android: Fix profile selection/edit when the device is rotated
The previous code lost track of the selected profile IDs, but the
widgets maintained their state (i.e. the list item was still selected and the
edit button still enabled).  Clicking the edit button then caused a crash when
trying to get the first item in the set.
2018-10-17 11:56:30 +02:00
Thomas Egerer
a160f100fb ikev1: Log traffic selectors for missing child configs
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2018-10-17 11:55:16 +02:00
Thomas Egerer
8c732b8e21 task-manager-v1: Clear retransmit alert on request retransmit
The task manager for IKEv1 issues a retransmit send alert in the
retransmit_packet() function. The corresponding retransmit cleared alert
however is only issued for exchanges we initiated after processing the
response in process_response().

For quick mode exchanges we may retransmit the second packet if the peer
(the initiator) does not send the third message in a timely manner. In
this case the retransmit send alert may never be cleared.

With this patch the retransmit cleared alert is issued for packets that
were retransmitted also when we are the responding party when we receive
the outstanding response.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2018-10-17 11:55:16 +02:00
Andreas Steffen
2d3e20a839 sec-updater.sh: Support of Debian 9.0 and Ubuntu 18.04 2018-10-07 10:14:20 +02:00
Tobias Brunner
d4068a1dd8 travis: Don't build botan twice if installing dependencies is retried 2018-10-02 16:14:20 +02:00
Tobias Brunner
6e55856830 fuzzing: Add -lm to LDFLAGS if the coverage sanitizer is used
libFuzzer apparently uses math functions (e.g. ceilf) for that sanitizer.
2018-10-02 10:58:40 +02:00
Tobias Brunner
4a33dcfefc travis: Only build sonarcloud target if the token is available
That's not the case for pull requests that don't have access to
encrypted tokens/environment variables.
2018-10-02 09:38:00 +02:00
Matt Selsky
b98db90763 swanctl: Fix typos in usage for swanctl rekey/terminate commands
Closes strongswan/strongswan#113.
2018-10-02 09:30:03 +02:00
Andreas Steffen
04ef28b4df Version bump to 5.7.1 5.7.1 2018-10-01 17:46:17 +02:00
Tobias Brunner
291c1acd4b NEWS: Add info about CVE-2018-17540 2018-10-01 10:26:08 +02:00
Tobias Brunner
129ab919a8 gmp: Fix buffer overflow with very small RSA keys
Because `keylen` is unsigned the subtraction results in an integer
underflow if the key length is < 11 bytes.

This is only a problem when verifying signatures with a public key (for
private keys the plugin enforces a minimum modulus length) and to do so
we usually only use trusted keys.  However, the x509 plugin actually
calls issued_by() on a parsed certificate to check if it is self-signed,
which is the reason this issue was found by OSS-Fuzz in the first place.
So, unfortunately, this can be triggered by sending an invalid client
cert to a peer.

Fixes: 5955db5b124a ("gmp: Don't parse PKCS1 v1.5 RSA signatures to verify them")
Fixes: CVE-2018-17540
2018-09-26 10:10:48 +02:00
Tobias Brunner
8932d6070f travis: Don't build tags separately
Travis treats tags just like branches (which sonarcloud does too) and the
tagged commit is built anyway.
2018-09-24 14:22:42 +02:00
Andreas Steffen
2a327d438c Version bump to 5.7.0 5.7.0 2018-09-24 11:10:12 +02:00
Tobias Brunner
86c188515e NEWS: Add info about CVE-2018-16151/52 2018-09-21 18:51:58 +02:00
Tobias Brunner
5955db5b12 gmp: Don't parse PKCS1 v1.5 RSA signatures to verify them
Instead we generate the expected signature encoding and compare it to the
decrypted value.

Due to the lenient nature of the previous parsing code (minimum padding
length was not enforced, the algorithmIdentifier/OID parser accepts arbitrary
data after OIDs and in the parameters field etc.) it was susceptible to
Daniel Bleichenbacher's low-exponent attack (from 2006!), which allowed
forging signatures for keys that use low public exponents (i.e. e=3).

Since the public exponent is usually set to 0x10001 (65537) since quite a
while, the flaws in the previous code should not have had that much of a
practical impact in recent years.

Fixes: CVE-2018-16151, CVE-2018-16152
2018-09-21 18:51:58 +02:00
Tobias Brunner
64d88efac5 travis: Run long-running tests first to reduce overall build time
Moving the manual matrix inclusions further up would be even better but
that doesn't seem possible.
2018-09-21 11:03:47 +02:00
Tobias Brunner
231c087e3c android: Disable capabilities in the android app
capset/capget are not in the NDK headers anymore, but we didn't use them
in the app anyway.
2018-09-21 11:01:26 +02:00
Tobias Brunner
7a6426082a android: Fix implementation of change_state() method in Android IMC
The signature was changed with 731e043c8e07 ("libimcv: Reset of IMC state for
new measurement cycle").
2018-09-21 10:55:34 +02:00
Andreas Steffen
1dd382b888 Version bump to 5.7.0rc2 5.7.0rc2 2018-09-18 16:03:23 +02:00
Tobias Brunner
b01327b5e1 swanctl: Document PPKs 2018-09-18 10:12:45 +02:00
Tobias Brunner
784d96e031 Fixed some typos, courtesy of codespell 2018-09-17 18:51:44 +02:00
Tobias Brunner
432e2a72b2 settings: Clarify that a key/value-pair can only occur once 2018-09-17 18:51:43 +02:00
Tobias Brunner
d601058a26 settings-test: Remove unused variable in printf() call 2018-09-17 18:51:43 +02:00
Tobias Brunner
c07dde4b7d vici: Fix syntax error in Ruby bindings
I guess nobody uses these.

Fixes: 2c7cfe76303b ("vici:  flush-certs command flushes certificate cache")
2018-09-17 18:51:43 +02:00
Tobias Brunner
f1889ca34a imv-attestation: Don't use comma to separate statements 2018-09-17 18:51:43 +02:00
Tobias Brunner
f0d34f32a7 imv-agent: Don't use comma to separate statements 2018-09-17 18:51:43 +02:00
Tobias Brunner
52b6506a23 xauth-pam: Don't use comma to separate statements 2018-09-17 18:51:42 +02:00
Tobias Brunner
2c41fb6349 tnc-pdp: Don't use comma to separate statements 2018-09-17 18:51:42 +02:00
Tobias Brunner
bea10205b0 receiver: Don't use commas to separate statements
Maybe was in the INIT statement at some point.
2018-09-17 18:51:42 +02:00
Tobias Brunner
3552bba63a manager: Restore direct return if database URI is not defined
There was an exit anyway because storage_create() returns NULL if the
database can't be created.
2018-09-17 18:51:42 +02:00
Tobias Brunner
1295558ab3 imv-os-agent: Remove useless assignment
`eval` will never be TNC_IMV_EVALUATION_RESULT_DONT_KNOW so we can
remove the if statement too.
2018-09-17 18:51:42 +02:00
Tobias Brunner
ddc797686f pts: Remove commented call of inexistent function 2018-09-17 18:51:42 +02:00
Tobias Brunner
0b8d00adaf counters: Fix exit status in error case 2018-09-17 18:51:42 +02:00
Tobias Brunner
66aca84eba signcrl: Remove useless assignment 2018-09-17 18:51:41 +02:00
Tobias Brunner
020045f416 asn1: Remove useless assignment 2018-09-17 18:51:41 +02:00
Tobias Brunner
3ea33d15a2 mode-config: Remove useless assignment 2018-09-17 18:51:41 +02:00
Tobias Brunner
c503eec92e keymat_v1: Remove useless assignment 2018-09-17 18:51:41 +02:00
Tobias Brunner
0af96ad5e7 kernel-netlink: Check return value of both halfs when installing default route in main table 2018-09-17 18:51:41 +02:00
Tobias Brunner
d51a28bd5c botan: Fix leak if hasher initialization fails 2018-09-17 18:51:41 +02:00
Tobias Brunner
dc09570a12 botan: Share code to generate RSA EMSA PSS signature identifier strings 2018-09-17 18:51:40 +02:00
Tobias Brunner
2788529827 botan: Remove unnecessary nested blocks and simplify keyid allocation 2018-09-17 16:41:19 +02:00
Tobias Brunner
7855ad4c9e daemon: Remove redundant assignment to time_format 2018-09-17 16:41:18 +02:00
Andreas Steffen
11b4a87050 Version bump to 5.7.0rc1 5.7.0rc1 2018-09-16 09:30:18 +02:00
Andreas Steffen
9a4b47ef96 testing: Extended Botan scenarios 2018-09-16 09:30:18 +02:00
Tobias Brunner
d2a1834d01 NEWS: Added some news for 5.7.0 2018-09-12 18:41:53 +02:00
Tobias Brunner
bbe72f97f9 travis: Silence git checkout for Botan 2018-09-12 17:18:15 +02:00
Tobias Brunner
c46a94e0cc Merge branch 'botan-plugin'
Adds a wrapper plugin for the Botan crypto library.

Closes strongswan/strongswan#109.
2018-09-12 16:25:07 +02:00
Tobias Brunner
1bbb736edc travis: Use a fix revision for Botan and speed up subsequent builds via ccache 2018-09-12 16:25:00 +02:00
Tobias Brunner
24af02b00d travis: Use amalgamation build for Botan and build outside our source tree
This merges all source files into botan_all.cpp, which reduces the build
time by almost 50%. Building outside the strongSwan tree avoids analyzing
Botan with sonarqube.
2018-09-12 16:25:00 +02:00