diff options
Diffstat (limited to 'meta-networking/recipes-daemons/iscsi-initiator-utils/files/0006-Skip-useless-strcopy-and-validate-CIDR-length.patch')
-rw-r--r-- | meta-networking/recipes-daemons/iscsi-initiator-utils/files/0006-Skip-useless-strcopy-and-validate-CIDR-length.patch | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0006-Skip-useless-strcopy-and-validate-CIDR-length.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0006-Skip-useless-strcopy-and-validate-CIDR-length.patch deleted file mode 100644 index 0fa24cd10d..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0006-Skip-useless-strcopy-and-validate-CIDR-length.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From a6efed7601c890ac051ad1425582ec67dbd3f5ff Mon Sep 17 00:00:00 2001 | ||
2 | From: Lee Duncan <lduncan@suse.com> | ||
3 | Date: Fri, 15 Dec 2017 11:18:35 -0800 | ||
4 | Subject: [PATCH 6/7] Skip useless strcopy, and validate CIDR length | ||
5 | |||
6 | Remove a useless strcpy() that copies a string onto itself, | ||
7 | and ensure the CIDR length "keepbits" is not negative. | ||
8 | Found by Qualsys. | ||
9 | |||
10 | CVE: CVE-2017-17840 | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> | ||
15 | --- | ||
16 | iscsiuio/src/unix/iscsid_ipc.c | 5 ++--- | ||
17 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c | ||
20 | index 52ae8c6..85742da 100644 | ||
21 | --- a/iscsiuio/src/unix/iscsid_ipc.c | ||
22 | +++ b/iscsiuio/src/unix/iscsid_ipc.c | ||
23 | @@ -148,7 +148,7 @@ static int decode_cidr(char *in_ipaddr_str, struct iface_rec_decode *ird) | ||
24 | char *tmp, *tok; | ||
25 | char ipaddr_str[NI_MAXHOST]; | ||
26 | char str[INET6_ADDRSTRLEN]; | ||
27 | - int keepbits = 0; | ||
28 | + unsigned long keepbits = 0; | ||
29 | struct in_addr ia; | ||
30 | struct in6_addr ia6; | ||
31 | |||
32 | @@ -161,8 +161,7 @@ static int decode_cidr(char *in_ipaddr_str, struct iface_rec_decode *ird) | ||
33 | tmp = ipaddr_str; | ||
34 | tok = strsep(&tmp, "/"); | ||
35 | LOG_INFO(PFX "in cidr: bitmask '%s' ip '%s'", tmp, tok); | ||
36 | - keepbits = atoi(tmp); | ||
37 | - strcpy(ipaddr_str, tok); | ||
38 | + keepbits = strtoull(tmp, NULL, 10); | ||
39 | } | ||
40 | |||
41 | /* Determine if the IP address passed from the iface file is | ||
42 | -- | ||
43 | 1.9.1 | ||
44 | |||