diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/ssh-keygen-null-deref.patch | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series index 2d9d2bc12..32f913e89 100644 --- a/debian/patches/series +++ b/debian/patches/series | |||
@@ -32,3 +32,4 @@ no-dsa-host-key-by-default.patch | |||
32 | restore-authorized_keys2.patch | 32 | restore-authorized_keys2.patch |
33 | ssh-keygen-hash-corruption.patch | 33 | ssh-keygen-hash-corruption.patch |
34 | ssh-keyscan-hash-port.patch | 34 | ssh-keyscan-hash-port.patch |
35 | ssh-keygen-null-deref.patch | ||
diff --git a/debian/patches/ssh-keygen-null-deref.patch b/debian/patches/ssh-keygen-null-deref.patch new file mode 100644 index 000000000..0220d7c66 --- /dev/null +++ b/debian/patches/ssh-keygen-null-deref.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 35b2ea77a74348b575d680061f35ec7992b26ec8 Mon Sep 17 00:00:00 2001 | ||
2 | From: "dtucker@openbsd.org" <dtucker@openbsd.org> | ||
3 | Date: Mon, 6 Mar 2017 02:03:20 +0000 | ||
4 | Subject: upstream commit | ||
5 | |||
6 | Check l->hosts before dereferencing; fixes potential null | ||
7 | pointer deref. ok djm@ | ||
8 | |||
9 | Upstream-ID: 81c0327c6ec361da794b5c680601195cc23d1301 | ||
10 | |||
11 | Origin: https://anongit.mindrot.org/openssh.git/commit/?id=18501151cf272a15b5f2c5e777f2e0933633c513 | ||
12 | Last-Update: 2017-03-16 | ||
13 | |||
14 | Patch-Name: ssh-keygen-null-deref.patch | ||
15 | --- | ||
16 | ssh-keygen.c | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/ssh-keygen.c b/ssh-keygen.c | ||
20 | index 0833ee61..a7c1e80b 100644 | ||
21 | --- a/ssh-keygen.c | ||
22 | +++ b/ssh-keygen.c | ||
23 | @@ -1082,7 +1082,7 @@ known_hosts_hash(struct hostkey_foreach_line *l, void *_ctx) | ||
24 | struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx; | ||
25 | char *hashed, *cp, *hosts, *ohosts; | ||
26 | int has_wild = l->hosts && strcspn(l->hosts, "*?!") != strlen(l->hosts); | ||
27 | - int was_hashed = l->hosts[0] == HASH_DELIM; | ||
28 | + int was_hashed = l->hosts && l->hosts[0] == HASH_DELIM; | ||
29 | |||
30 | switch (l->status) { | ||
31 | case HKF_STATUS_OK: | ||