diff options
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch | 105 | ||||
-rw-r--r-- | meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch | 12 | ||||
-rw-r--r-- | meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch | 10 | ||||
-rw-r--r-- | meta/recipes-extended/cracklib/cracklib_2.9.7.bb (renamed from meta/recipes-extended/cracklib/cracklib_2.9.5.bb) | 17 |
4 files changed, 21 insertions, 123 deletions
diff --git a/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch b/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch deleted file mode 100644 index b251ac9056..0000000000 --- a/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | From 47e5dec521ab6243c9b249dd65b93d232d90d6b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jan Dittberner <jan@dittberner.info> | ||
3 | Date: Thu, 25 Aug 2016 17:13:49 +0200 | ||
4 | Subject: [PATCH] Apply patch to fix CVE-2016-6318 | ||
5 | |||
6 | This patch fixes an issue with a stack-based buffer overflow when | ||
7 | parsing large GECOS field. See | ||
8 | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6318 and | ||
9 | https://security-tracker.debian.org/tracker/CVE-2016-6318 for more | ||
10 | information. | ||
11 | |||
12 | Upstream-Status: Backport [https://github.com/cracklib/cracklib/commit/47e5dec521ab6243c9b249dd65b93d232d90d6b1] | ||
13 | CVE: CVE-2016-6318 | ||
14 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
15 | --- | ||
16 | lib/fascist.c | 57 ++++++++++++++++++++++++++++++++----------------------- | ||
17 | 1 file changed, 33 insertions(+), 24 deletions(-) | ||
18 | |||
19 | diff --git a/lib/fascist.c b/lib/fascist.c | ||
20 | index a996509..d4deb15 100644 | ||
21 | --- a/lib/fascist.c | ||
22 | +++ b/lib/fascist.c | ||
23 | @@ -502,7 +502,7 @@ FascistGecosUser(char *password, const char *user, const char *gecos) | ||
24 | char gbuffer[STRINGSIZE]; | ||
25 | char tbuffer[STRINGSIZE]; | ||
26 | char *uwords[STRINGSIZE]; | ||
27 | - char longbuffer[STRINGSIZE * 2]; | ||
28 | + char longbuffer[STRINGSIZE]; | ||
29 | |||
30 | if (gecos == NULL) | ||
31 | gecos = ""; | ||
32 | @@ -583,38 +583,47 @@ FascistGecosUser(char *password, const char *user, const char *gecos) | ||
33 | { | ||
34 | for (i = 0; i < j; i++) | ||
35 | { | ||
36 | - strcpy(longbuffer, uwords[i]); | ||
37 | - strcat(longbuffer, uwords[j]); | ||
38 | - | ||
39 | - if (GTry(longbuffer, password)) | ||
40 | + if (strlen(uwords[i]) + strlen(uwords[j]) < STRINGSIZE) | ||
41 | { | ||
42 | - return _("it is derived from your password entry"); | ||
43 | - } | ||
44 | + strcpy(longbuffer, uwords[i]); | ||
45 | + strcat(longbuffer, uwords[j]); | ||
46 | |||
47 | - strcpy(longbuffer, uwords[j]); | ||
48 | - strcat(longbuffer, uwords[i]); | ||
49 | + if (GTry(longbuffer, password)) | ||
50 | + { | ||
51 | + return _("it is derived from your password entry"); | ||
52 | + } | ||
53 | |||
54 | - if (GTry(longbuffer, password)) | ||
55 | - { | ||
56 | - return _("it's derived from your password entry"); | ||
57 | - } | ||
58 | + strcpy(longbuffer, uwords[j]); | ||
59 | + strcat(longbuffer, uwords[i]); | ||
60 | |||
61 | - longbuffer[0] = uwords[i][0]; | ||
62 | - longbuffer[1] = '\0'; | ||
63 | - strcat(longbuffer, uwords[j]); | ||
64 | + if (GTry(longbuffer, password)) | ||
65 | + { | ||
66 | + return _("it's derived from your password entry"); | ||
67 | + } | ||
68 | + } | ||
69 | |||
70 | - if (GTry(longbuffer, password)) | ||
71 | + if (strlen(uwords[j]) < STRINGSIZE - 1) | ||
72 | { | ||
73 | - return _("it is derivable from your password entry"); | ||
74 | + longbuffer[0] = uwords[i][0]; | ||
75 | + longbuffer[1] = '\0'; | ||
76 | + strcat(longbuffer, uwords[j]); | ||
77 | + | ||
78 | + if (GTry(longbuffer, password)) | ||
79 | + { | ||
80 | + return _("it is derivable from your password entry"); | ||
81 | + } | ||
82 | } | ||
83 | |||
84 | - longbuffer[0] = uwords[j][0]; | ||
85 | - longbuffer[1] = '\0'; | ||
86 | - strcat(longbuffer, uwords[i]); | ||
87 | - | ||
88 | - if (GTry(longbuffer, password)) | ||
89 | + if (strlen(uwords[i]) < STRINGSIZE - 1) | ||
90 | { | ||
91 | - return _("it's derivable from your password entry"); | ||
92 | + longbuffer[0] = uwords[j][0]; | ||
93 | + longbuffer[1] = '\0'; | ||
94 | + strcat(longbuffer, uwords[i]); | ||
95 | + | ||
96 | + if (GTry(longbuffer, password)) | ||
97 | + { | ||
98 | + return _("it's derivable from your password entry"); | ||
99 | + } | ||
100 | } | ||
101 | } | ||
102 | } | ||
103 | -- | ||
104 | 2.8.1 | ||
105 | |||
diff --git a/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch index adbe7dfff4..082933e471 100644 --- a/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch +++ b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 8a6e43726ad0ae41bd1cc2c248d91deb31459357 Mon Sep 17 00:00:00 2001 | 1 | From aae03b7e626d5f62ab929d51d11352a5a2ff6b2d Mon Sep 17 00:00:00 2001 |
2 | From: Lei Maohui <leimaohui@cn.fujitsu.com> | 2 | From: Lei Maohui <leimaohui@cn.fujitsu.com> |
3 | Date: Tue, 9 Jun 2015 11:11:48 +0900 | 3 | Date: Tue, 9 Jun 2015 11:11:48 +0900 |
4 | Subject: [PATCH] packlib.c: support dictionary byte order dependent | 4 | Subject: [PATCH 1/2] packlib.c: support dictionary byte order dependent |
5 | 5 | ||
6 | The previous dict files are NOT byte-order independent, in fact they are | 6 | The previous dict files are NOT byte-order independent, in fact they are |
7 | probably ARCHITECTURE SPECIFIC. | 7 | probably ARCHITECTURE SPECIFIC. |
@@ -22,11 +22,11 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | |||
22 | 22 | ||
23 | Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> | 23 | Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> |
24 | --- | 24 | --- |
25 | lib/packlib.c | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- | 25 | lib/packlib.c | 214 +++++++++++++++++++++++++++++++++++++++++++++- |
26 | 1 file changed, 210 insertions(+), 4 deletions(-) | 26 | 1 file changed, 210 insertions(+), 4 deletions(-) |
27 | 27 | ||
28 | diff --git a/lib/packlib.c b/lib/packlib.c | 28 | diff --git a/lib/packlib.c b/lib/packlib.c |
29 | index f851424..3aac805 100644 | 29 | index 8acb7be..a9d8750 100644 |
30 | --- a/lib/packlib.c | 30 | --- a/lib/packlib.c |
31 | +++ b/lib/packlib.c | 31 | +++ b/lib/packlib.c |
32 | @@ -16,6 +16,12 @@ | 32 | @@ -16,6 +16,12 @@ |
@@ -317,7 +317,7 @@ index f851424..3aac805 100644 | |||
317 | + fwrite((char *) &tmpdatum, sizeof(tmpdatum), 1, pwp->ifp); | 317 | + fwrite((char *) &tmpdatum, sizeof(tmpdatum), 1, pwp->ifp); |
318 | 318 | ||
319 | fputs(pwp->data_put[0], pwp->dfp); | 319 | fputs(pwp->data_put[0], pwp->dfp); |
320 | putc(0, pwp->dfp); | 320 | putc(0, (FILE*) pwp->dfp); |
321 | @@ -464,6 +668,7 @@ GetPW(pwp, number) | 321 | @@ -464,6 +668,7 @@ GetPW(pwp, number) |
322 | perror("(index fread failed)"); | 322 | perror("(index fread failed)"); |
323 | return NULL; | 323 | return NULL; |
@@ -335,5 +335,5 @@ index f851424..3aac805 100644 | |||
335 | 335 | ||
336 | int r = 1; | 336 | int r = 1; |
337 | -- | 337 | -- |
338 | 1.8.4.2 | 338 | 2.20.1 |
339 | 339 | ||
diff --git a/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch index 6210e82121..27a4fcbec2 100644 --- a/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch +++ b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 06f9a88b5dd5597f9198ea0cb34f5e96f180e6e3 Mon Sep 17 00:00:00 2001 | 1 | From 7250328d7f77069726603ef7132826c9260d3c92 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Sat, 27 Apr 2013 16:02:30 +0800 | 3 | Date: Sat, 27 Apr 2013 16:02:30 +0800 |
4 | Subject: [PATCH] craklib:fix testnum and teststr failed | 4 | Subject: [PATCH 2/2] craklib:fix testnum and teststr failed |
5 | 5 | ||
6 | Error log: | 6 | Error log: |
7 | ... | 7 | ... |
@@ -18,8 +18,8 @@ Set DEFAULT_CRACKLIB_DICT as the path of PWOpen | |||
18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
19 | Upstream-Status: Pending | 19 | Upstream-Status: Pending |
20 | --- | 20 | --- |
21 | util/testnum.c | 2 +- | 21 | util/testnum.c | 2 +- |
22 | util/teststr.c | 2 +- | 22 | util/teststr.c | 2 +- |
23 | 2 files changed, 2 insertions(+), 2 deletions(-) | 23 | 2 files changed, 2 insertions(+), 2 deletions(-) |
24 | 24 | ||
25 | diff --git a/util/testnum.c b/util/testnum.c | 25 | diff --git a/util/testnum.c b/util/testnum.c |
@@ -49,5 +49,5 @@ index 2a31fa4..9fb9cda 100644 | |||
49 | perror ("PWOpen"); | 49 | perror ("PWOpen"); |
50 | return (-1); | 50 | return (-1); |
51 | -- | 51 | -- |
52 | 1.7.10.4 | 52 | 2.20.1 |
53 | 53 | ||
diff --git a/meta/recipes-extended/cracklib/cracklib_2.9.5.bb b/meta/recipes-extended/cracklib/cracklib_2.9.7.bb index c2677184b4..2537962336 100644 --- a/meta/recipes-extended/cracklib/cracklib_2.9.5.bb +++ b/meta/recipes-extended/cracklib/cracklib_2.9.7.bb | |||
@@ -9,19 +9,22 @@ DEPENDS = "cracklib-native zlib" | |||
9 | 9 | ||
10 | EXTRA_OECONF = "--without-python --libdir=${base_libdir}" | 10 | EXTRA_OECONF = "--without-python --libdir=${base_libdir}" |
11 | 11 | ||
12 | SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \ | 12 | SRC_URI = "git://github.com/cracklib/cracklib;protocol=https;branch=master \ |
13 | file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \ | 13 | file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \ |
14 | file://0001-Apply-patch-to-fix-CVE-2016-6318.patch \ | ||
15 | file://0002-craklib-fix-testnum-and-teststr-failed.patch" | 14 | file://0002-craklib-fix-testnum-and-teststr-failed.patch" |
16 | 15 | ||
17 | SRC_URI[md5sum] = "376790a95c1fb645e59e6e9803c78582" | 16 | SRCREV = "f83934cf3cced0c9600c7d81332f4169f122a2cf" |
18 | SRC_URI[sha256sum] = "59ab0138bc8cf90cccb8509b6969a024d5e58d2d02bcbdccbb9ba9b88be3fa33" | 17 | S = "${WORKDIR}/git/src" |
19 | |||
20 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cracklib/files/cracklib/" | ||
21 | UPSTREAM_CHECK_REGEX = "/cracklib/(?P<pver>(\d+[\.\-_]*)+)/" | ||
22 | 18 | ||
23 | inherit autotools gettext | 19 | inherit autotools gettext |
24 | 20 | ||
21 | # This is custom stuff from upstream's autogen.sh | ||
22 | do_configure:prepend() { | ||
23 | mkdir -p ${S}/m4 | ||
24 | echo EXTRA_DIST = *.m4 > ${S}/m4/Makefile.am | ||
25 | touch ${S}/ABOUT-NLS | ||
26 | } | ||
27 | |||
25 | do_install:append:class-target() { | 28 | do_install:append:class-target() { |
26 | create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small | 29 | create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small |
27 | } | 30 | } |