summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2017-03-16 13:42:19 +0000
committerColin Watson <cjwatson@debian.org>2017-03-16 13:43:02 +0000
commit103818db322f2b2b9f5f9a71d4c36cdfd7f0d57a (patch)
tree51720b5fee3dbe37f58e489419cdfa40215d192b /debian/patches
parent43c142b02e71b5c2dee8ffe8f9314e54297004ea (diff)
parent35b2ea77a74348b575d680061f35ec7992b26ec8 (diff)
Fix null pointer dereference in ssh-keygen; this fixes an autopkgtest regression introduced in 1:7.4p1-8.
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/ssh-keygen-null-deref.patch31
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
32restore-authorized_keys2.patch 32restore-authorized_keys2.patch
33ssh-keygen-hash-corruption.patch 33ssh-keygen-hash-corruption.patch
34ssh-keyscan-hash-port.patch 34ssh-keyscan-hash-port.patch
35ssh-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 @@
1From 35b2ea77a74348b575d680061f35ec7992b26ec8 Mon Sep 17 00:00:00 2001
2From: "dtucker@openbsd.org" <dtucker@openbsd.org>
3Date: Mon, 6 Mar 2017 02:03:20 +0000
4Subject: upstream commit
5
6Check l->hosts before dereferencing; fixes potential null
7pointer deref. ok djm@
8
9Upstream-ID: 81c0327c6ec361da794b5c680601195cc23d1301
10
11Origin: https://anongit.mindrot.org/openssh.git/commit/?id=18501151cf272a15b5f2c5e777f2e0933633c513
12Last-Update: 2017-03-16
13
14Patch-Name: ssh-keygen-null-deref.patch
15---
16 ssh-keygen.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/ssh-keygen.c b/ssh-keygen.c
20index 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: