Compare commits

..

115 Commits

Author SHA1 Message Date
Paul Barker
0fcfdc4d54 kernel.bbclass: Complete fix for modules symlink
The fix backported in commit aa9fc551 of oe-core does not completely fix the
issue (Yocto #4595) as intended. The modules symlink is still created in the
working directory instead of in the deploy directory. To fix this, we just need
to use an absolute path to ${DEPLOYDIR} when creating the symlink.

(From OE-Core rev: f07a4e0d80f5e0dd94514f6aae11a7bd56034f30)

Signed-off-by: Paul Barker <paul.barker@commagility.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 14:54:57 +01:00
Martin Jansa
a04380fd0f binutils: backport patch to fix build with gcc-4.9
* backported from 2.23.2, fixes:
work/x86_64-linux/binutils-native/2.23.1-r3/binutils-2.23.1/gas/write.c:409:24:
  error: 'dummy.fr_type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   gas_assert (prev_frag->fr_type != 0);
                        ^
work/x86_64-linux/binutils-native/2.23.1-r3/binutils-2.23.1/gas/write.c:392:9: note: 'dummy' was declared here
   fragS dummy, *prev_frag = &dummy;
         ^

(From OE-Core rev: 8c5396bd3b7f1eef3d53ebf0404189fd75f1d5e1)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-20 12:36:29 +01:00
Khem Raj
6e08651e39 binutils: Fix building nativesdk binutils with gcc 4.9
Patches explain the issue in detail but this is exposed
with gcc 4.9 in binutils 2.23.2

(From OE-Core rev: fc5c467b680fc5aef4b0f689e6988e17a9322ae0)

(From OE-Core rev: 4dfb8847ebf8aab90ad8888933468e2899c96998)

(From OE-Core rev: af347d3298e15552d502d5b2ce497bbda9705bc7)

(From OE-Core rev: 5ab846580ec2ebf13f5e4775bab45fa30518cb31)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-11 16:25:49 +01:00
Krzysztof Sywula
a92ee6a03f dtc: old SRC_URI died, changing to new working one
(From OE-Core rev: 131a17f014e6373dae526cc927588ccc0fedc38d)

(From OE-Core rev: bd2ed00b7062afbd300dc59d3f5f5ab90894d9c3)

Signed-off-by: Krzysztof Sywula <krzysztof.m.sywula@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-10 12:08:25 +00:00
Yi Zhao
057a68d8ff kernel.bbclass: Fix link for modules-${MACHINE}.tgz
The modules-${MACHINE}.tgz should link to ${MODULE_TARBALL_BASE_NAME}.
But now it links to an invalid file ${MODULE_TARBALL_BASE_NAME}.bin.
Remove the extra .bin suffix.

[YOCTO #4595]

(From OE-Core rev: aa9fc551a8df9ead287c0ddc18bc60a7aded1d3c)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-12 12:02:41 +00:00
Richard Purdie
b690589385 sstate: Fix the relative symlink replacement code
ant reported on irc that the sstate absolute to relative symlink creation
code wasn't working in klibc. He was correct although the level of breakage is
rather surprising since it only worked for one level of symlink (usr/include) with
everything else being broken.

The reason is probably that nothing really uses absolute paths, we use relative
paths where at all possible already. Nothing in the target sysroot should use
absolute paths for a start. In this regard, the klibc-dev package is broken and
needs fixing. It will currently break when building for one machine, then switching
to another of the same TUNE_PKGARCH and installing from sstate but that is a
separate issue.

This patch fixes the symlink creation code by firstly passing in the correct
value we need (where the symlink will end up) and seccondly, actually using it.

I've also tweaked the debug message to contain appropriate information and got
right of the double "//" value the existing code created in favour of the form
'./..' which looks neater.

(From OE-Core rev: 9b05c65450526522d7358d0c0901b594de546748)

(From OE-Core rev: 67831122fce62b71263b85592c8d1de4e7deabd2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-08 09:21:28 +00:00
Catalin Popeanga
c0456385ce bash: Fix-for-CVE-2014-6278
This vulnerability exists because of an incomplete fix for CVE-2014-6271, CVE-2014-7169, and CVE-2014-6277

See: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-6278

(From OE-Core daisy rev: de596b5f31e837dcd2ce991245eb5548f12d72ae)

(From OE-Core rev: 32e6864323cf2e4405b835cf474bcdf6fd572961)

Signed-off-by: Catalin Popeanga <Catalin.Popeanga@enea.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-16 16:05:56 +02:00
Catalin Popeanga
4b302b8fa0 bash: Fix for CVE-2014-6277
Follow up bash42-049 to parse properly function definitions in the
values of environment variables, to not allow remote attackers to
execute arbitrary code or to cause a denial of service.

See: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-6277

(From OE-Core daisy rev: 85961bcf81650992259cebb0ef1f1c6cdef3fefa)

(From OE-Core rev: ae653aed4c6b7d8075cd464edcd2e01237bfc105)

Signed-off-by: Catalin Popeanga <Catalin.Popeanga@enea.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-16 16:05:56 +02:00
Catalin Popeanga
7a9908432f bash: Fix for CVE-2014-7186 and CVE-2014-7187
This is a followup patch to incomplete CVE-2014-6271 fix code execution via
specially-crafted environment

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-7186
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-7187

(From OE-Core daisy rev: 153d1125659df9e5c09e35a58bd51be184cb13c1)

(From OE-Core rev: 32818a104ae99a5795d91a2960d48d433d542dee)

Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-16 16:05:55 +02:00
Catalin Popeanga
b91889fb3e bash: Fix for exported function namespace change
This is a followup patch to incomplete CVE-2014-6271 fix code execution via
specially-crafted environment

This patch changes the encoding bash uses for exported functions to avoid
clashes with shell variables and to avoid depending only on an environment
variable's contents to determine whether or not to interpret it as a shell
function.

(From OE-Core daisy rev: 6c51cc96d03df26d1c10867633e7a10dfbec7c45)

(From OE-Core rev: 998cd2c6dd3709ae0d47c845dff227680bda96f5)

Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-16 16:05:55 +02:00
Khem Raj
35ed0a06be bash: Fix CVE-2014-7169
This is a followup patch to incomplete CVE-2014-6271 fix
code execution via specially-crafted environment

Change-Id: Ibb0a587ee6e09b8174e92d005356e822ad40d4ed
(From OE-Core master rev: 76a2d6b83472995edbe967aed80f0fcbb784b3fc)

(From OE-Core rev: 59e7817b6e1d1dd90668083cf34f1650a84430c0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-16 16:05:55 +02:00
Ross Burton
c78877b07e bash: fix CVE-2014-6271
CVE-2014-6271 aka ShellShock.

"GNU Bash through 4.3 processes trailing strings after function definitions in
the values of environment variables, which allows remote attackers to execute
arbitrary code via a crafted environment."

(From OE-Core master rev: 798d833c9d4bd9ab287fa86b85b4d5f128170ed3)

(From OE-Core rev: d57b9ce8bb97f88c329da973c3567d04d8eb07d2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-16 16:05:55 +02:00
Scott Rifenbark
02037d7daa documentation: Updated manual revision tables to support 1.4.5 release.
Added a new entry and used "July 2014" as the release date.

(From yocto-docs rev: d6a86bf28419a43a2a692d33c8cedddadebe1dfb)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-18 10:30:36 +01:00
Scott Rifenbark
804f6f71c5 mega-manual.sed: Changed strings to support a 1.4.5 release.
(From yocto-docs rev: a0e9cc39e3aa978f08c9469b3e391d8b429ff792)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-18 10:30:36 +01:00
Scott Rifenbark
bbdfb0ff1a poky.ent: Changed variables to support a 1.4.5 release.
(From yocto-docs rev: 822fa3949a18618c58e4256283d693276017d610)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-18 10:30:36 +01:00
Scott Rifenbark
6714a6c59a dev-manual, kernel-dev, profile-manual: Fixed title and link issues.
Following fixes:

 dev-manual - Discovered a <ulink> tag that was not a single
              line.  These types of links need to not have hard
              returns.  If they do, mega-manual.sed will not
              process the link.  Changed the reference to a
              single line.

 kernel-dev - Discovered that I had the old poky.ent variable
              (i.e. YOCTO_DOCS_KERNEL_URL) as part of the link
              in the opening note on the title page.  I changed
              it to the proper variable, which is
              YOCTO_DOCS_KERNEL_DEV_URL.  The old link was not
              being processed by mega-manual.sed.

 profile-manual - First problem was the wrong manual title in
              a <ulink> tag, which caused the mega-manual.sed
              file to skip processing the link into a non-link.

              Second problem was on the title page. Incredulously,
              I had the title of the manual reversed for Chapter
              1.  Fixed it.

(From yocto-docs rev: 71dedd610dce9fdc6472a5cf2b18ec8729d77e55)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-18 10:30:36 +01:00
Scott Rifenbark
706dcccb5a mega-manual.sed: Fixed search string problem for profile-manual.
Found a very subtle problem with the search string that processes
links to the Yocto Project Profiling and Tracing Manual where the
links go to the top-level (i.e. no ID tag in the link).

I had the name of the manual as "Yocto Project Profile and
Tracing Manual", which means there would never be a match.
Consequently, when the Makefile called the mega-manual.sed file
to process the links in mega-manual.html, any top-level link
to that manual was not processed and was being left as a hard
link to the versioned manual.  Processing a top-link should
convert it to a non-link (for now).

(From yocto-docs rev: bb32b3445cb8b3a498cff93d22f1ed9435fd715d)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-18 10:30:35 +01:00
Yue Tao
033f5a5fa5 openssl: fix for CVE-2010-5298
Race condition in the ssl3_read_bytes function in s3_pkt.c in OpenSSL
through 1.0.1g, when SSL_MODE_RELEASE_BUFFERS is enabled, allows remote
attackers to inject data across sessions or cause a denial of service
(use-after-free and parsing error) via an SSL connection in a
multithreaded environment.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5298

(From OE-Core master rev: 751f81ed8dc488c500837aeb3eb41ebf3237e10b)

(From OE-Core rev: bf2d5380808bb3e0ad470e7853e3ae20617bbfd6)

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-10 17:36:44 +01:00
Paul Eggleton
efdb05cf31 openssl: fix CVE-2014-3470
From the OpenSSL Security Advisory [05 Jun 2014]
http://www.openssl.org/news/secadv_20140605.txt

Anonymous ECDH denial of service (CVE-2014-3470)

OpenSSL TLS clients enabling anonymous ECDH ciphersuites are subject to a
denial of service attack.

(Patch borrowed from Fedora.)

(From OE-Core rev: 299de5ea53446bc211e6aadf158d6ef7576384ab)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-10 17:36:44 +01:00
Paul Eggleton
e5ac7abc95 openssl: fix CVE-2014-0224
From the OpenSSL Security Advisory [05 Jun 2014]
http://www.openssl.org/news/secadv_20140605.txt

SSL/TLS MITM vulnerability (CVE-2014-0224)

An attacker using a carefully crafted handshake can force the use of weak
keying material in OpenSSL SSL/TLS clients and servers. This can be exploited
by a Man-in-the-middle (MITM) attack where the attacker can decrypt and
modify traffic from the attacked client and server.

The attack can only be performed between a vulnerable client *and*
server. OpenSSL clients are vulnerable in all versions of OpenSSL. Servers
are only known to be vulnerable in OpenSSL 1.0.1 and 1.0.2-beta1. Users
of OpenSSL servers earlier than 1.0.1 are advised to upgrade as a precaution.

(Patch borrowed from Fedora.)

(From OE-Core rev: 50050c9c2449d14a0d3da91eed5d16cddce9cf76)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-10 17:36:44 +01:00
Paul Eggleton
d3bc30f75b openssl: fix CVE-2014-0221
From the OpenSSL Security Advisory [05 Jun 2014]
http://www.openssl.org/news/secadv_20140605.txt

DTLS recursion flaw (CVE-2014-0221)

By sending an invalid DTLS handshake to an OpenSSL DTLS client the code
can be made to recurse eventually crashing in a DoS attack.

Only applications using OpenSSL as a DTLS client are affected.

(Patch borrowed from Fedora.)

(From OE-Core rev: 2a9e46a319d32e99266fd44e1ea1ca2b5e7c9a6a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-10 17:36:44 +01:00
Paul Eggleton
889f731acc openssl: use upstream fix for CVE-2014-0198
This replaces the fix for CVE-2014-0198 with one borrowed from Fedora,
which is the same as the patch which was actually applied upstream for
the issue, i.e.:

https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=b107586c0c3447ea22dba8698ebbcd81bb29d48c

(From OE-Core rev: 26a6e230ebb4f69c992ec909d46d586ee42bfdf6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-10 17:36:44 +01:00
Paul Eggleton
f3df1c7e77 openssl: fix CVE-2014-0195
From the OpenSSL Security Advisory [05 Jun 2014]
http://www.openssl.org/news/secadv_20140605.txt

DTLS invalid fragment vulnerability (CVE-2014-0195)

A buffer overrun attack can be triggered by sending invalid DTLS fragments
to an OpenSSL DTLS client or server. This is potentially exploitable to
run arbitrary code on a vulnerable client or server.

Only applications using OpenSSL as a DTLS client or server affected.

(Patch borrowed from Fedora.)

(From OE-Core rev: aac6d15448e9a471a8d4ce086538b39f0b928518)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-10 17:36:43 +01:00
Valentin Popa
32ed21cc09 gnutls: patch for CVE-2014-3466 backported
Backported patch for CVE-2014-3466.
This patch is for dylan.

(From OE-Core rev: 7ff1924674871d604f9656f3928b91dc417c7246)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 10:27:54 +01:00
Richard Purdie
42a5b0cbd1 build-appliance-image: Update to head revision
(From OE-Core rev: b2d96a966215d90bd2514e2bbe8deabe9eaabea1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-12 21:32:45 +01:00
Jonathan Liu
5b12a3441b eglibc_2.17.bb: accept make versions 4.0 and greater
(From OE-Core rev: b111824a28fadbd58468a83279aaa7da3eaa98be)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-12 21:32:22 +01:00
Scott Rifenbark
48d151851e mega-manual.sed: Updated the 1.4.3 string to 1.4.4
This makes sure the mega-manual cross-reference links stay within
the mega-manual and don't stray to 1.4.3 documentation.

(From yocto-docs rev: 4470f32879ea9ad21c1d4821de6a8aa5740bbc6b)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-12 20:32:03 +01:00
Scott Rifenbark
bfbfbc057b documentation: Updated the manual revision tables for a 1.4.4 release.
All six manuals using May of 2014 for a release date.

(From yocto-docs rev: 7c4fe11ca8f001d18329aa6255793618bbb06ab8)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-12 20:32:02 +01:00
Scott Rifenbark
13d42ba43e poky.ent: Updated the variables to support a 1.4.4 release.
(From yocto-docs rev: 549dcd66b852ca0061ebf7fda2206019ee741b73)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-12 20:32:02 +01:00
Richard Purdie
ddb3132224 build-appliance-image: Update to head revision
(From OE-Core rev: d367c3356807148adbc9595b674a011a4d37d32a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-12 17:48:31 +01:00
Richard Purdie
be7a782dca build-appliance-image: Update to head revision
(From OE-Core rev: 5913e6b47cb8c674f448e805a828f6bde3b01858)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-12 17:43:35 +01:00
Saul Wold
f398d09d71 poky.conf: Bump Release numbers for 1.4.4
(From meta-yocto rev: 3bfc816169869318f0feca9caa3ead478406eb67)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-12 17:41:20 +01:00
Maxin B. John
e55ac718a5 openssl: fix CVE-2014-0198
A null pointer dereference bug was discovered in do_ssl3_write().
An attacker could possibly use this to cause OpenSSL to crash, resulting
in a denial of service.

https://access.redhat.com/security/cve/CVE-2014-0198

(From OE-Core rev: ffe6bdcb896dc39750144944be1f635baf33f6a0)

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-12 17:07:08 +01:00
Paul Eggleton
2f020ec5df openssl: bump PR
We don't normally do this, but with the recent CVE fixes (most
importantly the one for the serious CVE-2014-0160 vulnerability) I am
bumping PR explicitly to make it a bit more obvious that the patch has
been applied.

(From OE-Core rev: c50da4a2c1128f599b2c66d06b7d2ea80215f9d0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-11 18:15:37 +01:00
Paul Eggleton
99ab4edab0 openssl: backport fix for CVE-2014-0160
Fixes the "heartbleed" TLS vulnerability (CVE-2014-0160). More
information here:

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0160

Patch borrowed from Debian; this is just a tweaked version of the
upstream commit (without patching the CHANGES file which otherwise
would fail to apply on top of this version).

(From OE-Core rev: bebed954e8fea9d805a0eb6b284dd90177379242)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09 09:00:47 +01:00
Yue Tao
b27dba2efd Security Advisory - openssl - CVE-2013-6449
The ssl_get_algorithm2 function in ssl/s3_lib.c in OpenSSL before 1.0.2
obtains a certain version number from an incorrect data structure, which
allows remote attackers to cause a denial of service (daemon crash) via
crafted traffic from a TLS 1.2 client.

(From OE-Core master rev: 3e0ac7357a962e3ef6595d21ec4843b078a764dd)

(From OE-Core rev: 0d3d2d7062a181e878435487c06e26c6547e492f)

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09 09:00:47 +01:00
Yue Tao
54c4e10a41 Security Advisory - openssl - CVE-2013-6450
The DTLS retransmission implementation in OpenSSL through 0.9.8y and 1.x
through 1.0.1e does not properly maintain data structures for digest and
encryption contexts, which might allow man-in-the-middle attackers to
trigger the use of a different context by interfering with packet delivery,
related to ssl/d1_both.c and ssl/t1_enc.c.

(From OE-Core master rev: 94352e694cd828aa84abd846149712535f48ab0f)

(From OE-Core rev: 80263dc0b6c02c21949e81564ac1e5c6f198d9ac)

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09 09:00:46 +01:00
Yue Tao
15063788eb Security Advisory - openssl - CVE-2013-4353
The ssl3_take_mac function in ssl/s3_both.c in OpenSSL 1.0.1 before
1.0.1f allows remote TLS servers to cause a denial of service (NULL
pointer dereference and application crash) via a crafted Next Protocol
Negotiation record in a TLS handshake.

(From OE-Core master rev: 35ccce7002188c8270d2fead35f9763b22776877)

(From OE-Core rev: e36aff4b0ed5f70deb4862dc893eef9ceaa93003)

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09 09:00:46 +01:00
Cristiana Voicu
1d4bae38d9 bitbake: hob: disable layer drag and drop outside the containing widget
[YOCTO #6008]
(Bitbake rev: 0f7b6a03c64292983d2cc715e5e5badb1cdc5cae)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-04 15:06:57 +01:00
Scott Rifenbark
6ef0833186 documentation: Updated the Manual Revision History tables.
The release pushed into March so I changed the revision date
in the manual history tables from February to March.

(From yocto-docs rev: 27214ecebd7a74eb54bc92aaff020b5dbfa8d2ba)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25 12:30:02 +00:00
Richard Purdie
fda1f07ddd build-appliance-image: Update to head revision
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-20 22:44:31 +00:00
Saul Wold
465a860519 packagegroup-self-hosted: Add missing python code
These are in the Toolchain list, so they should also be installed on the build appliance

[YOCTO #5061]

Fixes [YOCTO #5941].

(Partial backport of OE-Core master rev: 82374feece5c576f9950bad6861b1e00c6b30d84)

(From OE-Core rev: 58b479f4d4d283e590a55a71151fca481fbe3c24)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-20 22:44:15 +00:00
Richard Purdie
c397b69e68 build-appliance-image: Update to head revision
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-18 09:31:25 +00:00
Richard Purdie
02204c9711 sstate: Drop 'SafeDep' code from setscene validation function
I have a feeling this code exists from the time before we had proper
coverage of one sstate task by another task. At that time it was a
"poor" persons version of that idea, we now have much better
code internal to bitbake which handles this.

Worse, this code actually breaks certain rebuild scenarios,
e.g.:

bitbake libtool-cross
bitbake libtool-cross -c cleansstate
rm tmp -rf
bitbake libtool-cross

would fail as binutils-cross wasn't installed from sstate.

The easiest fix is to remove the obsolete/broken code.

[YOCTO #5773]

(From OE-Core master rev: ccad07f35fb7f959e24fd50d04c7d10dd5cf20d0)

(From OE-Core rev: 30d3f06fddea2d8f3537d3415c95d75a6487078c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-18 09:31:12 +00:00
Richard Purdie
e6db878d21 build-appliance-image: Update to head revision
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-17 23:17:44 +00:00
Richard Purdie
8cc2c2566b build-appliance-image: Update to head revision
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-17 16:02:03 +00:00
Mark Hatle
42663173ff rpm: Enable compatibility with older RPM packages that have invalid platforms
Some LSB packages appear to have the platform set to '%{_target_platform}'
which is not a valid platform field.  This causes a failure of the type:

warning: package lsb-test-core-4.1.15-1.x86_64 is intended for a %{_target_platform} platform

When we detect an invalid platform, fall back and try to construct a new
platform name that may be valid based on the arch and os contents of the
package.  (This should only ever be needed by invalid or older RPM packages.)

(From OE-Core master rev: 6513fa327aeb7e9fdd313290c205917952eed226)

(From OE-Core rev: c3f1bedb2494a2465db23a4d89b9f998db953f0d)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-13 15:37:36 -07:00
Stefan Stanacar
b95c05db58 lsbtest: fix comparison bashism
== is a bashism use = instead.

(Based on OE-Core master rev: c90d1047c41148cbd57f26b5a34563346602a71b)

(From OE-Core rev: abf46d03eff2288715b054057ac253eca61f8a63)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-13 15:37:36 -07:00
Darren Hart
5152260a32 init-install-efi.sh: Remove unnecessary udev rules file to avoid errors
Fixes [YOCTO #5233]

Modeled after Chen Qi's fix to [YOCTO #3924] from oe-core commit:
6b6db7b4fb7aa17b8e29076decc830149b9d35bc
init-install.sh: remove unnecessary udev rules file to avoid error messages

/etc/udev/scripts/mount.sh is removed by init-install-efi.sh, but the
udev rules file which specifies the invocation of this script is not
removed, thus causing the error message during a live install:

/etc/udev/scripts/mount.sh: No such file or directory

The /etc/udev/rules/automount.rules no longer works once the mount.sh
script is removed. Remove it to avoid the error message.

(From OE-Core master rev: 1f5a2b616d902b1158e348bf8c33b6d36e21cadc)

(From OE-Core rev: c45acfae254004baa4011a35addf0e26a11d71bd)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: mihaix.lindner@linux.intel.com
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-13 15:37:35 -07:00
Richard Purdie
2a07edd04c runqemu: Use correct kvm CPU options for qemux86* with kvm
The existing -cpu host option caused kernel panics when people attempted to use
the kvm option. After research and discussion, the best options appear to
be the kvm32/kvm64 cpu types so lets use these instead. These resolve
the kernel issues for me.

[YOCTO #3908]

(From OE-Core master rev: bdc6d3be6ffa4ed358153f9c9332b632324f5833)

(From OE-Core rev: 8f3ecfda5e57fbc1903dec1cbb44c92ef599849f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-13 15:37:35 -07:00
Richard Purdie
97300d711d python-2.7-manifest: Add missing python-ctypes dependency to python-multiprocessing
(From OE-Core master rev: 5abf18a7f11ee9e88e0eec1b66cc63427d9097a8)

(From OE-Core rev: 35555a670a157cf08f6472065b2d1c41e340e8f2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-13 15:37:35 -07:00
Richard Purdie
7ab82abcad build-appliance-image: Update to head revision
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-06 10:33:12 +00:00
Paul Eggleton
7bd335fef6 gnutls: fix failure during do_compile
Add a Debian patch to fix a load of errors building the documentation
within do_compile e.g.:

| ./x509-api.texi:15: misplaced {
| ./x509-api.texi:15: misplaced }

(From OE-Core master rev: b09a9a5f298596795f17243e5ffcf7dab295a8e6)

(From OE-Core rev: fae45abd37636741d51e5b75ad2c09f43b72d01d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-06 10:32:47 +00:00
Richard Purdie
447214ab95 build-appliance-image: Update to head revision
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 14:22:18 +00:00
Paul Eggleton
9fb578a648 poky.conf: add Poky-1.4.3 to SANITY_TESTED_DISTROS for Build Appliance
(From meta-yocto rev: 2c2be428a127d67b608686ef6e8d1142c9f59be2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 12:41:08 +00:00
Karl Hiramoto
be50a58edd gnutls: Fixed bug that prevented the rejection of v1 intermediate CA certificates.
This patch is for the OE-Core dylan branch - it comes from upstream:

>From 467478d8ff08a3cb4be3034ff04c9d08a0ceba3e
From: Nikos Mavrogiannopoulos <nmav@redhat.com>
Date: Wed, 12 Feb 2014 16:41:33 +0100

For more info see:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1959
http://www.gnutls.org/security.html#GNUTLS-SA-2014-1
467478d8ff

(From OE-Core rev: 2d6d738d52fa93de4514b65140b1e68cfae7434a)

Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 12:40:20 +00:00
Karl Hiramoto
0c987df4a2 gnutls: CVE-2014-0092 correct return codes
This patch is for the OE-Core dylan branch - it comes from upstream:

git://gitorious.org/gnutls/gnutls.git
branch: gnutls_2_12_x
commit: 6aa26f78150ccbdf0aec1878a41c17c41d358a3b
Author: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Date:   Thu Feb 27 19:42:26 2014 +0100

For more info see:
http://www.gnutls.org/security.html#GNUTLS-SA-2014-2
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0092
6aa26f7815

(From OE-Core rev: d6224391677b54a8f32d0303b859424323aaf8d3)

Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 12:40:20 +00:00
Chen Qi
e2bb4a70a9 subversion: fix build problem when sysroot contains '-D' or '-I'
If sysroot contains '-D' or '-I' characters, the SVN_NEON_INCLUDES and
the corresponding CFLAGS will not get the correct value.

This will cause build failures.

This patch fixes the above problem.

[YOCTO #5458]

(From OE-Core master rev: 7078397ef39de43244fca7e24683b2a83913cbbf)

(From OE-Core rev: 42232782b9a3aa0ed03c5dda84fc0b865b74b2dd)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-17 15:10:52 +00:00
Martin Jansa
a7ec08e2b5 bitbake: fetch2: Don't allow '/' in user:pass, fix branch containing '@'
* currently decode_url regexp parses branch=@foo as username so it ends like this:
  - ('git', '', 'foo', 'git.openembedded.org/bitbake;branch=', '', {})
  + ('git', 'git.openembedded.org', '/bitbake', '', '', {'branch': '@foo'})
* http://hg.python.org/cpython/file/2.7/Lib/urlparse.py also assumes
  that there is at least one '/' as separator between netloc and path,
  params, so it looks reasonable to prevent including '/' in username

(Bitbake rev: 66d01338ab1095775b854ad7509f4d2631c6e6ed)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-17 14:44:37 +00:00
Mark Hatle
90547d53a1 bitbake: bitbake: lib/bb/cache.py: Change debugging note to a debug message
Some apparently debugging was left in in a previous commit.  This caused
bitbake to return a list of bbappends when things changed from the cache.

Make this a proper debug message.

(Bitbake master rev: 1965e5cbdfede18d7b7cb0218e0a5147c3f1c884)

(Bitbake rev: 586adebdafdd4d11e5a277f72206875ae8828864)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-17 14:44:37 +00:00
Paul Eggleton
59e8d60e25 guile: fix the depends for target recipes
The depenency on guild-native and libatomics-ops is missing
in multilib build, fix the depends with class-target.

(From OE-Core master rev: 88f1913f7cea54f0e4e1024ea506b5ce9faea96b)

(From OE-Core rev: 1aeab422006c5e5b1bffa3fa05669fcb01d7ffdf)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-09 10:05:19 +00:00
Paul Eggleton
2555e58e56 libx11: backport _XEatDataWords API
If you build libx11-native then that has to be ABI-compatible with the
libX11 on the host or you'll have problems running qemu-native. Most
current distros are using libX11 1.6+. Thus, we need to backport the
_XEatDataWords API present in 1.6.

This only affects the dylan branch as dora+ has libx11 1.6+.

Fixes [YOCTO #5040].

(From OE-Core rev: ce8deda64f78ac48820d06c4f90c20a31f9e3eed)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-08 21:21:04 +00:00
Richard Purdie
50ee75aaa2 build-appliance-image: Update to dylan head revision
(From OE-Core rev: 629a46359a06b4912ddf030ca2b2c69a011dfa88)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-23 17:00:54 +00:00
Scott Rifenbark
7a5f2ae591 documentation: Updated Manual revision tables to February 2014.
All six tables adjusted from January to February.

(From yocto-docs rev: 1e0b618bacf2e7dabbe36d6603fc3a8656f50c8c)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-21 21:57:38 +00:00
Scott Rifenbark
88b65f4d7a poky.ent: Fixed broken OE_LISTS_URL.
This variable was wrong and it was causing six mailing links in
the manual set to no resolve.  Who knows how long they have been
broken.  They work now.

(From yocto-docs rev: b088ddee322b42a243ecc35840931640d77f6e53)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-21 21:57:38 +00:00
Scott Rifenbark
6dad99b1ab poky.ent: Updated lists.linuxtogo.org with lists.openembedded.org
(From yocto-docs rev: 0706317755e5703e8add9788b0e5d384c936dfa2)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-21 21:57:37 +00:00
Paul Eggleton
6a2b596725 guile: fix build with Texinfo 5.0
Backport a patch from upstream which fixes failures building
guile-native on newer distros such as Ubuntu 13.10. (This does not
affect dora or master because we are using Guile 2.0.9 there, which
already contains this patch.)

(From OE-Core rev: 977372f806dfe597cd14244e7a4db0caba5c65b2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-21 21:56:58 +00:00
Saul Wold
31498bcf19 grep: Add patch for texinfo 5.1
(From OE-Core master rev: bc6258f88705b0e7989089a8666ac5e5d2355823)

(From OE-Core rev: 80848b0df18e5a962adda35750431e28c19f9204)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-21 21:56:58 +00:00
Richard Purdie
ac5c4dcf46 build-appliance-image: Update to dylan head revision
(From OE-Core rev: bca606597de6c5c2de98ae1949857e4481623939)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-15 17:50:29 +00:00
Cristiana Voicu
9cf2e005d1 bitbake: hob/hoblistmodel: check if vals of packages/recipes names are not None
[YOCTO #5053]

(Corresponds to BitBake master rev: ba9fe77e37be31e8246431578902e871dd94515e)

(Bitbake rev: d2bfdb12d64e8dfa6c4518c159065d39456667bb)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-08 17:41:21 +00:00
Saul Wold
da8a5ec920 cmake.bbclass: ensure CMAKE_SYSTEM_NAME is correct
Using TARGET_OS can add the ABIEXTENSION so ensure that is is removed for the Linux
TARGET_OS, we might have other TARGET_OSes so don't hard code CMAKE_SYSTEM_NAME

[YOCTO #5145]

(From OE-Core master rev: 7d8b700242b1b32c6b6d0735b497701800f54fc4)

(From OE-Core rev: 5dc70fe4adfbc21426c461971e5a252233a015ba)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-08 17:26:05 +00:00
Richard Purdie
fdbd1d8c86 cmake: set system name correctly
For unknown reasons, the cmake class is using SDK_OS as the
target system OS. This makes no sense but only shows up as a problem
when you try a different SDK OS. Fix it to use TARGET_OS which is
the correct thing to do. For the vast majority of users this will
make no difference.

(From OE-Core master rev: 57be84259f0885865c85d7bac350979430b956b5)

(From OE-Core rev: 8a414086c04acb1c9387567a49f05577fa0d66ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-08 17:26:05 +00:00
Paul Eggleton
eb3598d248 libsoup-2.4: add intltool-native to DEPENDS
The configure script looks for this; most of the time dependency chains
ensure this is present but we need to be explicit or failures can
occur.

Reported by Nicolas Dechesne <nicolas.dechesne@linaro.org>

(From OE-Core master rev: 22e45ed7d74ceb4a719e7b5889400c20ed4a0783)

(From OE-Core rev: 394fa61d00b97c19610bfb38f02174c4e8aeeb15)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-19 11:45:14 +00:00
Richard Purdie
57e6d537e8 build-appliance-image: Update to dylan head revision
(From OE-Core rev: f79b2a6ff3e9f6bd5bfb6ae166d28569b0f1149d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-13 16:34:58 +00:00
Beth Flanagan
c4c6203ef5 poky.conf: Flip DISTRO_VERSION for 1.4.3
With 1.4.3 we need to flip vars in 1.4.3

(From meta-yocto rev: e5c4a75e0ae32e35b27934a66e9157f8910b5489)

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-13 16:34:02 +00:00
Scott Rifenbark
53e65dc1dd documentation: Updated Manual revision table for 1.4.3 release.
Using January of 2014 for the date.  All six manuals that have
a table: adt, bsp, dev, kernel, profile, and ref.

(From yocto-docs rev: 8722f2a4ff4203134135c5b81a8d99d6421e218f)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-13 16:29:58 +00:00
Scott Rifenbark
d089194aa6 mega-manual.sed: Updated to support a 1.4.3 mega-manual build.
(From yocto-docs rev: 910223dbdb06b585a48073dcebc29bfdc5c8a685)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-13 16:29:57 +00:00
Scott Rifenbark
100a5ba8cb poky.ent: Changed variables to support a 1.4.3 release.
(From yocto-docs rev: 33fd454a003ca85cb0a1c7a2c974ca40504d751b)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-13 16:29:57 +00:00
Scott Rifenbark
3ec2ad0d76 poky.ent: Fixed variable for ADT Installer download link
The YOCTO_ADTINSTALLER_DL_URL variable used to point to the
ADT Installer tarball download area was incorrect.  It was set
to "&YOCTO_RELEASE_DL_URL;/adt_installer".  Community member
Dusty Clark ran into trouble downloading from the link in the
"Current" documentation version of the Application Developer's
Manual.  I fixed the variable to be
YOCTO_ADTINSTALLER_DL_URL "&YOCTO_RELEASE_DL_URL;/adt-installer".

Reported-by: Dusty Clark <dclark@mmto.org>
(From yocto-docs rev: 63959cfd6ff096c9d1bcff39453358f3cbe8472e)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-13 16:29:57 +00:00
Richard Purdie
f665cee7a6 build-appliance-image: Update to dylan head revision
(From OE-Core rev: b17beebf488d8392698a5efdd6f08b599c1ee1cd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 22:28:08 +00:00
Baogen Shang
6e71a5f24b libtiff: CVE-2013-4243
cve description:
Heap-based buffer overflow in the readgifimage function in the gif2tiff
tool in libtiff 4.0.3 and earlier allows remote attackers to cause a denial
of service (crash) and possibly execute arbitrary code via a crafted height
and width values in a GIF image.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4243

(From OE-Core dora rev: a2a200a3951cecd7dd43dee360e0260051c97416)

(From OE-Core rev: 95f9889ac7e2731e3fb67f4b9db4bb634dd2a894)

Signed-off-by: Baogen Shang <baogen.shang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 22:17:33 +00:00
Baogen Shang
7ed98ddf7f libtiff: CVE-2013-4232
cve description:
Use-after-free vulnerability in the t2p_readwrite_pdf_image function
in tools/tiff2pdf.c in libtiff 4.0.3 allows remote attackers to cause
a denial of service (crash) or possible execute arbitrary code via a
crafted TIFF image.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4232

(From OE-Core dora rev: 60482e45677c467f55950ce0f825d6cb9c121c9c)

(From OE-Core rev: 96ae9c1b9a0baab55d00aaaafb1df8ca8c928314)

Signed-off-by: Baogen Shang <baogen.shang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 22:17:33 +00:00
Ming Liu
88fe0cba5b libtiff: fix CVE-2013-1960
Heap-based buffer overflow in the tp_process_jpeg_strip function in tiff2pdf
in libtiff 4.0.3 and earlier allows remote attackers to cause a denial of
service (crash) and possibly execute arbitrary code via a crafted TIFF image
file.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-1960

(From OE-Core dora rev: 66387677cbd85ba4a76a254942377621acd68249)

(From OE-Core rev: 70f37e59b9d2c5e5ebb67283363acb02c76504a8)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 22:17:33 +00:00
Ming Liu
1d31f44f8c gst-ffmpeg: fix CVE-2013-3674
The cdg_decode_frame function in cdgraphics.c in libavcodec in FFmpeg before
1.2.1 does not validate the presence of non-header data in a buffer, which
allows remote attackers to cause a denial of service (out-of-bounds array
access and application crash) via crafted CD Graphics Video data.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-3674

(From OE-Core master rev: f1721553a873b242bc26ad3e4d618aea39dfd507)

(From OE-Core rev: 23f323b80cbef122a4ed0897dfff54bb1b0b8ec0)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 22:17:33 +00:00
Richard Purdie
90f366ec75 build-appliance-image: Update to dylan head revision
(From OE-Core rev: 4e31587ef3be95abe28d38609da16f47d1261c07)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 17:06:07 +00:00
Nicolas Dechesne
483102fb98 image-mklibs: ensure sysroot is correctly set when calling gcc
[YOCTO #2519]

When getting gcc from sstate, it is possible to get a gcc with a bogus
sysroot configuration, as discussed in [1] or in [YOCTO #2519].

mklibs script will eventually call gcc, so we need to make sure that it
provides gcc with the right sysroot location.

[1] http://lists.openembedded.org/pipermail/openembedded-core/2013-September/084159.html

(From OE-Core master rev: 3a66dd762e493ad2cda57110be67c3b06628050a)

(From OE-Core rev: 05d09149216aee6681fa1c4c6bc7ec4ea7edda8b)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 17:00:31 +00:00
Christopher Larson
02b61bf09d package.bbclass: ensure license excluded files aren't packaged
An excluded package left its files behind, which meant they could end up in
another package instead, meaning we could ship GPLv3 binaries even with GPLv3
in INCOMPATIBLE_LICENSE. Skip the files belonging to the excluded packages to
prevent this from occurring.

(From OE-Core master rev: c045bfe6b991006ac80f0e2d06a8917ae58d9262)

(From OE-Core rev: f6bd8fcf07ddcac43e74bdcd1dfacd45b12a7df3)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 17:00:31 +00:00
Christopher Larson
8a70e3d87c license.bbclass: include all licenses in the manifest
When we don't have a generic license file for the license in question, we can
warn, but we should still include it in the manifest, otherwise the manifest
doesn't reflect reality. Failing to include a license listed in the recipe in
the manifest can't be allowed.

(From OE-Core master rev: e87232828b761d56f1ce6a27e4009d350d68209c)

(From OE-Core rev: 32c064e567aaba18dfb07b171dde9cc43d0e6de8)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:48 +00:00
Chen Qi
2e5772020f license.bbclass: fix missing of license files on ubuntu build host
The license_create_manifest function contains bashism, this will lead
to unexpected results on ubuntu build host, as sh is linked to dash on
ubuntu. Even if COPY_LIC_MANIFEST and COPY_LIC_DIRS are enabled, the
license files will still be missing on target.

This patch fixes the above problem.

[YOCTO #5549]

(From OE-Core master rev: 4df9daee5c732c0a20dabe8515577238a1508512)

(From OE-Core rev: 54a2cc32028c99f2541f5be3ef49ff1f292832b0)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:48 +00:00
Richard Purdie
6a1bec4f6e metadata_scm: Avoid crashing on new svn version layouts
This avoids crashing on newer svn layouts where the entries files
don't contain three lines. If someone wants to fix this to
get the right version on newer subversion checkouts, patches
welcome but this at least stops things crashing.

[YOCTO #5363]

(From OE-Core master rev: e850c53d4d8cb877a704a23f9ce02d6185ba3ffa)

(From OE-Core rev: 9fdea109d65c338913caa22e3a09f0408c361536)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:47 +00:00
Martin Jansa
26a64656d0 db: Fix build with high PARALLEL_MAKE
* sometimes it fails with:
  libtool: link: `util_log.lo' is not a valid libtool object
  make: *** [db_replicate] Error 1

(From OE-Core master rev: 0a1efeb6260a565b6ce3abd523eabb15384570d1)

(From OE-Core rev: 43003ea2094e0cdc779030b3c35fa79e6d967895)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:47 +00:00
Laurentiu Palcu
6c39db8caa meta-toolchain-qt: put QT_CONF_PATH in environment script
This will allow apps using QLibraryInfo class to find qt.conf.

[YOCTO #5339]

(From OE-Core master rev: fffa4c37c49b169f663d28612b9251819cef9577)

(From OE-Core rev: 6dbad65ed81a8ff80a965351dd9f229be51ca477)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:47 +00:00
Laurentiu Palcu
dbaa6f0e50 nativesdk-qt4-tools: create qt.conf file
When installing the SDK to another location than the default one, qmake
will look for libraries, headers, etc. in the default location. That's
because the paths are hard-coded in the binary itself. Luckily, QT
allows to override this using a qt.conf file installed in the same
directory with the application executable. However, we already have a
patch that allows for the installation of qt.conf in another place and
read the location from QT_CONF_PATH environment variable.

Hence, install qt.conf in ${sysconfdir}. This will allow other apps, that
use QLibraryInfo class, to find it.

[YOCTO #5339]

(From OE-Core master rev: 23f88695683a8e428375a8ccb6be935347a8768c)

(From OE-Core rev: 78710c0d0a9442b7d177f705aada528acd27043d)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:47 +00:00
Richard Purdie
233c6f2c96 lib/oe/path: Fix copytree functions for tar 1.27
tar version 1.27 returns:

tar: --same-order option cannot be used with -c

with the commandlines we have been using. We can remove the -s option (which
is --same-order) to remove the error.

(From OE-Core master rev: 69c26e795c117aabfaf313abbfd10e70ede633d9)

(From OE-Core rev: da4eb72b29efcf1fba697d0fa060cab8c0a125ab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:46 +00:00
Richard Purdie
90a862ce42 classes: tar 1.27 fixes
tar version 1.27 returns:

tar: --same-order option cannot be used with -c

with the commandlines we have been using. We can remove the -s option (which
is --same-order) to remove the error.

(From OE-Core master rev: 3d5a6d0a480a0fa98260a3b3ffc71b8d9e3e58af)

(From OE-Core rev: 5e3ec61bacd393d461498d9e090306cc7bd8fa63)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:46 +00:00
Roy Li
3ef7b65897 dropbear: pass SFTPSERVER_PATH explicitly
The default value of SFTPSERVER_PATH is "/usr/libexec/sftp-server" defined in
dropbear-2013.58/option.h, but after commit 406bd38b423[bitbake.conf: change
libexecdir to ${libdir}/${BPN}], sftp-server is provided by openssh package,
and is installed into ${libdir}/openssh, so we pass it explicitly.

(From OE-Core master rev: 5f6deb044226885912214532cebb1d871f03c53a)

(From OE-Core rev: 0e599ecaa6aa5668c609cfc520398e2509c1292d)

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:46 +00:00
Khem Raj
ab3f627aaf elfutils-native: Update the patch to include the missing pieces needed for tests
In the last patch we missed similar update for test/line2addr.c
which meant that the build still failed.

(From OE-Core master rev: cb966afe86a5856d846fb0d4fb627cdce2ae0670)

(From OE-Core rev: 51008a21629561c8d40a7addcddde6c2be176e90)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:46 +00:00
Bruce Ashfield
9a56d0701a kern-tools: use dylan branch
This switches the kern-tools to use the matched dylan branch that is maintained
to work against the dylan release of yocto/oe-core.

As part of this switch, we also update the SRCREV to match the latest fixes for
the dylan kernel-tools.

(From OE-Core rev: 68e91f770ad841839e105fe86abdde1b12c696f8)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:10:45 +00:00
Richard Purdie
c168a351a6 bitbake: perforce: Fix path subdirectory issues
With a SRC_URI = " \
p4://depot/folder/...;module=localfolder/localsubfolder;changeslist=${P4CHANGELIST} \
"

the subfolders of //depot/folder/... get renamed when mapped to the
local folder structure. They lose the first 3 letters. This
patch fixes that.

Issue reported by and patch sent from katutxakurra@gmail.com

[YOCTO #5380]

(Bitbake master rev: 40e06dc459d9c0b5d42d65b2d2c846196fd36b1f)

(Bitbake rev: a779ae4d4ef47fc36b98ec5753289af7755fcd03)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:51:35 +00:00
Volker Vogelhuber
7800f43d7e bitbake: fetch/hg: Improve user/password handling
Trying to use a server with username and password authentication
within the URL of the SRC_URI variable doesn't appear to work.

This patch adds the missing parts to the hg fetcher to make this
work properly.

(Bitbake master rev: dc3d6d73e44802c203b3f7247f6f212acc2f69bf)

(Bitbake rev: f1e82236c2d30897bb863fb8948dd48614fc262a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:51:35 +00:00
Nicolas Dechesne
30548aae0a bitbake: fetch2/svn.py: use log instead of info to retrieve revision
We have faced a corner case situation where the 'last changed
revision' returned from svn info is wrong. It happens when the last
revision is a directory move. e.g. if we assume that the svn
repository at revA has root/x/y/z/foo/bar and it is moved to
root/a/b/c/foo/bar in revB, then svn info 'last change revision' will
return revA. As such when using AUTOREV, we are going to attempt to
retrieve root/a/b/c/foo/bar (as per SRC_URI) but at revA when it did
not exist.

So this patch changes how we retrieve the latest revision and uses
'svn log --limit 1' which gives correct result in all tested cases.

(Bitbake master rev: 17d8ef0b813a05c231e3dbe6e8bc82a4a9b1d2f8)

(Bitbake rev: 91e3735c2e73094b49f99b01008bb5bf47dacf04)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:51:35 +00:00
Chen Qi
4e399f08d5 busybox: configure system user id to range from 100 to 999
Previously, the range was 0 to 0. This made it impossible to use
busybox's adduser utility to add a system user. The following error
would appear.

      adduser: no uids left

This patch fixes this problem by giving it a reasonable range.

(From OE-Core rev: c4555007d04ccacbc192827b70a97f9a48500a22)

(From OE-Core rev: 3549f5f203363302256848bb33c05c4fd4871948)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:15 +01:00
Chen Qi
f9c6562774 rpm: fix typo in PACKAGECONFIG
Fix typo, change PACAKGECONFIG to PACKAGECONFIG.

(From OE-Core rev: 77363d06121ceec264e06165ddda7b829c963301)

(From OE-Core rev: 5168f694e242ff3ba31f7d7c2ab7c974a937533f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:15 +01:00
Paul Eggleton
5a1273af1e classes/package_rpm: fix bitbake package-index for RPM
The function that "bitbake package-index" relies upon when using the RPM
package backend (package_update_index_rpm()) uses MULTILIB_PREFIX_LIST
to get the list of package architectures to be indexed, but that
variable is only set when populate_sdk_rpm or rootfs_rpm are inherited,
which is not the case for the package-index recipe. Until we're able to
refactor this properly, for minimal impact just use the value of
ALL_MULTILIB_PACKAGE_ARCHS if MULTILIB_PREFIX_LIST does not give us any
architectures (the equivalent function in the ipk backend uses the
former variable).

Having "bitbake package-index" working is important because it's the
only practical way of indexing RPM packages for use as a feed; host
versions of createrepo won't work properly because they won't support
indexing recommends relationships.

Stopgap fix for [YOCTO #5278].

(From OE-Core rev: 9359719c563e1ab0ff10186d1a1b6bde7840dbf3)

(From OE-Core rev: eebd2246c0f1ad9becc13a2404ba9d48386d1cbb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:15 +01:00
Jackie Huang
1563c61592 findutils_4.2.31: backport fixes for doc build errors
[YOCTO #5212]

(From OE-Core rev: cb41aff1ac343b4fa8b4c9d43cc38652f7593ee6)

(From OE-Core rev: 89a298870c4a3e44795851fedb4db170ff5183d7)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:15 +01:00
Khem Raj
fcd93c0b41 elfutils-native: Fix build on distros with gcc 4.8
The patch redhat-portability.diff causes this issue
so lets revert the portion which was using %a instead of %m
thats recommended anyway, redhat patch seems to be targetting
old compilers.

(From OE-Core rev: c1cbc57eb80d2cab9a80d5e5aa65419f40eefb15)

(From OE-Core rev: 61efbcd27b937677d56edf58fbca7a4840c454b2)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:15 +01:00
Darren Hart
7f1a354944 kernel.bbclass: Correct post(inst|rm) package association
Fixes [YOCTO #4991]

The kernel image is installed as part of the kernel-image package, but
the symlink creation/removal via alternatives is being done in
pkg_post(inst|rm)_kernel-base.

Move the postinst alternatives logic into the kernel-image functions.

(From OE-Core rev: 35f538b117e3387354d2dab1f22c3de28ab1322b)

(From OE-Core rev: d5478e188561c2fee788ee326e3f7cdea7cf5a24)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:14 +01:00
Saul Wold
8bc5708945 python: Backport 2 CVE from upstream
These are back ports of 2 patches from upstream to address
CVE-2011-4944
CVE-2013-4238

(From OE-Core rev: 4606eab53e8eff57d6369ea20a5ea63916ea3ea7)

(From OE-Core rev: 8a00a57870bf71a34b901c4a3aa08094f548e8f1)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:14 +01:00
Saul Wold
8eacb41c1c perl: Backport 2 CVE Patches
These patches are backported from upstream since it might be risky to update right now
They address the following CVEs

CVE-2012-6329
CVE-2013-1667

(From OE-Core rev: b6c286c447e50fe499f03b64c6be80ac18504265)

(From OE-Core rev: 7dc11c40d45eaf90487ac4a1edc3694698fa80ab)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:14 +01:00
Ross Burton
a36c28943d libxml2: remove patch for CVE-2012-2871
This CVE patch is actually against Chromium as they ship an internal fork of
libxml2 and breaks ABI.  The real issue has been resolved in libxslt 1.1.27, and
we're shipping 1.1.28.

(From OE-Core rev: e6c60252ab4ba6842f63c6b8a519a85f2ff238fb)

(From OE-Core rev: 82b91d2484a4430a9b6689d0b6b07e6f62392266)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:14 +01:00
Paul Eggleton
1633edffc7 sysvinit-inittab: ensure unique label for SERIAL_CONSOLES entries
The label field in /etc/inittab entries needs to be unique, and the
numeric label being used for the SERIAL_CONSOLES getty entries was
clashing with the entries added for standard ttyX entries added via
SYSVINIT_ENABLED_GETTYS. Use the part after "tty" in the device name
(which is what the comment further down explicitly says should be done)
as the label rather than a simple incrementing number.

Fixes [YOCTO #4374].

(From OE-Core rev: 28d3202befcec72554885f8ea9cb7985523b89f5)

(From OE-Core rev: d3393e28c5d6aa8a8bab754574ec68e540269a1c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:14 +01:00
Jason Wessel
f5bfb120dd ncurses: Fix problems expanding ncurses-libtinfo when in IMAGE_INSTALL
The ncurses package was generating the following error as a result
of not specifing the PACKAGES_DYNAMIC correctly.  This error only
appear when using the IMAGE_INSTALL list that has been expanded by
the hob or from the pkgdata.

ERROR: Nothing RPROVIDES 'ncurses-libtinfo'

The dynamic packages are named using "${PN}-lib%s".  So we check for
${PN}-lib*

(From OE-Core rev: 67dd4e31272918e08b65b5c8d5d6b00e814dbf7f)

(From OE-Core rev: 88c0274787744bd6e1c6303add35fd8b094dce89)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:14 +01:00
Marko Lindqvist
9f902cfea2 boost: fix build when PARALLEL_MAKE is not set
It was passing "None" to bjam, which then parsed it as unknown build target.

(From OE-Core rev: 0a323abab1961caa334035f4f263f1787b3d7cc7)

(From OE-Core rev: 280fab68c737938b938addd8a3dde1ae95ebf64d)

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:14 +01:00
Saul Wold
905642985d mc: Don't remove libdir and split helpers into packages
It contains helper programs that are needed to make mc do the right actions
for the various file formats it understands.

The helpers are perl, python and shell scripts, split them out so the core
mc does not try to pull in perl and python, it will still run without these
helpers.

[YOCTO #4432]

(From OE-Core rev: 6d0205576ef1e8a62c469b883dc0c962440469a7)

(From OE-Core rev: 0e4b2969283df4124d6edd58bbe7149221fb9362)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-10 12:31:14 +01:00
Richard Purdie
560fa9ad8d bitbake: methodpool: Retire it, remove global method scope
Having a global method scope confuses users and with the introduction
of parallel parsing, its not even possible to correctly detect conflicting
functions. Rather than try and fix that, its simpler to retire the global
method scope and restrict functions to those locations they're defined
within. This is more what users actually expect too.

If we remove the global function scope, the need for methodpool is reduced
to the point we may as well retire it. There is some small loss of caching
of parsed functions but timing measurements so the impact to be neglibile
in the overall parsing time.

(Bitbake rev: bbb4fa427739912ff3b87379bf629066f6662458)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Tested-by: Denys Dmytriyenko <denys@ti.com>
2013-09-11 17:58:33 +01:00
121 changed files with 4276 additions and 250 deletions

View File

@@ -526,7 +526,7 @@ class Cache(object):
if appends != info_array[0].appends:
logger.debug(2, "Cache: appends for %s changed", fn)
bb.note("%s to %s" % (str(appends), str(info_array[0].appends)))
logger.debug(2, "%s to %s" % (str(appends), str(info_array[0].appends)))
self.remove(fn)
return False

View File

@@ -1606,6 +1606,7 @@ class Parser(multiprocessing.Process):
self.quit = quit
self.init = init
multiprocessing.Process.__init__(self)
self.context = bb.utils._context.copy()
def run(self):
if self.init:
@@ -1640,6 +1641,7 @@ class Parser(multiprocessing.Process):
def parse(self, filename, appends, caches_array):
try:
bb.utils._context = self.context.copy()
return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array)
except Exception as exc:
tb = sys.exc_info()[2]

View File

@@ -325,7 +325,7 @@ def decodeurl(url):
user, password, parameters).
"""
m = re.compile('(?P<type>[^:]*)://((?P<user>.+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
m = re.compile('(?P<type>[^:]*)://((?P<user>[^/]+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
if not m:
raise MalformedUrl(url)

View File

@@ -92,7 +92,10 @@ class Hg(FetchMethod):
if not ud.user:
hgroot = host + ud.path
else:
hgroot = ud.user + "@" + host + ud.path
if ud.pswd:
hgroot = ud.user + ":" + ud.pswd + "@" + host + ud.path
else:
hgroot = ud.user + "@" + host + ud.path
if command == "info":
return "%s identify -i %s://%s/%s" % (basecmd, proto, hgroot, ud.module)
@@ -112,7 +115,10 @@ class Hg(FetchMethod):
# do not pass options list; limiting pull to rev causes the local
# repo not to contain it and immediately following "update" command
# will crash
cmd = "%s pull" % (basecmd)
if ud.user and ud.pswd:
cmd = "%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" pull" % (basecmd, ud.user, ud.pswd, proto)
else:
cmd = "%s pull" % (basecmd)
elif command == "update":
cmd = "%s update -C %s" % (basecmd, " ".join(options))
else:

View File

@@ -112,7 +112,7 @@ class Perforce(FetchMethod):
base = path
which = path.find('/...')
if which != -1:
base = path[:which]
base = path[:which-1]
base = self._strip_leading_slashes(base)

View File

@@ -27,6 +27,7 @@ import os
import sys
import logging
import bb
import re
from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
@@ -89,6 +90,8 @@ class Svn(FetchMethod):
if command == "info":
svncmd = "%s info %s %s://%s/%s/" % (ud.basecmd, " ".join(options), proto, svnroot, ud.module)
elif command == "log1":
svncmd = "%s log --limit 1 %s %s://%s/%s/" % (ud.basecmd, " ".join(options), proto, svnroot, ud.module)
else:
suffix = ""
if ud.revision:
@@ -165,14 +168,13 @@ class Svn(FetchMethod):
"""
Return the latest upstream revision number
"""
bb.fetch2.check_network_access(d, self._buildsvncommand(ud, d, "info"))
bb.fetch2.check_network_access(d, self._buildsvncommand(ud, d, "log1"))
output = runfetchcmd("LANG=C LC_ALL=C " + self._buildsvncommand(ud, d, "info"), d, True)
output = runfetchcmd("LANG=C LC_ALL=C " + self._buildsvncommand(ud, d, "log1"), d, True)
revision = None
for line in output.splitlines():
if "Last Changed Rev" in line:
revision = line.split(":")[1].strip()
# skip the first line, as per output of svn log
# then we expect the revision on the 2nd line
revision = re.search('^r([0-9]*)', output.splitlines()[1]).group(1)
return revision

View File

@@ -17,24 +17,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
What is a method pool?
BitBake has a global method scope where .bb, .inc and .bbclass
files can install methods. These methods are parsed from strings.
To avoid recompiling and executing these string we introduce
a method pool to do this task.
This pool will be used to compile and execute the functions. It
will be smart enough to
"""
from bb.utils import better_compile, better_exec
from bb import error
# A dict of function names we have seen
_parsed_fns = { }
def insert_method(modulename, code, fn):
"""
@@ -43,29 +26,3 @@ def insert_method(modulename, code, fn):
"""
comp = better_compile(code, modulename, fn )
better_exec(comp, None, code, fn)
# now some instrumentation
code = comp.co_names
for name in code:
if name in ['None', 'False']:
continue
elif name in _parsed_fns and not _parsed_fns[name] == modulename:
error("The function %s defined in %s was already declared in %s. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names." % (name, modulename, _parsed_fns[name]))
else:
_parsed_fns[name] = modulename
# A dict of modules the parser has finished with
_parsed_methods = {}
def parsed_module(modulename):
"""
Has module been parsed?
"""
return modulename in _parsed_methods
def set_parsed_module(modulename):
"""
Set module as parsed
"""
_parsed_methods[modulename] = True

View File

@@ -148,9 +148,8 @@ class MethodNode(AstNode):
text = '\n'.join(self.body)
if self.func_name == "__anonymous":
funcname = ("__anon_%s_%s" % (self.lineno, self.filename.translate(string.maketrans('/.+-', '____'))))
if not funcname in bb.methodpool._parsed_fns:
text = "def %s(d):\n" % (funcname) + text
bb.methodpool.insert_method(funcname, text, self.filename)
text = "def %s(d):\n" % (funcname) + text
bb.methodpool.insert_method(funcname, text, self.filename)
anonfuncs = data.getVar('__BBANONFUNCS') or []
anonfuncs.append(funcname)
data.setVar('__BBANONFUNCS', anonfuncs)
@@ -171,8 +170,7 @@ class PythonMethodNode(AstNode):
# 'this' file. This means we will not parse methods from
# bb classes twice
text = '\n'.join(self.body)
if not bb.methodpool.parsed_module(self.modulename):
bb.methodpool.insert_method(self.modulename, text, self.filename)
bb.methodpool.insert_method(self.modulename, text, self.filename)
data.setVarFlag(self.function, "func", 1)
data.setVarFlag(self.function, "python", 1)
data.setVar(self.function, text)

View File

@@ -166,10 +166,6 @@ def handle(fn, d, include):
if oldfile:
d.setVar("FILE", oldfile)
# we have parsed the bb class now
if ext == ".bbclass" or ext == ".inc":
bb.methodpool.set_parsed_module(base_name)
return d
def feeder(lineno, s, fn, root, statements):

View File

@@ -407,7 +407,8 @@ class URLHandle(unittest.TestCase):
datatable = {
"http://www.google.com/index.html" : ('http', 'www.google.com', '/index.html', '', '', {}),
"cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}),
"cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'})
"cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'}),
"git://git.openembedded.org/bitbake;branch=@foo" : ('git', 'git.openembedded.org', '/bitbake', '', '', {'branch': '@foo'})
}
def test_decodeurl(self):

View File

@@ -132,12 +132,13 @@ class LayerSelectionDialog (CrumbsDialog):
tree_selection.set_mode(gtk.SELECTION_SINGLE)
# Allow enable drag and drop of rows including row move
dnd_internal_target = ''
dnd_targets = [(dnd_internal_target, gtk.TARGET_SAME_WIDGET, 0)]
layer_tv.enable_model_drag_source( gtk.gdk.BUTTON1_MASK,
self.TARGETS,
gtk.gdk.ACTION_DEFAULT|
dnd_targets,
gtk.gdk.ACTION_MOVE)
layer_tv.enable_model_drag_dest(dnd_targets,
gtk.gdk.ACTION_MOVE)
layer_tv.enable_model_drag_dest(self.TARGETS,
gtk.gdk.ACTION_DEFAULT)
layer_tv.connect("drag_data_get", self.drag_data_get_cb)
layer_tv.connect("drag_data_received", self.drag_data_received_cb)

View File

@@ -181,7 +181,9 @@ class PackageListModel(gtk.ListStore):
def sort_func(self, model, iter1, iter2, user_data):
val1 = model.get_value(iter1, PackageListModel.COL_NAME)
val2 = model.get_value(iter2, PackageListModel.COL_NAME)
if val1.startswith(user_data) and not val2.startswith(user_data):
if val1 is None or val2 is None:
return 0
elif val1.startswith(user_data) and not val2.startswith(user_data):
return -1
elif not val1.startswith(user_data) and val2.startswith(user_data):
return 1
@@ -562,7 +564,9 @@ class RecipeListModel(gtk.ListStore):
def sort_func(self, model, iter1, iter2, user_data):
val1 = model.get_value(iter1, RecipeListModel.COL_NAME)
val2 = model.get_value(iter2, RecipeListModel.COL_NAME)
if val1.startswith(user_data) and not val2.startswith(user_data):
if val1 is None or val2 is None:
return 0
elif val1.startswith(user_data) and not val2.startswith(user_data):
return -1
elif not val1.startswith(user_data) and val2.startswith(user_data):
return 1

View File

@@ -71,6 +71,21 @@
<date>August 2013</date>
<revremark>Released with the Yocto Project 1.4.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.3</revnumber>
<date>March 2014</date>
<revremark>Released with the Yocto Project 1.4.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.4</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.5</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -83,6 +83,21 @@
<date>August 2013</date>
<revremark>Released with the Yocto Project 1.4.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.3</revnumber>
<date>March 2014</date>
<revremark>Released with the Yocto Project 1.4.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.4</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.5</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -18,8 +18,7 @@
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
section in the Yocto Project Board Support Package (BSP) Developer's Guide.
For more complete information on how to work with the kernel, see the
<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel
Development Manual</ulink>.
<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
</para></listitem>
<listitem><para><emphasis>User Application Development:</emphasis>
User Application Development covers development of applications that you intend
@@ -131,7 +130,7 @@
<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'><filename>yocto-bsp</filename></ulink> script</emphasis>:
Layers are ideal for
isolating and storing work for a given piece of hardware.
A layer is really just a location or area in which you place
A layer is really just a location or area in which you place
the recipes and configurations for your BSP.
In fact, a BSP is, in itself, a special type of layer.
The simplest way to create a new BSP layer that is compliant with the
@@ -165,7 +164,7 @@
Romley, sys940x, Sugar Bay, and tlk exist in their own separate layers
within the larger <filename>meta-intel</filename> layer.</note>
<para>When you set up a layer for a new BSP, you should follow a standard layout.
This layout is described in the
This layout is described in the
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
section of the Board Support Package (BSP) Development Guide.
In the standard layout, you will notice a suggested structure for recipes and
@@ -343,10 +342,10 @@
If you are working in the kernel all the time, you probably would want
to set up your own local Git repository of the kernel tree.
If you just need to make some patches to the kernel, you can access
temporary kernel source files that were extracted and used
temporary kernel source files that were extracted and used
during a build.
We will just talk about working with the temporary source code.
For more information on how to get kernel source code onto your
For more information on how to get kernel source code onto your
host system, see the
"<link linkend='local-kernel-files'>Yocto Project Kernel</link>"
bulleted item earlier in the manual.
@@ -411,7 +410,7 @@
"<link linkend='local-yp-release'>Yocto Project Release</link>" earlier in this manual.
</para></listitem>
<listitem><para><emphasis>Establish the temporary kernel source files</emphasis>:
Temporary kernel source files are kept in the
Temporary kernel source files are kept in the
<link linkend='build-directory'>Build Directory</link>
created by the
OpenEmbedded build system when you run BitBake.
@@ -474,7 +473,7 @@
Application development involves creating an application that you want
to run on your target hardware, which is running a kernel image created using the
OpenEmbedded build system.
The Yocto Project provides an
The Yocto Project provides an
<ulink url='&YOCTO_DOCS_ADT_URL;#adt-intro-section'>Application Development Toolkit (ADT)</ulink>
and stand-alone
<ulink url='&YOCTO_DOCS_ADT_URL;#the-cross-development-toolchain'>cross-development toolchains</ulink>
@@ -950,7 +949,7 @@
and then click "Next".</para></listitem>
<listitem><para>Select the root directory and browse to
<filename>~/yocto-eclipse/plugins</filename>.</para></listitem>
<listitem><para>Three plug-ins exist:
<listitem><para>Three plug-ins exist:
<filename>org.yocto.bc.ui</filename>,
<filename>org.yocto.sdk.ide</filename>, and
<filename>org.yocto.sdk.remotetools</filename>.
@@ -980,7 +979,7 @@
<para>
To start, you need to do the following from within the Eclipse IDE:
<itemizedlist>
<listitem><para>Choose "Preferences" from the
<listitem><para>Choose "Preferences" from the
"Windows" menu to display
the Preferences Dialog</para></listitem>
<listitem><para>Click "Yocto Project ADT"</para></listitem>
@@ -1010,7 +1009,7 @@
<listitem><para><emphasis>
<filename>Build System Derived Toolchain:</filename></emphasis>
Select this mode if the cross-toolchain has been installed and built
as part of the
as part of the
<link linkend='build-directory'>Build Directory</link>.
When you select <filename>Build system derived toolchain</filename>,
you are using the toolchain bundled
@@ -1022,7 +1021,7 @@
If you are using a stand-alone pre-built toolchain, you should be pointing to the
where it is installed.
If you used the ADT Installer script and accepted the default
installation directory, the toolchain will be installed in
installation directory, the toolchain will be installed in
the <filename>&YOCTO_ADTPATH_DIR;</filename> directory.
Sections "<ulink url='&YOCTO_DOCS_ADT_URL;#configuring-and-running-the-adt-installer-script'>Configuring
and Running the ADT Installer Script</ulink>" and
@@ -1034,17 +1033,17 @@
field is the <link linkend='build-directory'>Build Directory</link>.
See the "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using
BitBake and the Build Directory</ulink>" section in the Yocto Project Application
Developer's Guide for information on how to install
Developer's Guide for information on how to install
the toolchain into the Build Directory.</para></listitem>
<listitem><para><emphasis>Specify the Sysroot Location:</emphasis>
This location is where the root filesystem for the target hardware resides.
If you used the ADT Installer script and accepted the
If you used the ADT Installer script and accepted the
default installation directory, then the location is
<filename>/opt/poky/&lt;release&gt;</filename>.
Additionally, when you use the ADT Installer script,
the same location is used for
the QEMU user-space tools and the NFS boot process.</para>
<para>If you used either of the other two methods to
<para>If you used either of the other two methods to
install the toolchain or did not accept the ADT Installer
script's default installation directory, then the
location of the sysroot filesystem depends on where you separately
@@ -1160,7 +1159,7 @@
configurations.
You can override these settings for a given project by following these steps:
<orderedlist>
<listitem><para>Select "Change Yocto Project Settings" from the
<listitem><para>Select "Change Yocto Project Settings" from the
"Project" menu.
This selection brings up the Yocto Project Settings Dialog
and allows you to make changes specific to an individual project.
@@ -1170,14 +1169,14 @@
Dialog as described earlier
in the "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse
Yocto Plug-in</link>" section.
The Yocto Project Settings Dialog allows you to override
The Yocto Project Settings Dialog allows you to override
those default settings for a given project.</para></listitem>
<listitem><para>Make your configurations for the project and click "OK".
If you are running the Juno version of Eclipse, you can skip down to the next
section where you build the project.
If you are not working with Juno, you need to reconfigure the project as
described in the next step.</para></listitem>
<listitem><para>Select "Reconfigure Project" from the
<listitem><para>Select "Reconfigure Project" from the
"Project" menu.
This selection reconfigures the project by running
<filename>autogen.sh</filename> in the workspace for your project.
@@ -1197,7 +1196,7 @@
<para>
To build the project in Juno, right click on the project in the navigator pane and select
"Build Project".
If you are not running Juno, select "Build Project" from the
If you are not running Juno, select "Build Project" from the
"Project" menu.
The console should update and you can note the cross-compiler you are using.
</para>
@@ -1209,7 +1208,7 @@
<para>
To start the QEMU emulator from within Eclipse, follow these steps:
<orderedlist>
<listitem><para>Expose and select "External Tools" from
<listitem><para>Expose and select "External Tools" from
the "Run" menu.
Your image should appear as a selectable menu item.
</para></listitem>
@@ -1232,12 +1231,12 @@
<title>Deploying and Debugging the Application</title>
<para>
Once the QEMU emulator is running the image, you can deploy
your application using the Eclipse IDE and use then use
Once the QEMU emulator is running the image, you can deploy
your application using the Eclipse IDE and use then use
the emulator to perform debugging.
Follow these steps to deploy the application.
<orderedlist>
<listitem><para>Select "Debug Configurations..." from the
<listitem><para>Select "Debug Configurations..." from the
"Run" menu.</para></listitem>
<listitem><para>In the left area, expand <filename>C/C++Remote Application</filename>.</para></listitem>
<listitem><para>Locate your project and select it to bring up a new
@@ -1258,7 +1257,7 @@
determined earlier.</para></listitem>
<listitem><para>Click "Finish" to close the
New Connections Dialog.</para></listitem>
<listitem><para>Use the drop-down menu now in the
<listitem><para>Use the drop-down menu now in the
"Connection" field and pick the IP Address you entered.
</para></listitem>
<listitem><para>Click "Run" to bring up a login screen
@@ -1315,8 +1314,8 @@
display the output.
For information on how to use Lttng to trace an application,
see <ulink url='http://lttng.org/documentation'></ulink>
and the
"<ulink url='&YOCTO_DOCS_PROF_URL;#lttng-linux-trace-toolkit-next-generation'>LTTng (Linux Trace Toolkit, next generation)</ulink>"
and the
"<ulink url='&YOCTO_DOCS_PROF_URL;#lttng-linux-trace-toolkit-next-generation'>LTTng (Linux Trace Toolkit, next generation)</ulink>"
section, which is in the Yocto Project Profiling and Tracing Manual.
<note>Do not use <filename>Lttng-user space (legacy)</filename> tool.
This tool no longer has any upstream support.</note>
@@ -1326,18 +1325,18 @@
Tracing project.
Do the following:
<orderedlist>
<listitem><para>Select "Open Perspective" from the
<listitem><para>Select "Open Perspective" from the
"Window" menu and then select "Tracing".</para></listitem>
<listitem><para>Click "OK" to change the Eclipse perspective
into the Tracing perspective.</para></listitem>
<listitem><para>Create a new Tracing project by selecting
"Project" from the "File -> New" menu.</para></listitem>
<listitem><para>Choose "Tracing Project" from the
<listitem><para>Choose "Tracing Project" from the
"Tracing" menu.
</para></listitem>
<listitem><para>Generate your tracing data on the remote target.
</para></listitem>
<listitem><para>Select "Lttng2.0 ust trace import" from
<listitem><para>Select "Lttng2.0 ust trace import" from
the "Yocto Project Tools" menu to
start the data import process.</para></listitem>
<listitem><para>Specify your remote connection name.</para></listitem>
@@ -1348,8 +1347,8 @@
<listitem><para>Click "OK" to complete the import process.
The data is now in the local tracing project you created.</para></listitem>
<listitem><para>Right click on the data and then use the menu to
Select "Generic CTF Trace" from the
"Trace Type... -> Common Trace Format" menu to map
Select "Generic CTF Trace" from the
"Trace Type... -> Common Trace Format" menu to map
the tracing type.</para></listitem>
<listitem><para>Right click the mouse and select "Open"
to bring up the Eclipse Lttng Trace Viewer so you
@@ -1386,7 +1385,7 @@
<para>
Within the Eclipse IDE, you can create a Yocto BitBake Commander project,
edit the <link linkend='metadata'>Metadata</link>, and then use
edit the <link linkend='metadata'>Metadata</link>, and then use
<ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink> to build a customized
image all within one IDE.
</para>
@@ -1397,16 +1396,16 @@
<para>
To create a Yocto BitBake Commander project, follow these steps:
<orderedlist>
<listitem><para>Select "Other" from the
"Window -> Open Perspective" menu
<listitem><para>Select "Other" from the
"Window -> Open Perspective" menu
and then choose "Bitbake Commander".</para></listitem>
<listitem><para>Click "OK" to change the perspective to
Bitbake Commander.</para></listitem>
<listitem><para>Select "Project" from the "File -> New"
menu to create a new Yocto
Bitbake Commander project.</para></listitem>
<listitem><para>Choose "New Yocto Project" from the
"Yocto Project Bitbake Commander" menu and click
<listitem><para>Choose "New Yocto Project" from the
"Yocto Project Bitbake Commander" menu and click
"Next".</para></listitem>
<listitem><para>Enter the Project Name and choose the Project Location.
The Yocto project's Metadata files will be put under the directory
@@ -1424,7 +1423,7 @@
<title>Editing the Metadata</title>
<para>
After you create the Yocto Bitbake Commander project, you can modify the
After you create the Yocto Bitbake Commander project, you can modify the
<link linkend='metadata'>Metadata</link> files
by opening them in the project.
When editing recipe files (<filename>.bb</filename> files), you can view BitBake
@@ -1436,8 +1435,8 @@
To edit the Metadata, follow these steps:
<orderedlist>
<listitem><para>Select your Yocto Bitbake Commander project.</para></listitem>
<listitem><para>Select "BitBake Recipe" from the
"File -> New -> Yocto BitBake Commander" menu
<listitem><para>Select "BitBake Recipe" from the
"File -> New -> Yocto BitBake Commander" menu
to open a new recipe wizard.</para></listitem>
<listitem><para>Point to your source by filling in the "SRC_URL" field.
For example, you can add a recipe to your
@@ -1459,13 +1458,13 @@
<title>Building and Customizing the Image Using Hob</title>
<para>
To build and customize the image using Hob from within the
To build and customize the image using Hob from within the
Eclipse IDE, follow these steps:
<orderedlist>
<listitem><para>Select your Yocto Bitbake Commander project.</para></listitem>
<listitem><para>Select "Launch Hob" from the "Project"
menu.</para></listitem>
<listitem><para>Enter the
<listitem><para>Enter the
<link linkend='build-directory'>Build Directory</link>
where you want to put your final images.</para></listitem>
<listitem><para>Click "OK" to launch Hob.</para></listitem>
@@ -1508,7 +1507,7 @@
support development using actual hardware.
For example, the area might contain
<filename>.hddimg</filename> files that combine the
kernel image with the filesystem, boot loaders, and
kernel image with the filesystem, boot loaders, and
so forth.
Be sure to get the files you need for your particular
development process.</para>
@@ -1879,9 +1878,9 @@
<para>
For a better understanding of Hob, see the project page at
<ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'></ulink>
<ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'></ulink>
on the Yocto Project website.
If you follow the "Documentation" link from the Hob page, you will
If you follow the "Documentation" link from the Hob page, you will
find a short introductory training video on Hob.
The following lists some features of Hob:
<itemizedlist>
@@ -1893,9 +1892,9 @@
<listitem><para>You can set the
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
for which you are building the image.</para></listitem>
<listitem><para>You can modify various policy settings such as the
<listitem><para>You can modify various policy settings such as the
package format with which to build,
the parallelism BitBake uses, whether or not to build an
the parallelism BitBake uses, whether or not to build an
external toolchain, and which host to build against.
</para></listitem>
<listitem><para>You can manage

View File

@@ -61,6 +61,21 @@
<date>August 2013</date>
<revremark>Released with the Yocto Project 1.4.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.3</revnumber>
<date>March 2014</date>
<revremark>Released with the Yocto Project 1.4.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.4</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.5</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -46,6 +46,21 @@
<date>August 2013</date>
<revremark>Released with the Yocto Project 1.4.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.3</revnumber>
<date>March 2014</date>
<revremark>Released with the Yocto Project 1.4.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.4</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.5</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
</revision>
</revhistory>
<copyright>
@@ -61,7 +76,7 @@
<note>
Due to production processes, there could be differences between the Yocto Project
documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_KERNEL_URL;'>Yocto Project Linux Kernel Development Manual</ulink> on
<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink> on
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note>

View File

@@ -1,11 +1,11 @@
<!ENTITY DISTRO "1.4.2">
<!ENTITY DISTRO_COMPRESSED "142">
<!ENTITY DISTRO "1.4.5">
<!ENTITY DISTRO_COMPRESSED "145">
<!ENTITY DISTRO_NAME "dylan">
<!ENTITY YOCTO_DOC_VERSION "1.4.2">
<!ENTITY POKYVERSION "9.0.2">
<!ENTITY POKYVERSION_COMPRESSED "902">
<!ENTITY YOCTO_DOC_VERSION "1.4.5">
<!ENTITY POKYVERSION "9.0.5">
<!ENTITY POKYVERSION_COMPRESSED "905">
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
<!ENTITY COPYRIGHT_YEAR "2010-2013">
<!ENTITY COPYRIGHT_YEAR "2010-2014">
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
@@ -16,7 +16,7 @@
<!ENTITY YOCTO_ADTREPO_URL "http://adtrepo.yoctoproject.org">
<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/download/yocto-project-&DISTRO_COMPRESSED;-poky-&POKYVERSION_COMPRESSED;">
<!ENTITY OE_HOME_URL "http://www.openembedded.org">
<!ENTITY OE_LISTS_URL "http://lists.linuxtogo.org/cgi-bin/mailman">
<!ENTITY OE_LISTS_URL "http://lists.openembedded.org/mailman">
<!ENTITY OE_DOCS_URL "http://docs.openembedded.org">
<!ENTITY OH_HOME_URL "http://o-hand.com">
<!ENTITY BITBAKE_HOME_URL "http://developer.berlios.de/projects/bitbake/">
@@ -35,7 +35,7 @@
<!ENTITY YOCTO_RELEASE_DL_URL "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;">
<!ENTITY YOCTO_TOOLCHAIN_DL_URL "&YOCTO_RELEASE_DL_URL;/toolchain/">
<!ENTITY YOCTO_ECLIPSE_DL_URL "&YOCTO_RELEASE_DL_URL;/eclipse-plugin/indigo;">
<!ENTITY YOCTO_ADTINSTALLER_DL_URL "&YOCTO_RELEASE_DL_URL;/adt_installer">
<!ENTITY YOCTO_ADTINSTALLER_DL_URL "&YOCTO_RELEASE_DL_URL;/adt-installer">
<!ENTITY YOCTO_POKY_DL_URL "&YOCTO_RELEASE_DL_URL;/&YOCTO_POKY;.tar.bz2">
<!ENTITY YOCTO_MACHINES_DL_URL "&YOCTO_RELEASE_DL_URL;/machines">
<!ENTITY YOCTO_QEMU_DL_URL "&YOCTO_MACHINES_DL_URL;/qemu">

View File

@@ -4,7 +4,7 @@
<chapter id='profile-manual-intro'>
<title>Yocto Project Tracing and Profiling Manual</title>
<title>Yocto Project Profiling and Tracing Manual</title>
<section id='intro'>
<title>Introduction</title>

View File

@@ -46,6 +46,21 @@
<date>August 2013</date>
<revremark>Released with the Yocto Project 1.4.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.3</revnumber>
<date>March 2014</date>
<revremark>Released with the Yocto Project 1.4.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.4</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.5</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
</revision>
</revhistory>
<copyright>
@@ -64,7 +79,7 @@
<note>
Due to production processes, there could be differences between the Yocto Project
documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Tracing and Profiling Manual</ulink> on
<ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink> on
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note>

View File

@@ -77,6 +77,21 @@
<date>August 2013</date>
<revremark>Released with the Yocto Project 1.4.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.3</revnumber>
<date>March 2014</date>
<revremark>Released with the Yocto Project 1.4.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.4</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
</revision>
<revision>
<revnumber>1.4.5</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -1,14 +1,14 @@
# Processes ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.2\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
# Processes all other manuals (<word>-<word> style)
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.2\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
# Process cases where just an external manual is referenced without an id anchor
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.2\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.2\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.2\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.2\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.2\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profile and Tracing Manual<\/a>/Yocto Project Profile and Tracing Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.2\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.2\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g

View File

@@ -1,6 +1,6 @@
DISTRO = "poky"
DISTRO_NAME = "Poky 9.0.2 (Yocto Project 1.4 Reference Distro)"
DISTRO_VERSION = "1.4.2"
DISTRO_NAME = "Poky 9.0.4 (Yocto Project 1.4.4 Reference Distro)"
DISTRO_VERSION = "1.4.4"
DISTRO_CODENAME = "dylan"
SDK_VENDOR = "-pokysdk"
SDK_VERSION := "${@'${DISTRO_VERSION}'}"
@@ -77,6 +77,8 @@ SANITY_TESTED_DISTROS ?= " \
Poky-1.4 \n \
Poky-1.4.1 \n \
Poky-1.4.2 \n \
Poky-1.4.3 \n \
Poky-1.4.4 \n \
Ubuntu-10.04 \n \
Ubuntu-11.10 \n \
Ubuntu-12.04 \n \

View File

@@ -35,7 +35,7 @@ cmake_do_generate_toolchain_file() {
cat > ${WORKDIR}/toolchain.cmake <<EOF
# CMake system name must be something like "Linux".
# This is important for cross-compiling.
set( CMAKE_SYSTEM_NAME `echo ${SDK_OS} | sed 's/^./\u&/'` )
set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` )
set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} )
set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )

View File

@@ -40,6 +40,7 @@ mklibs_optimize_image_doit() {
--ldlib ${dynamic_loader} \
--libdir ${baselib} \
--sysroot ${PKG_CONFIG_SYSROOT_DIR} \
--gcc-options "--sysroot=${PKG_CONFIG_SYSROOT_DIR}" \
--root ${IMAGE_ROOTFS} \
--target `echo ${TARGET_PREFIX} | sed 's/-$//' ` \
-d ${WORKDIR}/mklibs/dest \

View File

@@ -237,14 +237,6 @@ do_savedefconfig() {
do_savedefconfig[nostamp] = "1"
addtask savedefconfig after do_configure
pkg_postinst_kernel-base () {
update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
}
pkg_postrm_kernel-base () {
update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
}
inherit cml1
EXPORT_FUNCTIONS do_compile do_install do_configure
@@ -272,14 +264,19 @@ ALLOW_EMPTY_kernel-modules = "1"
DESCRIPTION_kernel-modules = "Kernel modules meta package"
pkg_postinst_kernel-image () {
if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
mkdir -p $D/lib/modules/${KERNEL_VERSION}
fi
if [ -n "$D" ]; then
depmodwrapper -a -b $D ${KERNEL_VERSION}
else
depmod -a ${KERNEL_VERSION}
fi
update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
mkdir -p $D/lib/modules/${KERNEL_VERSION}
fi
if [ -n "$D" ]; then
depmodwrapper -a -b $D ${KERNEL_VERSION}
else
depmod -a ${KERNEL_VERSION}
fi
}
pkg_postrm_kernel-image () {
update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
}
PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
@@ -375,7 +372,7 @@ kernel_do_deploy() {
if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
mkdir -p ${D}/lib
tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
ln -sf ${MODULE_TARBALL_BASE_NAME}.bin ${MODULE_TARBALL_SYMLINK_NAME}
ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
fi
cd ${DEPLOYDIR}

View File

@@ -96,14 +96,14 @@ do_prep_locale_tree() {
treedir=${WORKDIR}/locale-tree
rm -rf $treedir
mkdir -p $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${localedir}
tar -cf - -C ${LOCALETREESRC}${datadir} -ps i18n | tar -xf - -C $treedir/${datadir}
tar -cf - -C ${LOCALETREESRC}${datadir} -p i18n | tar -xf - -C $treedir/${datadir}
# unzip to avoid parsing errors
for i in $treedir/${datadir}/i18n/charmaps/*gz; do
gunzip $i
done
tar -cf - -C ${LOCALETREESRC}${base_libdir} -ps . | tar -xf - -C $treedir/${base_libdir}
tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir}
if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.* ]; then
tar -cf - -C ${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir} -ps libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
tar -cf - -C ${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir} -p libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
fi
install -m 0755 ${LOCALETREESRC}${bindir}/localedef $treedir/${base_bindir}
}
@@ -113,7 +113,7 @@ do_collect_bins_from_locale_tree() {
parent=$(dirname ${localedir})
mkdir -p ${PKGD}/$parent
tar -cf - -C $treedir/$parent -ps $(basename ${localedir}) | tar -xf - -C ${PKGD}$parent
tar -cf - -C $treedir/$parent -p $(basename ${localedir}) | tar -xf - -C ${PKGD}$parent
}
inherit qemu

View File

@@ -51,11 +51,10 @@ license_create_manifest() {
printf "LICENSE:" >> ${LICENSE_MANIFEST}
for lic in ${pkged_lic}; do
# to reference a license file trim trailing + symbol
if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
printf " ${lic}" >> ${LICENSE_MANIFEST}
else
echo "WARNING: The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
fi
printf " ${lic}" >> ${LICENSE_MANIFEST}
done
printf "\n\n" >> ${LICENSE_MANIFEST}
done
@@ -74,9 +73,9 @@ license_create_manifest() {
# Really don't need to copy the generics as they're
# represented in the manifest and in the actual pkg licenses
# Doing so would make your image quite a bit larger
if [[ "${lic}" != "generic_"* ]]; then
if [ "${lic#generic_}" = "${lic}" ]; then
cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
elif [[ "${lic}" == "generic_"* ]]; then
else
if [ ! -f ${IMAGE_ROOTFS}/usr/share/common-licenses/${lic} ]; then
cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/
fi

View File

@@ -52,10 +52,13 @@ def base_get_metadata_monotone_revision(path, d):
return monotone_revision
def base_get_metadata_svn_revision(path, d):
# This only works with older subversion. For newer versions
# this function will need to be fixed by someone interested
revision = "<unknown>"
try:
revision = file( "%s/.svn/entries" % path ).readlines()[3].strip()
except IOError:
with open("%s/.svn/entries" % path) as f:
revision = f.readlines()[3].strip()
except IOError, IndexError:
pass
return revision

View File

@@ -451,7 +451,7 @@ python perform_packagecopy () {
# Start by package population by taking a copy of the installed
# files to operate on
# Preserve sparse files and hard links
cmd = 'tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar)
cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (dest, dvar)
retval = subprocess.call(cmd, shell=True)
if retval:
bb.fatal("file copy failed with exit code %s (cmd was %s)" % (retval, cmd))
@@ -925,7 +925,7 @@ python populate_packages () {
for pkg in packages.split():
if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
bb.warn("%s has an incompatible license. Excluding from packaging." % pkg)
elif pkg in package_list:
if pkg in package_list:
bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg)
else:
package_list.append(pkg)
@@ -965,6 +965,9 @@ python populate_packages () {
continue
seen.append(file)
if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
continue
def mkdir(src, dest, p):
src = os.path.join(src, p)
dest = os.path.join(dest, p)

View File

@@ -35,6 +35,11 @@ package_update_index_rpm () {
done
done
# FIXME stopgap for broken "bitbake package-index" since MULTILIB_PREFIX_LIST isn't set for that
if [ "$target_archs" = "" ] ; then
target_archs="${ALL_MULTILIB_PACKAGE_ARCHS}"
fi
target_archs=`echo "$target_archs" | tr - _`
archs=`for arch in $target_archs $sdk_archs ; do

View File

@@ -13,7 +13,7 @@ populate_sdk_post_deb () {
local target_rootfs=$1
mkdir -p ${target_rootfs}/etc
tar -cf - -C ${STAGING_ETCDIR_NATIVE} -ps apt | tar -xf - -C ${target_rootfs}/etc
tar -cf - -C ${STAGING_ETCDIR_NATIVE} -p apt | tar -xf - -C ${target_rootfs}/etc
}
populate_sdk_deb () {

View File

@@ -431,13 +431,14 @@ def sstate_package(ss, d):
if not link.startswith(tmpdir):
return
depth = link.rpartition(tmpdir)[2].count('/')
depth = outputpath.rpartition(tmpdir)[2].count('/')
base = link.partition(tmpdir)[2].strip()
while depth > 1:
base = "../" + base
base = "/.." + base
depth -= 1
base = "." + base
bb.debug(2, "Replacing absolute path %s with relative path %s" % (link, base))
bb.debug(2, "Replacing absolute path %s with relative path %s for %s" % (link, base, outputpath))
os.remove(path)
os.symlink(base, path)
@@ -455,11 +456,11 @@ def sstate_package(ss, d):
for walkroot, dirs, files in os.walk(state[1]):
for file in files:
srcpath = os.path.join(walkroot, file)
dstpath = srcpath.replace(state[1], sstatebuild + state[0])
dstpath = srcpath.replace(state[1], state[2])
make_relative_symlink(srcpath, dstpath, d)
for dir in dirs:
srcpath = os.path.join(walkroot, dir)
dstpath = srcpath.replace(state[1], sstatebuild + state[0])
dstpath = srcpath.replace(state[1], state[2])
make_relative_symlink(srcpath, dstpath, d)
bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0]))
oe.path.copyhardlinktree(state[1], sstatebuild + state[0])
@@ -639,19 +640,12 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
return x.endswith("-native")
def isNativeCross(x):
return x.endswith("-native") or x.endswith("-cross") or x.endswith("-cross-initial")
def isSafeDep(x):
if x in ["quilt-native", "autoconf-native", "automake-native", "gnu-config-native", "libtool-native", "pkgconfig-native", "gcc-cross", "binutils-cross", "gcc-cross-initial"]:
return True
return False
def isPostInstDep(x):
if x in ["qemu-native", "gdk-pixbuf-native", "qemuwrapper-cross", "depmodwrapper-cross", "systemd-systemctl-native", "gtk-update-icon-cache-native"]:
return True
return False
# We can skip these "safe" dependencies since the aren't runtime dependencies, just build time
if isSafeDep(taskdependees[task][0]) and taskdependees[task][1] == "do_populate_sysroot":
return True
# We only need to trigger populate_lic through direct dependencies
if taskdependees[task][1] == "do_populate_lic":
return True

View File

@@ -13,7 +13,7 @@ sysroot_stage_dir() {
# However we always want to stage a $src itself, even if it's empty
mkdir -p "$dest"
if [ -d "$src" ]; then
tar -cf - -C "$src" -ps . | tar -xf - -C "$dest"
tar -cf - -C "$src" -p . | tar -xf - -C "$dest"
fi
}

View File

@@ -81,7 +81,7 @@ def copytree(src, dst):
# This way we also preserve hardlinks between files in the tree.
bb.utils.mkdirhier(dst)
cmd = 'tar -cf - -C %s -ps . | tar -xf - -C %s' % (src, dst)
cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (src, dst)
check_output(cmd, shell=True, stderr=subprocess.STDOUT)
def copyhardlinktree(src, dst):
@@ -93,7 +93,7 @@ def copyhardlinktree(src, dst):
if (os.stat(src).st_dev == os.stat(dst).st_dev):
# Need to copy directories only with tar first since cp will error if two
# writers try and create a directory at the same time
cmd = 'cd %s; find . -type d -print | tar -cf - -C %s -ps --files-from - | tar -xf - -C %s' % (src, src, dst)
cmd = 'cd %s; find . -type d -print | tar -cf - -C %s -p --files-from - | tar -xf - -C %s' % (src, src, dst)
check_output(cmd, shell=True, stderr=subprocess.STDOUT)
if os.path.isdir(src):
src = src + "/*"

View File

@@ -0,0 +1,81 @@
From 34628967f1e65dc8f34e000f0f5518e21afbfc7b Mon Sep 17 00:00:00 2001
From: "Dr. Stephen Henson" <steve@openssl.org>
Date: Fri, 20 Dec 2013 15:26:50 +0000
Subject: [PATCH] Fix DTLS retransmission from previous session.
Upstream-Status: Backport
commit 34628967f1e65dc8f34e000f0f5518e21afbfc7b upstream
For DTLS we might need to retransmit messages from the previous session
so keep a copy of write context in DTLS retransmission buffers instead
of replacing it after sending CCS. CVE-2013-6450.
---
ssl/d1_both.c | 6 ++++++
ssl/ssl_locl.h | 2 ++
ssl/t1_enc.c | 17 +++++++++++------
4 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 65ec001..7a5596a 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -214,6 +214,12 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
static void
dtls1_hm_fragment_free(hm_fragment *frag)
{
+
+ if (frag->msg_header.is_ccs)
+ {
+ EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
+ EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash);
+ }
if (frag->fragment) OPENSSL_free(frag->fragment);
if (frag->reassembly) OPENSSL_free(frag->reassembly);
OPENSSL_free(frag);
diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h
index 96ce9a7..e485907 100644
--- a/ssl/ssl_locl.h
+++ b/ssl/ssl_locl.h
@@ -621,6 +621,8 @@ extern SSL3_ENC_METHOD TLSv1_enc_data;
extern SSL3_ENC_METHOD SSLv3_enc_data;
extern SSL3_ENC_METHOD DTLSv1_enc_data;
+#define SSL_IS_DTLS(s) (s->method->version == DTLS1_VERSION)
+
#define IMPLEMENT_tls_meth_func(version, func_name, s_accept, s_connect, \
s_get_meth) \
const SSL_METHOD *func_name(void) \
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index 72015f5..56db834 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -414,15 +414,20 @@ int tls1_change_cipher_state(SSL *s, int which)
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
else
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
- if (s->enc_write_ctx != NULL)
+ if (s->enc_write_ctx != NULL && !SSL_IS_DTLS(s))
reuse_dd = 1;
- else if ((s->enc_write_ctx=OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)
+ else if ((s->enc_write_ctx=EVP_CIPHER_CTX_new()) == NULL)
goto err;
- else
- /* make sure it's intialized in case we exit later with an error */
- EVP_CIPHER_CTX_init(s->enc_write_ctx);
dd= s->enc_write_ctx;
- mac_ctx = ssl_replace_hash(&s->write_hash,NULL);
+ if (SSL_IS_DTLS(s))
+ {
+ mac_ctx = EVP_MD_CTX_create();
+ if (!mac_ctx)
+ goto err;
+ s->write_hash = mac_ctx;
+ }
+ else
+ mac_ctx = ssl_replace_hash(&s->write_hash,NULL);
#ifndef OPENSSL_NO_COMP
if (s->compress != NULL)
{
--
1.7.5.4

View File

@@ -0,0 +1,31 @@
From 197e0ea817ad64820789d86711d55ff50d71f631 Mon Sep 17 00:00:00 2001
From: "Dr. Stephen Henson" <steve@openssl.org>
Date: Mon, 6 Jan 2014 14:35:04 +0000
Subject: [PATCH] Fix for TLS record tampering bug CVE-2013-4353
Upstream-Status: Backport
commit 197e0ea817ad64820789d86711d55ff50d71f631 upstream
ssl/s3_both.c | 6 +++++-
3 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/ssl/s3_both.c b/ssl/s3_both.c
index 1e5dcab..53b9390 100644
--- a/ssl/s3_both.c
+++ b/ssl/s3_both.c
@@ -210,7 +210,11 @@ static void ssl3_take_mac(SSL *s)
{
const char *sender;
int slen;
-
+ /* If no new cipher setup return immediately: other functions will
+ * set the appropriate error.
+ */
+ if (s->s3->tmp.new_cipher == NULL)
+ return;
if (s->state & SSL_ST_CONNECT)
{
sender=s->method->ssl3_enc->server_finished_label;
--
1.7.5.4

View File

@@ -0,0 +1,33 @@
From ca989269a2876bae79393bd54c3e72d49975fc75 Mon Sep 17 00:00:00 2001
From: "Dr. Stephen Henson" <steve@openssl.org>
Date: Thu, 19 Dec 2013 14:37:39 +0000
Subject: [PATCH] Use version in SSL_METHOD not SSL structure.
Upstream-Status: Backport
commit ca989269a2876bae79393bd54c3e72d49975fc75 upstream
When deciding whether to use TLS 1.2 PRF and record hash algorithms
use the version number in the corresponding SSL_METHOD structure
instead of the SSL structure. The SSL structure version is sometimes
inaccurate. Note: OpenSSL 1.0.2 and later effectively do this already.
(CVE-2013-6449)
---
ssl/s3_lib.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index bf832bb..c4ef273 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -4286,7 +4286,7 @@ need to go to SSL_ST_ACCEPT.
long ssl_get_algorithm2(SSL *s)
{
long alg2 = s->s3->tmp.new_cipher->algorithm2;
- if (TLS1_get_version(s) >= TLS1_2_VERSION &&
+ if (s->method->version == TLS1_2_VERSION &&
alg2 == (SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF))
return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256;
return alg2;
--
1.7.5.4

View File

@@ -0,0 +1,118 @@
From 96db9023b881d7cd9f379b0c154650d6c108e9a3 Mon Sep 17 00:00:00 2001
From: "Dr. Stephen Henson" <steve@openssl.org>
Date: Sun, 6 Apr 2014 00:51:06 +0100
Subject: [PATCH] Add heartbeat extension bounds check.
A missing bounds check in the handling of the TLS heartbeat extension
can be used to reveal up to 64k of memory to a connected client or
server.
Thanks for Neel Mehta of Google Security for discovering this bug and to
Adam Langley <agl@chromium.org> and Bodo Moeller <bmoeller@acm.org> for
preparing the fix (CVE-2014-0160)
Patch (tweaked version of upstream fix without CHANGES change) borrowed
from Debian.
Upstream-Status: Backport
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
ssl/d1_both.c | 26 ++++++++++++++++++--------
ssl/t1_lib.c | 14 +++++++++-----
3 files changed, 36 insertions(+), 13 deletions(-)
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 7a5596a..2e8cf68 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -1459,26 +1459,36 @@ dtls1_process_heartbeat(SSL *s)
unsigned int payload;
unsigned int padding = 16; /* Use minimum padding */
- /* Read type and payload length first */
- hbtype = *p++;
- n2s(p, payload);
- pl = p;
-
if (s->msg_callback)
s->msg_callback(0, s->version, TLS1_RT_HEARTBEAT,
&s->s3->rrec.data[0], s->s3->rrec.length,
s, s->msg_callback_arg);
+ /* Read type and payload length first */
+ if (1 + 2 + 16 > s->s3->rrec.length)
+ return 0; /* silently discard */
+ hbtype = *p++;
+ n2s(p, payload);
+ if (1 + 2 + payload + 16 > s->s3->rrec.length)
+ return 0; /* silently discard per RFC 6520 sec. 4 */
+ pl = p;
+
if (hbtype == TLS1_HB_REQUEST)
{
unsigned char *buffer, *bp;
+ unsigned int write_length = 1 /* heartbeat type */ +
+ 2 /* heartbeat length */ +
+ payload + padding;
int r;
+ if (write_length > SSL3_RT_MAX_PLAIN_LENGTH)
+ return 0;
+
/* Allocate memory for the response, size is 1 byte
* message type, plus 2 bytes payload length, plus
* payload, plus padding
*/
- buffer = OPENSSL_malloc(1 + 2 + payload + padding);
+ buffer = OPENSSL_malloc(write_length);
bp = buffer;
/* Enter response type, length and copy payload */
@@ -1489,11 +1499,11 @@ dtls1_process_heartbeat(SSL *s)
/* Random padding */
RAND_pseudo_bytes(bp, padding);
- r = dtls1_write_bytes(s, TLS1_RT_HEARTBEAT, buffer, 3 + payload + padding);
+ r = dtls1_write_bytes(s, TLS1_RT_HEARTBEAT, buffer, write_length);
if (r >= 0 && s->msg_callback)
s->msg_callback(1, s->version, TLS1_RT_HEARTBEAT,
- buffer, 3 + payload + padding,
+ buffer, write_length,
s, s->msg_callback_arg);
OPENSSL_free(buffer);
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index b82fada..bddffd9 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -2588,16 +2588,20 @@ tls1_process_heartbeat(SSL *s)
unsigned int payload;
unsigned int padding = 16; /* Use minimum padding */
- /* Read type and payload length first */
- hbtype = *p++;
- n2s(p, payload);
- pl = p;
-
if (s->msg_callback)
s->msg_callback(0, s->version, TLS1_RT_HEARTBEAT,
&s->s3->rrec.data[0], s->s3->rrec.length,
s, s->msg_callback_arg);
+ /* Read type and payload length first */
+ if (1 + 2 + 16 > s->s3->rrec.length)
+ return 0; /* silently discard */
+ hbtype = *p++;
+ n2s(p, payload);
+ if (1 + 2 + payload + 16 > s->s3->rrec.length)
+ return 0; /* silently discard per RFC 6520 sec. 4 */
+ pl = p;
+
if (hbtype == TLS1_HB_REQUEST)
{
unsigned char *buffer, *bp;
--
1.9.1

View File

@@ -0,0 +1,40 @@
commit 208d54db20d58c9a5e45e856a0650caadd7d9612
Author: Dr. Stephen Henson <steve@openssl.org>
Date: Tue May 13 18:48:31 2014 +0100
Fix for CVE-2014-0195
A buffer overrun attack can be triggered by sending invalid DTLS fragments
to an OpenSSL DTLS client or server. This is potentially exploitable to
run arbitrary code on a vulnerable client or server.
Fixed by adding consistency check for DTLS fragments.
Thanks to Jüri Aedla for reporting this issue.
Patch borrowed from Fedora
Upstream-Status: Backport
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 2e8cf68..07f67f8 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -627,7 +627,16 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
frag->msg_header.frag_off = 0;
}
else
+ {
frag = (hm_fragment*) item->data;
+ if (frag->msg_header.msg_len != msg_hdr->msg_len)
+ {
+ item = NULL;
+ frag = NULL;
+ goto err;
+ }
+ }
+
/* If message is already reassembled, this must be a
* retransmit and can be dropped.

View File

@@ -0,0 +1,38 @@
From: Matt Caswell <matt@openssl.org>
Date: Sun, 11 May 2014 23:38:37 +0000 (+0100)
Subject: Fixed NULL pointer dereference. See PR#3321
X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=b107586
Fixed NULL pointer dereference. See PR#3321
Patch borrowed from Fedora
Upstream-Status: Backport
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 40eb0dd..d961d12 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -657,9 +657,6 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
SSL3_BUFFER *wb=&(s->s3->wbuf);
SSL_SESSION *sess;
- if (wb->buf == NULL)
- if (!ssl3_setup_write_buffer(s))
- return -1;
/* first check if there is a SSL3_BUFFER still being written
* out. This will happen with non blocking IO */
@@ -675,6 +672,10 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
/* if it went, fall through and send more stuff */
}
+ if (wb->buf == NULL)
+ if (!ssl3_setup_write_buffer(s))
+ return -1;
+
if (len == 0 && !create_empty_fragment)
return 0;

View File

@@ -0,0 +1,38 @@
commit d30e582446b027868cdabd0994681643682045a4
Author: Dr. Stephen Henson <steve@openssl.org>
Date: Fri May 16 13:00:45 2014 +0100
Fix CVE-2014-0221
Unnecessary recursion when receiving a DTLS hello request can be used to
crash a DTLS client. Fixed by handling DTLS hello request without recursion.
Thanks to Imre Rad (Search-Lab Ltd.) for discovering this issue.
Patch borrowed from Fedora
Upstream-Status: Backport
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 07f67f8..4c2fd03 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -793,6 +793,7 @@ dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok)
int i,al;
struct hm_header_st msg_hdr;
+ redo:
/* see if we have the required fragment already */
if ((frag_len = dtls1_retrieve_buffered_fragment(s,max,ok)) || *ok)
{
@@ -851,8 +852,7 @@ dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok)
s->msg_callback_arg);
s->init_num = 0;
- return dtls1_get_message_fragment(s, st1, stn,
- max, ok);
+ goto redo;
}
else /* Incorrectly formated Hello request */
{

View File

@@ -0,0 +1,103 @@
Fix for CVE-2014-0224
Only accept change cipher spec when it is expected instead of at any
time. This prevents premature setting of session keys before the master
secret is determined which an attacker could use as a MITM attack.
Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue
and providing the initial fix this patch is based on.
Patch borrowed from Fedora
Upstream-Status: Backport
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
diff -up openssl-1.0.1e/ssl/ssl3.h.keying-mitm openssl-1.0.1e/ssl/ssl3.h
--- openssl-1.0.1e/ssl/ssl3.h.keying-mitm 2014-06-02 19:48:04.518100562 +0200
+++ openssl-1.0.1e/ssl/ssl3.h 2014-06-02 19:48:04.642103429 +0200
@@ -388,6 +388,7 @@ typedef struct ssl3_buffer_st
#define TLS1_FLAGS_TLS_PADDING_BUG 0x0008
#define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010
#define TLS1_FLAGS_KEEP_HANDSHAKE 0x0020
+#define SSL3_FLAGS_CCS_OK 0x0080
/* SSL3_FLAGS_SGC_RESTART_DONE is set when we
* restart a handshake because of MS SGC and so prevents us
diff -up openssl-1.0.1e/ssl/s3_clnt.c.keying-mitm openssl-1.0.1e/ssl/s3_clnt.c
--- openssl-1.0.1e/ssl/s3_clnt.c.keying-mitm 2013-02-11 16:26:04.000000000 +0100
+++ openssl-1.0.1e/ssl/s3_clnt.c 2014-06-02 19:49:57.042701985 +0200
@@ -559,6 +559,7 @@ int ssl3_connect(SSL *s)
case SSL3_ST_CR_FINISHED_A:
case SSL3_ST_CR_FINISHED_B:
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
ret=ssl3_get_finished(s,SSL3_ST_CR_FINISHED_A,
SSL3_ST_CR_FINISHED_B);
if (ret <= 0) goto end;
@@ -916,6 +917,7 @@ int ssl3_get_server_hello(SSL *s)
SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT);
goto f_err;
}
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
s->hit=1;
}
else /* a miss or crap from the other end */
diff -up openssl-1.0.1e/ssl/s3_pkt.c.keying-mitm openssl-1.0.1e/ssl/s3_pkt.c
--- openssl-1.0.1e/ssl/s3_pkt.c.keying-mitm 2014-06-02 19:48:04.640103383 +0200
+++ openssl-1.0.1e/ssl/s3_pkt.c 2014-06-02 19:48:04.643103452 +0200
@@ -1298,6 +1298,15 @@ start:
goto f_err;
}
+ if (!(s->s3->flags & SSL3_FLAGS_CCS_OK))
+ {
+ al=SSL_AD_UNEXPECTED_MESSAGE;
+ SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_CCS_RECEIVED_EARLY);
+ goto f_err;
+ }
+
+ s->s3->flags &= ~SSL3_FLAGS_CCS_OK;
+
rr->length=0;
if (s->msg_callback)
@@ -1432,7 +1441,7 @@ int ssl3_do_change_cipher_spec(SSL *s)
if (s->s3->tmp.key_block == NULL)
{
- if (s->session == NULL)
+ if (s->session == NULL || s->session->master_key_length == 0)
{
/* might happen if dtls1_read_bytes() calls this */
SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC,SSL_R_CCS_RECEIVED_EARLY);
diff -up openssl-1.0.1e/ssl/s3_srvr.c.keying-mitm openssl-1.0.1e/ssl/s3_srvr.c
--- openssl-1.0.1e/ssl/s3_srvr.c.keying-mitm 2014-06-02 19:48:04.630103151 +0200
+++ openssl-1.0.1e/ssl/s3_srvr.c 2014-06-02 19:48:04.643103452 +0200
@@ -673,6 +673,7 @@ int ssl3_accept(SSL *s)
case SSL3_ST_SR_CERT_VRFY_A:
case SSL3_ST_SR_CERT_VRFY_B:
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
/* we should decide if we expected this one */
ret=ssl3_get_cert_verify(s);
if (ret <= 0) goto end;
@@ -700,6 +701,7 @@ int ssl3_accept(SSL *s)
case SSL3_ST_SR_FINISHED_A:
case SSL3_ST_SR_FINISHED_B:
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
ret=ssl3_get_finished(s,SSL3_ST_SR_FINISHED_A,
SSL3_ST_SR_FINISHED_B);
if (ret <= 0) goto end;
@@ -770,7 +772,10 @@ int ssl3_accept(SSL *s)
s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A;
#else
if (s->s3->next_proto_neg_seen)
+ {
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
s->s3->tmp.next_state=SSL3_ST_SR_NEXT_PROTO_A;
+ }
else
s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A;
#endif

View File

@@ -0,0 +1,31 @@
commit 4ad43d511f6cf064c66eb4bfd0fb0919b5dd8a86
Author: Dr. Stephen Henson <steve@openssl.org>
Date: Thu May 29 15:00:05 2014 +0100
Fix CVE-2014-3470
Check session_cert is not NULL before dereferencing it.
Patch borrowed from Fedora
Upstream-Status: Backport
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index d35376d..4324f8d 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -2511,6 +2511,13 @@ int ssl3_send_client_key_exchange(SSL *s)
int ecdh_clnt_cert = 0;
int field_size = 0;
+ if (s->session->sess_cert == NULL)
+ {
+ ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE);
+ SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE);
+ goto err;
+ }
+
/* Did we send out the client's
* ECDH share for use in premaster
* computation as part of client certificate?

View File

@@ -0,0 +1,24 @@
openssl fix for CVE-2010-5298
Upstream-Status: Backport
Race condition in the ssl3_read_bytes function in s3_pkt.c in OpenSSL
through 1.0.1g, when SSL_MODE_RELEASE_BUFFERS is enabled, allows remote
attackers to inject data across sessions or cause a denial of service
(use-after-free and parsing error) via an SSL connection in a
multithreaded environment.
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5298
Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -1013,7 +1013,7 @@ start:
{
s->rstate=SSL_ST_READ_HEADER;
rr->off=0;
- if (s->mode & SSL_MODE_RELEASE_BUFFERS)
+ if (s->mode & SSL_MODE_RELEASE_BUFFERS && s->s3->rbuf.left == 0)
ssl3_release_read_buffer(s);
}
}

View File

@@ -6,7 +6,7 @@ DEPENDS += "ocf-linux"
CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
PR = "${INC_PR}.0"
PR = "${INC_PR}.2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
@@ -32,6 +32,16 @@ SRC_URI += "file://configure-targets.patch \
file://openssl-fix-doc.patch \
file://fix-cipher-des-ede3-cfb1.patch \
file://find.pl \
file://0001-Fix-for-TLS-record-tampering-bug-CVE-2013-4353.patch \
file://0001-Fix-DTLS-retransmission-from-previous-session.patch \
file://0001-Use-version-in-SSL_METHOD-not-SSL-structure.patch \
file://CVE-2014-0160.patch \
file://openssl-1.0.1e-cve-2014-0195.patch \
file://openssl-1.0.1e-cve-2014-0198.patch \
file://openssl-1.0.1e-cve-2014-0221.patch \
file://openssl-1.0.1e-cve-2014-0224.patch \
file://openssl-1.0.1e-cve-2014-3470.patch \
file://openssl-CVE-2010-5298.patch \
"
SRC_URI[md5sum] = "66bf6f10f060d561929de96f9dfe5b8c"

View File

@@ -457,8 +457,8 @@ CONFIG_USE_BB_CRYPT=y
# CONFIG_ADDUSER is not set
# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
# CONFIG_FEATURE_CHECK_NAMES is not set
CONFIG_FIRST_SYSTEM_ID=0
CONFIG_LAST_SYSTEM_ID=0
CONFIG_FIRST_SYSTEM_ID=100
CONFIG_LAST_SYSTEM_ID=999
# CONFIG_ADDGROUP is not set
# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set

View File

@@ -41,6 +41,7 @@ BINCOMMANDS = "dbclient ssh scp"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
EXTRA_OECONF += "\
${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
CFLAGS += "-DSFTPSERVER_PATH=\\"${libdir}/openssh/sftp-server\\""
do_install() {
install -d ${D}${sysconfdir} \

View File

@@ -0,0 +1,31 @@
Accept make versions 4.0 and greater
Backport of glibc 28d708c44bc47b56f6551ff285f78edcf61c208a.
Upstream-Status: Backport
Signed-off-by: Jonathan Liu <net147@gmail.com>
diff -Nur libc.orig/configure libc/configure
--- libc.orig/configure 2012-12-03 08:11:45.000000000 +1100
+++ libc/configure 2013-11-04 17:15:31.344984184 +1100
@@ -4995,7 +4995,7 @@
ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.79* | 3.[89]*)
+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*)
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
diff -Nur libc.orig/configure.in libc/configure.in
--- libc.orig/configure.in 2012-12-03 08:11:45.000000000 +1100
+++ libc/configure.in 2013-11-04 17:15:31.351650849 +1100
@@ -958,7 +958,7 @@
critic_missing="$critic_missing gcc")
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
- [3.79* | 3.[89]*], critic_missing="$critic_missing make")
+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make")
AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version,
[GNU gettext.* \([0-9]*\.[0-9.]*\)],

View File

@@ -28,6 +28,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr22
file://tzselect-awk.patch \
file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
file://fix-tibetian-locales.patch \
file://make-4.patch \
${BACKPORTS} \
"
BACKPORTS = "\

View File

@@ -19,7 +19,7 @@ IMAGE_FSTYPES = "vmdk"
inherit core-image
SRCREV ?= "beda5013e46da16a3d76f095869a5a5c5b1bc08a"
SRCREV ?= "5b12a3441b859b3b12bb1e7b61acf97a1cfa8c08"
SRC_URI = "git://git.yoctoproject.org/poky;protocol=git \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \

View File

@@ -58,6 +58,7 @@ echo "Installing image on /dev/${device}"
#
# The udev automounter can cause pain here, kill it
#
rm -f /etc/udev/rules.d/automount.rules
rm -f /etc/udev/scripts/mount*
#

View File

@@ -1,34 +0,0 @@
libxml2 CVE-2012-2871
the patch come from:
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/libxml/src \
/include/libxml/tree.h?r1=56276&r2=149930
libxml2 2.9.0-rc1 and earlier, as used in Google Chrome before 21.0.1180.89,
does not properly support a cast of an unspecified variable during handling
of XSL transforms, which allows remote attackers to cause a denial of service
or possibly have unknown other impact via a crafted document, related to the
_xmlNs data structure in include/libxml/tree.h.
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2871
Signed-off-by: Li Wang <li.wang@windriver.com>
---
include/libxml/tree.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index b733589..5422dda 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -351,6 +351,7 @@ struct _xmlNs {
struct _xmlNs *next; /* next Ns link for this node */
xmlNsType type; /* global or local */
const xmlChar *href; /* URL for the namespace */
+ const char *dummy_children; /* lines up with node->children */
const xmlChar *prefix; /* prefix for the namespace */
void *_private; /* application data */
struct _xmlDoc *context; /* normally an xmlDoc */
--
1.7.0.5

View File

@@ -5,5 +5,3 @@ PR = "${INC_PR}.1"
SRC_URI[md5sum] = "5b9bebf4f5d2200ae2c4efe8fa6103f7"
SRC_URI[sha256sum] = "ad25d91958b7212abdc12b9611cfb4dc4e5cddb6d1e9891532f48aacee422b82"
SRC_URI += "file://libxml2-CVE-2012-2871.patch \
"

View File

@@ -42,6 +42,8 @@ EXCONFIG_ARGS_virtclass-nativesdk = " \
--with-chtype='long' \
--with-mmask-t='long'"
PACKAGES_DYNAMIC = "^${PN}-lib.*"
# Fall back to the host termcap / terminfo for -nativesdk and -native
# The reality is a work around for strange problems with things like
# "bitbake -c menuconfig busybox" where it cannot find the terminfo

View File

@@ -130,6 +130,7 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
minicom \
mtools \
ncurses \
ncurses-terminfo-base \
neon \
nfs-utils \
nfs-utils-client \
@@ -150,17 +151,21 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
python-core \
python-curses \
python-datetime \
python-difflib \
python-distutils \
python-elementtree \
python-email \
python-fcntl \
python-json \
python-logging \
python-misc \
python-mmap \
python-multiprocessing \
python-netclient \
python-netserver \
python-pickle \
python-pkgutil \
python-pprint \
python-re \
python-rpm \
python-shell \

View File

@@ -21,14 +21,12 @@ do_install() {
echo "S:2345:respawn:${base_sbindir}/getty ${SERIAL_CONSOLE}" >> ${D}${sysconfdir}/inittab
fi
idx=0
tmp="${SERIAL_CONSOLES}"
for i in $tmp
do
j=`echo ${i} | sed s/\;/\ /g`
echo "${idx}:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
idx=`expr $idx + 1`
label=`echo ${i} | sed -e 's/^.*;tty//'`
echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
done
if [ "${USE_VT}" = "1" ]; then

View File

@@ -29,6 +29,9 @@ SRC_URI = "\
file://mips64-default-ld-emulation.patch \
${BACKPORT} \
file://binutils-fix-over-array-bounds-issue.patch \
file://replace_macros_with_static_inline.patch \
file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch \
file://0001-write.c-chain_frchains_together_1-Reorder-assertion-.patch \
"
BACKPORT = "\

View File

@@ -0,0 +1,31 @@
Upstream-Status: Backport
From 0a09fb4a09e80c36fa3ef763ae276fd13d272a36 Mon Sep 17 00:00:00 2001
From: Hans-Peter Nilsson <hp@bitrange.com>
Date: Sat, 1 Feb 2014 01:11:28 +0100
Subject: [PATCH] Fix MMIX build breakage from bfd_set_section_vma change.
* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Fix typo in
call to bfd_set_section_vma exposed by recent bfd_set_section_vma
change.
---
ld/ChangeLog | 6 ++++++
ld/emultempl/mmix-elfnmmo.em | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em
index 0059792..5e9781a 100644
--- a/ld/emultempl/mmix-elfnmmo.em
+++ b/ld/emultempl/mmix-elfnmmo.em
@@ -102,7 +102,7 @@ mmix_after_allocation (void)
This section is only present when there are register symbols. */
sec = bfd_get_section_by_name (link_info.output_bfd, MMIX_REG_SECTION_NAME);
if (sec != NULL)
- bfd_set_section_vma (abfd, sec, 0);
+ bfd_set_section_vma (sec->owner, sec, 0);
if (!_bfd_mmix_after_linker_allocation (link_info.output_bfd, &link_info))
{
--
1.7.10.4

View File

@@ -0,0 +1,30 @@
From c50d883cb61ff9917464cb695a0fd83fdb0f9c20 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@bigpond.net.au>
Date: Mon, 21 Jan 2013 13:48:31 +0000
Subject: [PATCH] write.c (chain_frchains_together_1): Reorder assertion to
avoid uninit warning.
Upstream-Status: Backport from 2.23.2
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
gas/write.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gas/write.c b/gas/write.c
index a467147..56ebb6c 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -406,8 +406,8 @@ chain_frchains_together_1 (segT section, struct frchain *frchp)
prev_fix = frchp->fix_tail;
}
}
- gas_assert (prev_frag->fr_type != 0);
- gas_assert (prev_frag != &dummy);
+ gas_assert (prev_frag != &dummy
+ && prev_frag->fr_type != 0);
prev_frag->fr_next = 0;
return prev_frag;
}
--
2.3.5

View File

@@ -0,0 +1,188 @@
Upstream-Status: Backport
From 27b829ee701e29804216b3803fbaeb629be27491 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Wed, 29 Jan 2014 13:46:39 +0000
Subject: [PATCH 1/1] Following up on Tom's suggestion I am checking in a patch to replace the various
bfd_xxx_set macros with static inline functions, so that we can avoid compile time
warnings about comma expressions with unused values.
* bfd-in.h (bfd_set_section_vma): Delete.
(bfd_set_section_alignment): Delete.
(bfd_set_section_userdata): Delete.
(bfd_set_cacheable): Delete.
* bfd.c (bfd_set_cacheable): New static inline function.
* section.c (bfd_set_section_userdata): Likewise.
(bfd_set_section_vma): Likewise.
(bfd_set_section_alignment): Likewise.
* bfd-in2.h: Regenerate.
---
bfd/ChangeLog | 12 ++++++++++++
bfd/bfd-in.h | 5 -----
bfd/bfd-in2.h | 41 +++++++++++++++++++++++++++++++++++------
bfd/bfd.c | 8 ++++++++
bfd/section.c | 26 ++++++++++++++++++++++++++
5 files changed, 81 insertions(+), 11 deletions(-)
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 3afd71b..c7c5a7d 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -292,9 +292,6 @@ typedef struct bfd_section *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
(((bfd)->direction != write_direction && (sec)->rawsize != 0 \
@@ -517,8 +514,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
-
extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 71996db..b5aeb40 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -299,9 +299,6 @@ typedef struct bfd_section *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
(((bfd)->direction != write_direction && (sec)->rawsize != 0 \
@@ -524,8 +521,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
-
extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
@@ -1029,7 +1024,7 @@ bfd *bfd_openr (const char *filename, const char *target);
bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-bfd *bfd_openstreamr (const char *, const char *, void *);
+bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
bfd *bfd_openr_iovec (const char *filename, const char *target,
void *(*open_func) (struct bfd *nbfd,
@@ -1596,6 +1591,32 @@ struct relax_table {
int size;
};
+/* Note: the following are provided as inline functions rather than macros
+ because not all callers use the return value. A macro implementation
+ would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
+ compilers will complain about comma expressions that have no effect. */
+static inline bfd_boolean
+bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
+{
+ ptr->userdata = val;
+ return TRUE;
+}
+
+static inline bfd_boolean
+bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
+{
+ ptr->vma = ptr->lma = val;
+ ptr->user_set_vma = TRUE;
+ return TRUE;
+}
+
+static inline bfd_boolean
+bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
+{
+ ptr->alignment_power = val;
+ return TRUE;
+}
+
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
these sections. */
@@ -6415,6 +6436,14 @@ struct bfd
unsigned int selective_search : 1;
};
+/* See note beside bfd_set_section_userdata. */
+static inline bfd_boolean
+bfd_set_cacheable (bfd * abfd, bfd_boolean val)
+{
+ abfd->cacheable = val;
+ return TRUE;
+}
+
typedef enum bfd_error
{
bfd_error_no_error = 0,
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 8d0580c..2d174f3 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -311,6 +311,14 @@ CODE_FRAGMENT
. unsigned int selective_search : 1;
.};
.
+.{* See note beside bfd_set_section_userdata. *}
+.static inline bfd_boolean
+.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
+.{
+. abfd->cacheable = val;
+. return TRUE;
+.}
+.
*/
#include "sysdep.h"
diff --git a/bfd/section.c b/bfd/section.c
index fb19d8c..a661228 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -542,6 +542,32 @@ CODE_FRAGMENT
. int size;
.};
.
+.{* Note: the following are provided as inline functions rather than macros
+. because not all callers use the return value. A macro implementation
+. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
+. compilers will complain about comma expressions that have no effect. *}
+.static inline bfd_boolean
+.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
+.{
+. ptr->userdata = val;
+. return TRUE;
+.}
+.
+.static inline bfd_boolean
+.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
+.{
+. ptr->vma = ptr->lma = val;
+. ptr->user_set_vma = TRUE;
+. return TRUE;
+.}
+.
+.static inline bfd_boolean
+.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
+.{
+. ptr->alignment_power = val;
+. return TRUE;
+.}
+.
.{* These sections are global, and are managed by BFD. The application
. and target back end are not permitted to change the values in
. these sections. *}
--
1.7.1

View File

@@ -0,0 +1,57 @@
This patch fixes a warning seen with gcc 4.8 (especially on ubuntu 13.10)
| addr2line.c: In function 'handle_address':
| addr2line.c:450:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
| if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
| ^
| addr2line.c:453:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
| switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
| ^
| cc1: all warnings being treated as errors
%a is old GNU style and should be abandoned in favor of %m
Also see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54361
to support this assertion
This patch is added via redhat-compatibility patch so lets revert this part
here.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Inappropriate [Caused by an earlier patch]
Index: elfutils-0.148/src/addr2line.c
===================================================================
--- elfutils-0.148.orig/src/addr2line.c 2013-09-23 17:46:45.513586538 -0700
+++ elfutils-0.148/src/addr2line.c 2013-09-23 17:46:46.329586558 -0700
@@ -447,10 +447,10 @@
bool parsed = false;
int i, j;
char *name = NULL;
- if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
+ if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
&& string[i] == '\0')
parsed = adjust_to_section (name, &addr, dwfl);
- switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
+ switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
{
default:
break;
Index: elfutils-0.148/tests/line2addr.c
===================================================================
--- elfutils-0.148.orig/tests/line2addr.c 2013-09-23 17:46:45.521586538 -0700
+++ elfutils-0.148/tests/line2addr.c 2013-09-23 17:46:46.329586558 -0700
@@ -132,7 +132,7 @@
{
struct args a = { .arg = argv[cnt] };
- switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
+ switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
{
default:
case 0:

View File

@@ -33,6 +33,7 @@ SRC_URI += "\
file://dso-link-change.patch \
file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
file://elfutils-ar-c-fix-num-passed-to-memset.patch \
file://fix-build-gcc-4.8.patch \
"
# Only apply when building uclibc based target recipe
SRC_URI_append_libc-uclibc = " file://uclibc-support.patch"

View File

@@ -0,0 +1,71 @@
From 183d2ace576710079a2bcf2a8bfcbc39b7d9becc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Fri, 1 Mar 2013 17:49:24 +0100
Subject: [PATCH] doc: Fix build with Texinfo 5.0.
* doc/ref/api-control.texi (Handling Errors): Move misplaced description
for `scm_memory_error' & co.
* doc/ref/r6rs.texi (rnrs base): Change `deffnx' of `let-syntax' and
`letrec-syntax' to fit on one line.
Upstream-Status: Backport [in 2.0.9 release]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
doc/ref/api-control.texi | 6 +++---
doc/ref/r6rs.texi | 8 +++-----
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi
index 95c4925..ea943d3 100644
--- a/doc/ref/api-control.texi
+++ b/doc/ref/api-control.texi
@@ -1,7 +1,7 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
-@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 2010, 2011, 2012
-@c Free Software Foundation, Inc.
+@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 2010,
+@c 2011, 2012, 2013 Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@node Control Mechanisms
@@ -1732,8 +1732,8 @@ and the call to these routines doesn't change @code{errno}.
@deftypefnx {C Function} void scm_wrong_type_arg (char *@var{subr}, int @var{argnum}, SCM @var{bad_value})
@deftypefnx {C Function} void scm_wrong_type_arg_msg (char *@var{subr}, int @var{argnum}, SCM @var{bad_value}, const char *@var{expected})
@deftypefnx {C Function} void scm_memory_error (char *@var{subr})
-Throw an error with the various keys described above.
@deftypefnx {C Function} void scm_misc_error (const char *@var{subr}, const char *@var{message}, SCM @var{args})
+Throw an error with the various keys described above.
In @code{scm_wrong_num_args}, @var{proc} should be a Scheme symbol
which is the name of the procedure incorrectly invoked. The other
diff --git a/doc/ref/r6rs.texi b/doc/ref/r6rs.texi
index 2028ada..13f9e20 100644
--- a/doc/ref/r6rs.texi
+++ b/doc/ref/r6rs.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
-@c Copyright (C) 2010, 2011, 2012
+@c Copyright (C) 2010, 2011, 2012, 2013
@c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@@ -273,10 +273,8 @@ grouped below by the existing manual sections to which they correspond.
@end deffn
@deffn {Scheme Syntax} define-syntax keyword expression
-@deffnx {Scheme Syntax} let-syntax ((keyword transformer) @dots{})
- exp1 exp2 @dots{}
-@deffnx {Scheme Syntax} letrec-syntax ((keyword transformer) @dots{})
- exp1 exp2 @dots{}
+@deffnx {Scheme Syntax} let-syntax ((keyword transformer) @dots{}) exp1 exp2 @dots{}
+@deffnx {Scheme Syntax} letrec-syntax ((keyword transformer) @dots{}) exp1 exp2 @dots{}
@xref{Defining Macros}, for documentation.
@end deffn
--
1.8.4.2

View File

@@ -20,6 +20,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
file://guile_2.0.6_fix_sed_error.patch \
file://arm_endianness.patch \
file://fix_parallel_build_issue.patch \
file://0001-doc-Fix-build-with-Texinfo-5.0.patch \
"
# file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
@@ -35,7 +36,7 @@ BBCLASSEXTEND = "native"
DEPENDS = "libunistring bdwgc gmp libtool libffi"
# add guile-native only to the target recipe's DEPENDS
DEPENDS += "${@['guile-native libatomics-ops', ''][d.getVar('PN', True) != 'guile']}"
DEPENDS_append_class-target = " guile-native libatomics-ops"
RDEPENDS_${PN}_append_libc-glibc_class-target = "glibc-gconv-iso8859-1"

View File

@@ -0,0 +1,86 @@
From 1735f6f53ca19f99c6e9e39496c486af323ba6a8 Mon Sep 17 00:00:00 2001
From: Brian Carlson <brian.carlson@cpanel.net>
Date: Wed, 28 Nov 2012 08:54:33 -0500
Subject: [PATCH] Fix misparsing of maketext strings.
Case 61251: This commit fixes a misparse of maketext strings that could
lead to arbitrary code execution. Basically, maketext was compiling
bracket notation into functions, but neglected to escape backslashes
inside the content or die on fully-qualified method names when
generating the code. This change escapes all such backslashes and dies
when a method name with a colon or apostrophe is specified.
---
AUTHORS | 1 +
dist/Locale-Maketext/lib/Locale/Maketext.pm | 24 ++++++++----------------
2 files changed, 9 insertions(+), 16 deletions(-)
Upstream-Status: Backport
Signed-off-by: Saul Wold <sgw@linux.intel.com>
diff --git a/AUTHORS b/AUTHORS
index 70734b0..009dea0 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -154,6 +154,7 @@ Breno G. de Oliveira <garu@cpan.org>
Brent Dax <brentdax@cpan.org>
Brooks D Boyd
Brian Callaghan <callagh@itginc.com>
+Brian Carlson <brian.carlson@cpanel.net>
Brian Clarke <clarke@appliedmeta.com>
brian d foy <brian.d.foy@gmail.com>
Brian Fraser <fraserbn@gmail.com>
diff --git a/dist/Locale-Maketext/lib/Locale/Maketext.pm b/dist/Locale-Maketext/lib/Locale/Maketext.pm
index 4822027..63e5fba 100644
--- a/dist/Locale-Maketext/lib/Locale/Maketext.pm
+++ b/dist/Locale-Maketext/lib/Locale/Maketext.pm
@@ -625,21 +625,9 @@ sub _compile {
# 0-length method name means to just interpolate:
push @code, ' (';
}
- elsif($m =~ /^\w+(?:\:\:\w+)*$/s
- and $m !~ m/(?:^|\:)\d/s
- # exclude starting a (sub)package or symbol with a digit
+ elsif($m =~ /^\w+$/s
+ # exclude anything fancy, especially fully-qualified module names
) {
- # Yes, it even supports the demented (and undocumented?)
- # $obj->Foo::bar(...) syntax.
- $target->_die_pointing(
- $string_to_compile, q{Can't use "SUPER::" in a bracket-group method},
- 2 + length($c[-1])
- )
- if $m =~ m/^SUPER::/s;
- # Because for SUPER:: to work, we'd have to compile this into
- # the right package, and that seems just not worth the bother,
- # unless someone convinces me otherwise.
-
push @code, ' $_[0]->' . $m . '(';
}
else {
@@ -693,7 +681,9 @@ sub _compile {
elsif(substr($1,0,1) ne '~') {
# it's stuff not containing "~" or "[" or "]"
# i.e., a literal blob
- $c[-1] .= $1;
+ my $text = $1;
+ $text =~ s/\\/\\\\/g;
+ $c[-1] .= $text;
}
elsif($1 eq '~~') { # "~~"
@@ -731,7 +721,9 @@ sub _compile {
else {
# It's a "~X" where X is not a special character.
# Consider it a literal ~ and X.
- $c[-1] .= $1;
+ my $text = $1;
+ $text =~ s/\\/\\\\/g;
+ $c[-1] .= $text;
}
}
}
--
1.8.3.1

View File

@@ -0,0 +1,178 @@
From d59e31fc729d8a39a774f03bc6bc457029a7aef2 Mon Sep 17 00:00:00 2001
From: Yves Orton <demerphq@gmail.com>
Date: Tue, 12 Feb 2013 10:53:05 +0100
Subject: [PATCH] Prevent premature hsplit() calls, and only trigger REHASH
after hsplit()
Triggering a hsplit due to long chain length allows an attacker
to create a carefully chosen set of keys which can cause the hash
to use 2 * (2**32) * sizeof(void *) bytes ram. AKA a DOS via memory
exhaustion. Doing so also takes non trivial time.
Eliminating this check, and only inspecting chain length after a
normal hsplit() (triggered when keys>buckets) prevents the attack
entirely, and makes such attacks relatively benign.
(cherry picked from commit f1220d61455253b170e81427c9d0357831ca0fac)
Upstream-Status: Backport
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
ext/Hash-Util-FieldHash/t/10_hash.t | 18 ++++++++++++++++--
hv.c | 35 ++++++++---------------------------
t/op/hash.t | 20 +++++++++++++++++---
3 files changed, 41 insertions(+), 32 deletions(-)
diff --git a/ext/Hash-Util-FieldHash/t/10_hash.t b/ext/Hash-Util-FieldHash/t/10_hash.t
index 2cfb4e8..d58f053 100644
--- a/ext/Hash-Util-FieldHash/t/10_hash.t
+++ b/ext/Hash-Util-FieldHash/t/10_hash.t
@@ -38,15 +38,29 @@ use constant START => "a";
# some initial hash data
fieldhash my %h2;
-%h2 = map {$_ => 1} 'a'..'cc';
+my $counter= "a";
+$h2{$counter++}++ while $counter ne 'cd';
ok (!Internals::HvREHASH(%h2),
"starting with pre-populated non-pathological hash (rehash flag if off)");
my @keys = get_keys(\%h2);
+my $buckets= buckets(\%h2);
$h2{$_}++ for @keys;
+$h2{$counter++}++ while buckets(\%h2) == $buckets; # force a split
ok (Internals::HvREHASH(%h2),
- scalar(@keys) . " colliding into the same bucket keys are triggering rehash");
+ scalar(@keys) . " colliding into the same bucket keys are triggering rehash after split");
+
+# returns the number of buckets in a hash
+sub buckets {
+ my $hr = shift;
+ my $keys_buckets= scalar(%$hr);
+ if ($keys_buckets=~m!/([0-9]+)\z!) {
+ return 0+$1;
+ } else {
+ return 8;
+ }
+}
sub get_keys {
my $hr = shift;
diff --git a/hv.c b/hv.c
index 2be1feb..abb9d76 100644
--- a/hv.c
+++ b/hv.c
@@ -35,7 +35,8 @@ holds the key and hash value.
#define PERL_HASH_INTERNAL_ACCESS
#include "perl.h"
-#define HV_MAX_LENGTH_BEFORE_SPLIT 14
+#define HV_MAX_LENGTH_BEFORE_REHASH 14
+#define SHOULD_DO_HSPLIT(xhv) ((xhv)->xhv_keys > (xhv)->xhv_max) /* HvTOTALKEYS(hv) > HvMAX(hv) */
static const char S_strtab_error[]
= "Cannot modify shared string table in hv_%s";
@@ -794,29 +795,9 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
if (masked_flags & HVhek_ENABLEHVKFLAGS)
HvHASKFLAGS_on(hv);
- {
- const HE *counter = HeNEXT(entry);
-
- xhv->xhv_keys++; /* HvTOTALKEYS(hv)++ */
- if (!counter) { /* initial entry? */
- } else if (xhv->xhv_keys > xhv->xhv_max) {
- /* Use only the old HvKEYS(hv) > HvMAX(hv) condition to limit
- bucket splits on a rehashed hash, as we're not going to
- split it again, and if someone is lucky (evil) enough to
- get all the keys in one list they could exhaust our memory
- as we repeatedly double the number of buckets on every
- entry. Linear search feels a less worse thing to do. */
- hsplit(hv);
- } else if(!HvREHASH(hv)) {
- U32 n_links = 1;
-
- while ((counter = HeNEXT(counter)))
- n_links++;
-
- if (n_links > HV_MAX_LENGTH_BEFORE_SPLIT) {
- hsplit(hv);
- }
- }
+ xhv->xhv_keys++; /* HvTOTALKEYS(hv)++ */
+ if ( SHOULD_DO_HSPLIT(xhv) ) {
+ hsplit(hv);
}
if (return_svp) {
@@ -1192,7 +1173,7 @@ S_hsplit(pTHX_ HV *hv)
/* Pick your policy for "hashing isn't working" here: */
- if (longest_chain <= HV_MAX_LENGTH_BEFORE_SPLIT /* split worked? */
+ if (longest_chain <= HV_MAX_LENGTH_BEFORE_REHASH /* split worked? */
|| HvREHASH(hv)) {
return;
}
@@ -2831,8 +2812,8 @@ S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags)
xhv->xhv_keys++; /* HvTOTALKEYS(hv)++ */
if (!next) { /* initial entry? */
- } else if (xhv->xhv_keys > xhv->xhv_max /* HvKEYS(hv) > HvMAX(hv) */) {
- hsplit(PL_strtab);
+ } else if ( SHOULD_DO_HSPLIT(xhv) ) {
+ hsplit(PL_strtab);
}
}
diff --git a/t/op/hash.t b/t/op/hash.t
index 278bea7..201260a 100644
--- a/t/op/hash.t
+++ b/t/op/hash.t
@@ -39,22 +39,36 @@ use constant THRESHOLD => 14;
use constant START => "a";
# some initial hash data
-my %h2 = map {$_ => 1} 'a'..'cc';
+my %h2;
+my $counter= "a";
+$h2{$counter++}++ while $counter ne 'cd';
ok (!Internals::HvREHASH(%h2),
"starting with pre-populated non-pathological hash (rehash flag if off)");
my @keys = get_keys(\%h2);
+my $buckets= buckets(\%h2);
$h2{$_}++ for @keys;
+$h2{$counter++}++ while buckets(\%h2) == $buckets; # force a split
ok (Internals::HvREHASH(%h2),
- scalar(@keys) . " colliding into the same bucket keys are triggering rehash");
+ scalar(@keys) . " colliding into the same bucket keys are triggering rehash after split");
+
+# returns the number of buckets in a hash
+sub buckets {
+ my $hr = shift;
+ my $keys_buckets= scalar(%$hr);
+ if ($keys_buckets=~m!/([0-9]+)\z!) {
+ return 0+$1;
+ } else {
+ return 8;
+ }
+}
sub get_keys {
my $hr = shift;
# the minimum of bits required to mount the attack on a hash
my $min_bits = log(THRESHOLD)/log(2);
-
# if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher
my $keys = scalar keys %$hr;
--
1.8.3.1

View File

@@ -65,6 +65,9 @@ SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
file://perl-archlib-exp.patch \
file://dynaloaderhack.patch \
\
file://0001-Fix-misparsing-of-maketext-strings.patch \
file://0001-Prevent-premature-hsplit-calls-and-only-trigger-REHA.patch \
\
file://config.sh \
file://config.sh-32 \
file://config.sh-32-le \

View File

@@ -151,7 +151,7 @@ RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
FILES_${PN}-mmap="${libdir}/python2.7/lib-dynload/mmap.so "
DESCRIPTION_${PN}-multiprocessing="Python Multiprocessing Support"
RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading"
RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes"
FILES_${PN}-multiprocessing="${libdir}/python2.7/lib-dynload/_multiprocessing.so ${libdir}/python2.7/multiprocessing "
DESCRIPTION_${PN}-netclient="Python Internet Protocol Clients"

View File

@@ -0,0 +1,251 @@
Upstream-Status: Backport
Signed-off-by: Saul Wold <sgw@linux.intel.com>
diff -r 9ddc63c039ba Lib/test/nullbytecert.pem
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/test/nullbytecert.pem Sun Aug 11 18:13:17 2013 +0200
@@ -0,0 +1,90 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 0 (0x0)
+ Signature Algorithm: sha1WithRSAEncryption
+ Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
+ Validity
+ Not Before: Aug 7 13:11:52 2013 GMT
+ Not After : Aug 7 13:12:52 2013 GMT
+ Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Public-Key: (2048 bit)
+ Modulus:
+ 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3:
+ 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97:
+ 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2:
+ 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1:
+ 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4:
+ 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8:
+ a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02:
+ 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75:
+ ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91:
+ 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d:
+ 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30:
+ 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7:
+ f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12:
+ f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5:
+ ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb:
+ d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f:
+ 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da:
+ 2f:85
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Basic Constraints: critical
+ CA:FALSE
+ X509v3 Subject Key Identifier:
+ 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C
+ X509v3 Key Usage:
+ Digital Signature, Non Repudiation, Key Encipherment
+ X509v3 Subject Alternative Name:
+ *************************************************************
+ WARNING: The values for DNS, email and URI are WRONG. OpenSSL
+ doesn't print the text after a NULL byte.
+ *************************************************************
+ DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
+ Signature Algorithm: sha1WithRSAEncryption
+ ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5:
+ a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44:
+ 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37:
+ 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3:
+ 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86:
+ de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac:
+ 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4:
+ 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60:
+ d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5:
+ 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60:
+ 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6:
+ 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d:
+ 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e:
+ 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6:
+ c1:ca:a9:94
+-----BEGIN CERTIFICATE-----
+MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx
+DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ
+eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg
+RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y
+ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw
+NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI
+DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv
+ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt
+ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq
+hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j
+pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P
+vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv
+KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA
+oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL
+08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV
+HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E
+BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu
+Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251
+bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA
+AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9
+i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j
+HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk
+kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx
+VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW
+RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ=
+-----END CERTIFICATE-----
diff -r 9ddc63c039ba Lib/test/test_ssl.py
--- a/Lib/test/test_ssl.py Sun Aug 11 13:04:50 2013 +0300
+++ b/Lib/test/test_ssl.py Sun Aug 11 18:13:17 2013 +0200
@@ -25,6 +25,7 @@
HOST = test_support.HOST
CERTFILE = None
SVN_PYTHON_ORG_ROOT_CERT = None
+NULLBYTECERT = None
def handle_error(prefix):
exc_format = ' '.join(traceback.format_exception(*sys.exc_info()))
@@ -123,6 +124,27 @@
('DNS', 'projects.forum.nokia.com'))
)
+ def test_parse_cert_CVE_2013_4073(self):
+ p = ssl._ssl._test_decode_cert(NULLBYTECERT)
+ if test_support.verbose:
+ sys.stdout.write("\n" + pprint.pformat(p) + "\n")
+ subject = ((('countryName', 'US'),),
+ (('stateOrProvinceName', 'Oregon'),),
+ (('localityName', 'Beaverton'),),
+ (('organizationName', 'Python Software Foundation'),),
+ (('organizationalUnitName', 'Python Core Development'),),
+ (('commonName', 'null.python.org\x00example.org'),),
+ (('emailAddress', 'python-dev@python.org'),))
+ self.assertEqual(p['subject'], subject)
+ self.assertEqual(p['issuer'], subject)
+ self.assertEqual(p['subjectAltName'],
+ (('DNS', 'altnull.python.org\x00example.com'),
+ ('email', 'null@python.org\x00user@example.org'),
+ ('URI', 'http://null.python.org\x00http://example.org'),
+ ('IP Address', '192.0.2.1'),
+ ('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
+ )
+
def test_DER_to_PEM(self):
with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f:
pem = f.read()
@@ -1360,7 +1382,7 @@
def test_main(verbose=False):
- global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT
+ global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT, NULLBYTECERT
CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir,
"keycert.pem")
SVN_PYTHON_ORG_ROOT_CERT = os.path.join(
@@ -1368,10 +1390,13 @@
"https_svn_python_org_root.pem")
NOKIACERT = os.path.join(os.path.dirname(__file__) or os.curdir,
"nokia.pem")
+ NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir,
+ "nullbytecert.pem")
if (not os.path.exists(CERTFILE) or
not os.path.exists(SVN_PYTHON_ORG_ROOT_CERT) or
- not os.path.exists(NOKIACERT)):
+ not os.path.exists(NOKIACERT) or
+ not os.path.exists(NULLBYTECERT)):
raise test_support.TestFailed("Can't read certificate files!")
tests = [BasicTests, BasicSocketTests]
diff -r 9ddc63c039ba Modules/_ssl.c
--- a/Modules/_ssl.c Sun Aug 11 13:04:50 2013 +0300
+++ b/Modules/_ssl.c Sun Aug 11 18:13:17 2013 +0200
@@ -741,8 +741,13 @@
/* get a rendering of each name in the set of names */
+ int gntype;
+ ASN1_STRING *as = NULL;
+
name = sk_GENERAL_NAME_value(names, j);
- if (name->type == GEN_DIRNAME) {
+ gntype = name-> type;
+ switch (gntype) {
+ case GEN_DIRNAME:
/* we special-case DirName as a tuple of tuples of attributes */
@@ -764,11 +769,61 @@
goto fail;
}
PyTuple_SET_ITEM(t, 1, v);
+ break;
- } else {
+ case GEN_EMAIL:
+ case GEN_DNS:
+ case GEN_URI:
+ /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string
+ correctly. */
+ t = PyTuple_New(2);
+ if (t == NULL)
+ goto fail;
+ switch (gntype) {
+ case GEN_EMAIL:
+ v = PyUnicode_FromString("email");
+ as = name->d.rfc822Name;
+ break;
+ case GEN_DNS:
+ v = PyUnicode_FromString("DNS");
+ as = name->d.dNSName;
+ break;
+ case GEN_URI:
+ v = PyUnicode_FromString("URI");
+ as = name->d.uniformResourceIdentifier;
+ break;
+ }
+ if (v == NULL) {
+ Py_DECREF(t);
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 0, v);
+ v = PyString_FromStringAndSize((char *)ASN1_STRING_data(as),
+ ASN1_STRING_length(as));
+ if (v == NULL) {
+ Py_DECREF(t);
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 1, v);
+ break;
+ default:
/* for everything else, we use the OpenSSL print form */
-
+ switch (gntype) {
+ /* check for new general name type */
+ case GEN_OTHERNAME:
+ case GEN_X400:
+ case GEN_EDIPARTY:
+ case GEN_IPADD:
+ case GEN_RID:
+ break;
+ default:
+ if (PyErr_Warn(PyExc_RuntimeWarning,
+ "Unknown general name type") == -1) {
+ goto fail;
+ }
+ break;
+ }
(void) BIO_reset(biobuf);
GENERAL_NAME_print(biobuf, name);
len = BIO_gets(biobuf, buf, sizeof(buf)-1);
@@ -794,6 +849,7 @@
goto fail;
}
PyTuple_SET_ITEM(t, 1, v);
+ break;
}
/* and add that rendering to the list */

View File

@@ -0,0 +1,35 @@
# HG changeset patch
# User Philip Jenvey <pjenvey@underboss.org>
# Date 1322701507 28800
# Branch 2.7
# Node ID e7c20a8476a0e2ca18f8040864cbc400818d8f24
# Parent 3ecddf168f1f554a17a047384fe0b02f2d688277
create the .pypirc securely
Upstream-Status: Backport
Signed-off-by: Saul Wold <sgw@linux.intel.com>
diff -r 3ecddf168f1f -r e7c20a8476a0 Lib/distutils/config.py
--- a/Lib/distutils/config.py Tue Nov 29 00:53:09 2011 +0100
+++ b/Lib/distutils/config.py Wed Nov 30 17:05:07 2011 -0800
@@ -42,16 +42,8 @@
def _store_pypirc(self, username, password):
"""Creates a default .pypirc file."""
rc = self._get_rc_file()
- f = open(rc, 'w')
- try:
- f.write(DEFAULT_PYPIRC % (username, password))
- finally:
- f.close()
- try:
- os.chmod(rc, 0600)
- except OSError:
- # should do something better here
- pass
+ with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0600), 'w') as fp:
+ fp.write(DEFAULT_PYPIRC % (username, password))
def _read_pypirc(self):
"""Reads the .pypirc file."""

View File

@@ -29,6 +29,8 @@ SRC_URI += "\
file://python-2.7.3-remove-bsdb-rpath.patch \
file://builddir.patch \
file://python-2.7.3-CVE-2012-2135.patch \
file://CVE-2013-4073_py27.patch \
file://pypirc-secure.patch \
"
S = "${WORKDIR}/Python-${PV}"

View File

@@ -0,0 +1,24 @@
Enable platform tag matching workaround in OE.
When installing some LSB packages the 'platform' field in the package
appears to be invalid. Instead of relying solely on the platform comparison
we also want to generate a perceived platform based on the valid rpm contents
of arch and os.
Upstream-Status: Pending
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Index: rpm-5.4.9/lib/depends.c
===================================================================
--- rpm-5.4.9.orig/lib/depends.c
+++ rpm-5.4.9/lib/depends.c
@@ -594,7 +594,7 @@ int rpmtsAddInstallElement(rpmts ts, Hea
platform = rpmExpand(arch, "-unknown-", os, NULL);
rc = rpmPlatformScore(platform, platpat, nplatpat);
-#if defined(RPM_VENDOR_MANDRIVA)
+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE)
/*
* If no match on platform tag, we'll try again with arch tag
* in case platform tag is inconsistent with it, which is the case

View File

@@ -86,7 +86,8 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
file://rpm-platform2.patch \
file://rpm-remove-sykcparse-decl.patch \
file://debugedit-segv.patch \
file://rpm-platform-file-fix.patch \
file://rpm-platform-file-fix.patch \
file://rpm-lsb-compatibility.patch \
"
# Uncomment the following line to enable platform score debugging
@@ -155,7 +156,7 @@ PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat,"
PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat,"
PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl,"
PACAKGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas,"
PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas,"
EXTRA_OECONF += "--verbose \
--sysconfdir=${sysconfdir} \

View File

@@ -0,0 +1,32 @@
Fix to get correct SVN_NEON_CONFIG and CFLAGS when sysroot path contains '-D' and '-I'
characters.
Upstream-Status: Pending
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
index f951039..a813145 100644
--- a/build/ac-macros/neon.m4
+++ b/build/ac-macros/neon.m4
@@ -105,8 +105,8 @@ AC_DEFUN(SVN_NEON_CONFIG,
test "$svn_allowed_neon" = "any"; then
svn_allowed_neon_on_system="yes"
if test "$NEON_PKG_CONFIG" = "yes"; then
- SVN_NEON_INCLUDES=[`$PKG_CONFIG neon --cflags | $SED -e 's/-D[^ ]*//g'`]
- CFLAGS=["$CFLAGS `$PKG_CONFIG neon --cflags | $SED -e 's/-I[^ ]*//g'`"]
+ SVN_NEON_INCLUDES=["`$PKG_CONFIG neon --cflags | $SED -e 's/^-D[^ ]*//g' -e 's/ -D[^ ]*//g'`"]
+ CFLAGS=["$CFLAGS `$PKG_CONFIG neon --cflags | $SED -e 's/^-I[^ ]*//g' -e 's/ -I[^ ]*//g'`"]
old_CFLAGS="$CFLAGS"
old_LIBS="$LIBS"
NEON_LIBS=`$PKG_CONFIG neon --libs`
@@ -126,8 +126,8 @@ int main()
CFLAGS="$old_CFLAGS"
LIBS="$old_LIBS"
else
- SVN_NEON_INCLUDES=[`$neon_config --cflags | $SED -e 's/-D[^ ]*//g'`]
- CFLAGS=["$CFLAGS `$neon_config --cflags | $SED -e 's/-I[^ ]*//g'`"]
+ SVN_NEON_INCLUDES=[`$neon_config --cflags | $SED -e 's/^-D[^ ]*//g' -e 's/ -D[^ ]*//g'`]
+ CFLAGS=["$CFLAGS `$neon_config --cflags | $SED -e 's/^-I[^ ]*//g' -e 's/ -I[^ ]*//g'`"]
NEON_LIBS=`$neon_config --libs`
fi
svn_lib_neon="yes"

View File

@@ -12,6 +12,7 @@ inherit gettext
SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
file://libtool2.patch \
file://fix-install-depends.patch \
file://neon.m4-fix-includes-and-cflags.patch \
"
SRC_URI[md5sum] = "454b9f398415c3504435bf8c3f6ed127"
SRC_URI[sha256sum] = "fc83d4d98ccea8b7bfa8f5c20fff545c8baa7d035db930977550c51c6ca23686"

View File

@@ -0,0 +1,158 @@
Fix for exported function namespace change
Upstream-Status: Backport
Downloaded from: http://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-054
Author: Chet Ramey <chet.ramey@case.edu>
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
BASH PATCH REPORT
=================
Bash-Release: 3.2
Patch-ID: bash32-054
Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
This patch changes the encoding bash uses for exported functions to avoid
clashes with shell variables and to avoid depending only on an environment
variable's contents to determine whether or not to interpret it as a shell
function.
---
--- a/variables.c 2014-09-16 19:10:39.000000000 -0400
+++ b/variables.c 2014-09-27 21:02:08.000000000 -0400
@@ -75,4 +75,9 @@
#define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0')
+#define BASHFUNC_PREFIX "BASH_FUNC_"
+#define BASHFUNC_PREFLEN 10 /* == strlen(BASHFUNC_PREFIX */
+#define BASHFUNC_SUFFIX "%%"
+#define BASHFUNC_SUFFLEN 2 /* == strlen(BASHFUNC_SUFFIX) */
+
extern char **environ;
@@ -242,5 +247,5 @@
static void dispose_temporary_env __P((sh_free_func_t *));
-static inline char *mk_env_string __P((const char *, const char *));
+static inline char *mk_env_string __P((const char *, const char *, int));
static char **make_env_array_from_var_list __P((SHELL_VAR **));
static char **make_var_export_array __P((VAR_CONTEXT *));
@@ -310,19 +315,30 @@
/* If exported function, define it now. Don't import functions from
the environment in privileged mode. */
- if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
+ if (privmode == 0 && read_but_dont_execute == 0 &&
+ STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) &&
+ STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) &&
+ STREQN ("() {", string, 4))
{
+ size_t namelen;
+ char *tname; /* desired imported function name */
+
+ namelen = char_index - BASHFUNC_PREFLEN - BASHFUNC_SUFFLEN;
+
+ tname = name + BASHFUNC_PREFLEN; /* start of func name */
+ tname[namelen] = '\0'; /* now tname == func name */
+
string_length = strlen (string);
- temp_string = (char *)xmalloc (3 + string_length + char_index);
+ temp_string = (char *)xmalloc (namelen + string_length + 2);
- strcpy (temp_string, name);
- temp_string[char_index] = ' ';
- strcpy (temp_string + char_index + 1, string);
+ memcpy (temp_string, tname, namelen);
+ temp_string[namelen] = ' ';
+ memcpy (temp_string + namelen + 1, string, string_length + 1);
/* Don't import function names that are invalid identifiers from the
environment. */
- if (legal_identifier (name))
- parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+ if (absolute_program (tname) == 0 && (posixly_correct == 0 || legal_identifier (tname)))
+ parse_and_execute (temp_string, tname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
- if (temp_var = find_function (name))
+ if (temp_var = find_function (tname))
{
VSETATTR (temp_var, (att_exported|att_imported));
@@ -330,5 +346,8 @@
}
else
- report_error (_("error importing function definition for `%s'"), name);
+ report_error (_("error importing function definition for `%s'"), tname);
+
+ /* Restore original suffix */
+ tname[namelen] = BASHFUNC_SUFFIX[0];
}
#if defined (ARRAY_VARS)
@@ -2208,5 +2227,5 @@
INVALIDATE_EXPORTSTR (var);
- var->exportstr = mk_env_string (name, value);
+ var->exportstr = mk_env_string (name, value, 0);
array_needs_making = 1;
@@ -2999,19 +3018,40 @@
static inline char *
-mk_env_string (name, value)
+mk_env_string (name, value, isfunc)
const char *name, *value;
+ int isfunc;
{
- int name_len, value_len;
- char *p;
+ size_t name_len, value_len;
+ char *p, *q;
name_len = strlen (name);
value_len = STRLEN (value);
- p = (char *)xmalloc (2 + name_len + value_len);
- strcpy (p, name);
- p[name_len] = '=';
+
+ /* If we are exporting a shell function, construct the encoded function
+ name. */
+ if (isfunc && value)
+ {
+ p = (char *)xmalloc (BASHFUNC_PREFLEN + name_len + BASHFUNC_SUFFLEN + value_len + 2);
+ q = p;
+ memcpy (q, BASHFUNC_PREFIX, BASHFUNC_PREFLEN);
+ q += BASHFUNC_PREFLEN;
+ memcpy (q, name, name_len);
+ q += name_len;
+ memcpy (q, BASHFUNC_SUFFIX, BASHFUNC_SUFFLEN);
+ q += BASHFUNC_SUFFLEN;
+ }
+ else
+ {
+ p = (char *)xmalloc (2 + name_len + value_len);
+ memcpy (p, name, name_len);
+ q = p + name_len;
+ }
+
+ q[0] = '=';
if (value && *value)
- strcpy (p + name_len + 1, value);
+ memcpy (q + 1, value, value_len + 1);
else
- p[name_len + 1] = '\0';
+ q[1] = '\0';
+
return (p);
}
@@ -3088,5 +3128,5 @@
using the cached exportstr... */
list[list_index] = USE_EXPORTSTR ? savestring (value)
- : mk_env_string (var->name, value);
+ : mk_env_string (var->name, value, function_p (var));
if (USE_EXPORTSTR == 0)

View File

@@ -0,0 +1,77 @@
Fix CVE-2014-6271, aka ShellShock.
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
*** ../bash-3.2.51/builtins/common.h 2006-03-06 09:38:44.000000000 -0500
--- builtins/common.h 2014-09-16 19:08:02.000000000 -0400
***************
*** 34,37 ****
--- 34,39 ----
/* Flags for describe_command, shared between type.def and command.def */
+ #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */
+ #define SEVAL_ONECMD 0x100 /* only allow a single command */
#define CDESC_ALL 0x001 /* type -a */
#define CDESC_SHORTDESC 0x002 /* command -V */
*** ../bash-3.2.51/builtins/evalstring.c 2008-11-15 17:47:04.000000000 -0500
--- builtins/evalstring.c 2014-09-16 19:08:02.000000000 -0400
***************
*** 235,238 ****
--- 235,246 ----
struct fd_bitmap *bitmap;
+ if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
+ {
+ internal_warning ("%s: ignoring function definition attempt", from_file);
+ should_jump_to_top_level = 0;
+ last_result = last_command_exit_value = EX_BADUSAGE;
+ break;
+ }
+
bitmap = new_fd_bitmap (FD_BITMAP_SIZE);
begin_unwind_frame ("pe_dispose");
***************
*** 292,295 ****
--- 300,306 ----
dispose_fd_bitmap (bitmap);
discard_unwind_frame ("pe_dispose");
+
+ if (flags & SEVAL_ONECMD)
+ break;
}
}
*** ../bash-3.2.51/variables.c 2008-11-15 17:15:06.000000000 -0500
--- variables.c 2014-09-16 19:10:39.000000000 -0400
***************
*** 319,328 ****
strcpy (temp_string + char_index + 1, string);
! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST);
!
! /* Ancient backwards compatibility. Old versions of bash exported
! functions like name()=() {...} */
! if (name[char_index - 1] == ')' && name[char_index - 2] == '(')
! name[char_index - 2] = '\0';
if (temp_var = find_function (name))
--- 319,326 ----
strcpy (temp_string + char_index + 1, string);
! /* Don't import function names that are invalid identifiers from the
! environment. */
! if (legal_identifier (name))
! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
if (temp_var = find_function (name))
***************
*** 333,340 ****
else
report_error (_("error importing function definition for `%s'"), name);
-
- /* ( */
- if (name[char_index - 1] == ')' && name[char_index - 2] == '\0')
- name[char_index - 2] = '('; /* ) */
}
#if defined (ARRAY_VARS)
--- 331,334 ----

View File

@@ -0,0 +1,44 @@
bash: Fix CVE-2014-6277 (shellshock)
Upstream-status: backport
Downloaded from:
ftp://ftp.gnu.org/pub/bash/bash-3.2-patches/bash32-056
Author: Chet Ramey <chet.ramey@case.edu>
Signed-off-by: Catalin Popeanga <catalin.popeanga@enea.com>
BASH PATCH REPORT
=================
Bash-Release: 3.2
Patch-ID: bash32-056
Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
When bash is parsing a function definition that contains a here-document
delimited by end-of-file (or end-of-string), it leaves the closing delimiter
uninitialized. This can result in an invalid memory access when the parsed
function is later copied.
---
--- a/make_cmd.c 2006-09-12 09:21:22.000000000 -0400
+++ b/make_cmd.c 2014-10-02 11:41:40.000000000 -0400
@@ -677,4 +677,5 @@
temp->redirector = source;
temp->redirectee = dest_and_filename;
+ temp->here_doc_eof = 0;
temp->instruction = instruction;
temp->flags = 0;
--- a/copy_cmd.c 2003-10-07 11:43:44.000000000 -0400
+++ b/copy_cmd.c 2014-10-02 11:41:40.000000000 -0400
@@ -117,5 +117,5 @@
case r_reading_until:
case r_deblank_reading_until:
- new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
+ new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
/*FALLTHROUGH*/
case r_reading_string:

View File

@@ -0,0 +1,99 @@
bash: Fix CVE-2014-6278 (shellshock)
Upstream-status: backport
Downloaded from:
ftp://ftp.gnu.org/pub/bash/bash-3.2-patches/bash32-057
Author: Chet Ramey <chet.ramey@case.edu>
Signed-off-by: Catalin Popeanga <catalin.popeanga@enea.com>
BASH PATCH REPORT
=================
Bash-Release: 3.2
Patch-ID: bash32-057
Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
A combination of nested command substitutions and function importing from
the environment can cause bash to execute code appearing in the environment
variable value following the function definition.
--- a/builtins/evalstring.c 2014-09-16 19:08:02.000000000 -0400
+++ b/builtins/evalstring.c 2014-10-04 15:58:35.000000000 -0400
@@ -44,4 +44,5 @@
#include "../redir.h"
#include "../trap.h"
+#include "../bashintl.h"
#if defined (HISTORY)
@@ -235,10 +236,23 @@
struct fd_bitmap *bitmap;
- if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
+ if (flags & SEVAL_FUNCDEF)
{
- internal_warning ("%s: ignoring function definition attempt", from_file);
- should_jump_to_top_level = 0;
- last_result = last_command_exit_value = EX_BADUSAGE;
- break;
+ char *x;
+
+ /* If the command parses to something other than a straight
+ function definition, or if we have not consumed the entire
+ string, or if the parser has transformed the function
+ name (as parsing will if it begins or ends with shell
+ whitespace, for example), reject the attempt */
+ if (command->type != cm_function_def ||
+ ((x = parser_remaining_input ()) && *x) ||
+ (STREQ (from_file, command->value.Function_def->name->word) == 0))
+ {
+ internal_warning (_("%s: ignoring function definition attempt"), from_file);
+ should_jump_to_top_level = 0;
+ last_result = last_command_exit_value = EX_BADUSAGE;
+ reset_parser ();
+ break;
+ }
}
@@ -302,5 +316,8 @@
if (flags & SEVAL_ONECMD)
- break;
+ {
+ reset_parser ();
+ break;
+ }
}
}
--- a/parse.y 2014-09-30 19:43:22.000000000 -0400
+++ b/parse.y 2014-10-04 15:58:35.000000000 -0400
@@ -2125,4 +2125,14 @@
}
+char *
+parser_remaining_input ()
+{
+ if (shell_input_line == 0)
+ return 0;
+ if (shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len)
+ return '\0'; /* XXX */
+ return (shell_input_line + shell_input_line_index);
+}
+
#ifdef INCLUDE_UNUSED
/* Back the input pointer up by one, effectively `ungetting' a character. */
--- a/shell.h 2008-04-28 22:00:24.000000000 -0400
+++ b/shell.h 2014-10-04 15:58:35.000000000 -0400
@@ -161,4 +161,6 @@
/* Let's try declaring these here. */
+extern char *parser_remaining_input __P((void));
+
extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *));
extern void restore_parser_state __P((sh_parser_state_t *));

View File

@@ -0,0 +1,16 @@
Taken from http://www.openwall.com/lists/oss-security/2016/09/25/10
Upstream-Status: Backport
Index: bash-3.2.48/parse.y
===================================================================
--- bash-3.2.48.orig/parse.y 2008-04-29 18:24:55.000000000 -0700
+++ bash-3.2.48/parse.y 2014-09-26 13:07:31.956080056 -0700
@@ -2503,6 +2503,8 @@
FREE (word_desc_to_read);
word_desc_to_read = (WORD_DESC *)NULL;
+ eol_ungetc_lookahead = 0;
+
last_read_token = '\n';
token_to_read = '\n';
}

View File

@@ -0,0 +1,99 @@
bash: Fix for CVE-2014-7186 and CVE-2014-7187
Upstream-Status: Backport {GNU Patch-ID: bash32-055}
Downloaded from: http://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-055
Author: Chet Ramey <chet.ramey@case.edu>
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
BASH PATCH REPORT
=================
Bash-Release: 3.2
Patch-ID: bash32-055
Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
There are two local buffer overflows in parse.y that can cause the shell
to dump core when given many here-documents attached to a single command
or many nested loops.
---
--- a/parse.y 2014-09-27 12:17:16.000000000 -0400
+++ b/parse.y 2014-09-30 19:43:22.000000000 -0400
@@ -166,4 +166,7 @@
static int reserved_word_acceptable __P((int));
static int yylex __P((void));
+
+static void push_heredoc __P((REDIRECT *));
+static char *mk_alexpansion __P((char *));
static int alias_expand_token __P((char *));
static int time_command_acceptable __P((void));
@@ -254,5 +257,7 @@
/* Variables to manage the task of reading here documents, because we need to
defer the reading until after a complete command has been collected. */
-static REDIRECT *redir_stack[10];
+#define HEREDOC_MAX 16
+
+static REDIRECT *redir_stack[HEREDOC_MAX];
int need_here_doc;
@@ -280,5 +285,5 @@
index is decremented after a case, select, or for command is parsed. */
#define MAX_CASE_NEST 128
-static int word_lineno[MAX_CASE_NEST];
+static int word_lineno[MAX_CASE_NEST+1];
static int word_top = -1;
@@ -425,5 +430,5 @@
redir.filename = $2;
$$ = make_redirection (0, r_reading_until, redir);
- redir_stack[need_here_doc++] = $$;
+ push_heredoc ($$);
}
| NUMBER LESS_LESS WORD
@@ -431,5 +436,5 @@
redir.filename = $3;
$$ = make_redirection ($1, r_reading_until, redir);
- redir_stack[need_here_doc++] = $$;
+ push_heredoc ($$);
}
| LESS_LESS_LESS WORD
@@ -488,5 +493,5 @@
$$ = make_redirection
(0, r_deblank_reading_until, redir);
- redir_stack[need_here_doc++] = $$;
+ push_heredoc ($$);
}
| NUMBER LESS_LESS_MINUS WORD
@@ -495,5 +500,5 @@
$$ = make_redirection
($1, r_deblank_reading_until, redir);
- redir_stack[need_here_doc++] = $$;
+ push_heredoc ($$);
}
| GREATER_AND '-'
@@ -2214,4 +2219,19 @@
static int esacs_needed_count;
+static void
+push_heredoc (r)
+ REDIRECT *r;
+{
+ if (need_here_doc >= HEREDOC_MAX)
+ {
+ last_command_exit_value = EX_BADUSAGE;
+ need_here_doc = 0;
+ report_syntax_error (_("maximum here-document count exceeded"));
+ reset_parser ();
+ exit_shell (last_command_exit_value);
+ }
+ redir_stack[need_here_doc++] = r;
+}
+
void
gather_here_documents ()

View File

@@ -0,0 +1,212 @@
Fix for exported function namespace change
Upstream-Status: Backport
Downloaded from: http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-050
Author: Chet Ramey <chet.ramey@case.edu>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
BASH PATCH REPORT
=================
Bash-Release: 4.2
Patch-ID: bash42-050
Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
This patch changes the encoding bash uses for exported functions to avoid
clashes with shell variables and to avoid depending only on an environment
variable's contents to determine whether or not to interpret it as a shell
function.
Patch (apply with `patch -p0'):
*** ../bash-4.2.49/variables.c 2014-09-16 19:35:45.000000000 -0400
--- variables.c 2014-09-27 20:54:00.000000000 -0400
***************
*** 80,83 ****
--- 80,88 ----
#define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0')
+ #define BASHFUNC_PREFIX "BASH_FUNC_"
+ #define BASHFUNC_PREFLEN 10 /* == strlen(BASHFUNC_PREFIX */
+ #define BASHFUNC_SUFFIX "%%"
+ #define BASHFUNC_SUFFLEN 2 /* == strlen(BASHFUNC_SUFFIX) */
+
extern char **environ;
***************
*** 269,273 ****
static void dispose_temporary_env __P((sh_free_func_t *));
! static inline char *mk_env_string __P((const char *, const char *));
static char **make_env_array_from_var_list __P((SHELL_VAR **));
static char **make_var_export_array __P((VAR_CONTEXT *));
--- 274,278 ----
static void dispose_temporary_env __P((sh_free_func_t *));
! static inline char *mk_env_string __P((const char *, const char *, int));
static char **make_env_array_from_var_list __P((SHELL_VAR **));
static char **make_var_export_array __P((VAR_CONTEXT *));
***************
*** 339,357 ****
/* If exported function, define it now. Don't import functions from
the environment in privileged mode. */
! if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
{
string_length = strlen (string);
! temp_string = (char *)xmalloc (3 + string_length + char_index);
! strcpy (temp_string, name);
! temp_string[char_index] = ' ';
! strcpy (temp_string + char_index + 1, string);
/* Don't import function names that are invalid identifiers from the
environment. */
! if (legal_identifier (name))
! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
! if (temp_var = find_function (name))
{
VSETATTR (temp_var, (att_exported|att_imported));
--- 344,373 ----
/* If exported function, define it now. Don't import functions from
the environment in privileged mode. */
! if (privmode == 0 && read_but_dont_execute == 0 &&
! STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) &&
! STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) &&
! STREQN ("() {", string, 4))
{
+ size_t namelen;
+ char *tname; /* desired imported function name */
+
+ namelen = char_index - BASHFUNC_PREFLEN - BASHFUNC_SUFFLEN;
+
+ tname = name + BASHFUNC_PREFLEN; /* start of func name */
+ tname[namelen] = '\0'; /* now tname == func name */
+
string_length = strlen (string);
! temp_string = (char *)xmalloc (namelen + string_length + 2);
! memcpy (temp_string, tname, namelen);
! temp_string[namelen] = ' ';
! memcpy (temp_string + namelen + 1, string, string_length + 1);
/* Don't import function names that are invalid identifiers from the
environment. */
! if (absolute_program (tname) == 0 && (posixly_correct == 0 || legal_identifier (tname)))
! parse_and_execute (temp_string, tname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
! if (temp_var = find_function (tname))
{
VSETATTR (temp_var, (att_exported|att_imported));
***************
*** 359,363 ****
}
else
! report_error (_("error importing function definition for `%s'"), name);
}
#if defined (ARRAY_VARS)
--- 375,382 ----
}
else
! report_error (_("error importing function definition for `%s'"), tname);
!
! /* Restore original suffix */
! tname[namelen] = BASHFUNC_SUFFIX[0];
}
#if defined (ARRAY_VARS)
***************
*** 2538,2542 ****
INVALIDATE_EXPORTSTR (var);
! var->exportstr = mk_env_string (name, value);
array_needs_making = 1;
--- 2557,2561 ----
INVALIDATE_EXPORTSTR (var);
! var->exportstr = mk_env_string (name, value, 0);
array_needs_making = 1;
***************
*** 3390,3408 ****
static inline char *
! mk_env_string (name, value)
const char *name, *value;
{
! int name_len, value_len;
! char *p;
name_len = strlen (name);
value_len = STRLEN (value);
! p = (char *)xmalloc (2 + name_len + value_len);
! strcpy (p, name);
! p[name_len] = '=';
if (value && *value)
! strcpy (p + name_len + 1, value);
else
! p[name_len + 1] = '\0';
return (p);
}
--- 3409,3448 ----
static inline char *
! mk_env_string (name, value, isfunc)
const char *name, *value;
+ int isfunc;
{
! size_t name_len, value_len;
! char *p, *q;
name_len = strlen (name);
value_len = STRLEN (value);
!
! /* If we are exporting a shell function, construct the encoded function
! name. */
! if (isfunc && value)
! {
! p = (char *)xmalloc (BASHFUNC_PREFLEN + name_len + BASHFUNC_SUFFLEN + value_len + 2);
! q = p;
! memcpy (q, BASHFUNC_PREFIX, BASHFUNC_PREFLEN);
! q += BASHFUNC_PREFLEN;
! memcpy (q, name, name_len);
! q += name_len;
! memcpy (q, BASHFUNC_SUFFIX, BASHFUNC_SUFFLEN);
! q += BASHFUNC_SUFFLEN;
! }
! else
! {
! p = (char *)xmalloc (2 + name_len + value_len);
! memcpy (p, name, name_len);
! q = p + name_len;
! }
!
! q[0] = '=';
if (value && *value)
! memcpy (q + 1, value, value_len + 1);
else
! q[1] = '\0';
!
return (p);
}
***************
*** 3490,3494 ****
using the cached exportstr... */
list[list_index] = USE_EXPORTSTR ? savestring (value)
! : mk_env_string (var->name, value);
if (USE_EXPORTSTR == 0)
--- 3530,3534 ----
using the cached exportstr... */
list[list_index] = USE_EXPORTSTR ? savestring (value)
! : mk_env_string (var->name, value, function_p (var));
if (USE_EXPORTSTR == 0)

View File

@@ -0,0 +1,95 @@
Fix CVE-2014-6271, aka ShellShock. This is the upstream 4.2 patchlevel 48, minus the hunk to
set the patch level.
Upstream-Status: Backport
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
BASH PATCH REPORT
=================
Bash-Release: 4.2
Patch-ID: bash42-048
Bug-Reported-by: Stephane Chazelas <stephane.chazelas@gmail.com>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
Under certain circumstances, bash will execute user code while processing the
environment for exported function definitions.
Patch (apply with `patch -p0'):
*** ../bash-4.2.47/builtins/common.h 2010-05-30 18:31:51.000000000 -0400
--- builtins/common.h 2014-09-16 19:35:45.000000000 -0400
***************
*** 36,39 ****
--- 36,41 ----
/* Flags for describe_command, shared between type.def and command.def */
+ #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */
+ #define SEVAL_ONECMD 0x100 /* only allow a single command */
#define CDESC_ALL 0x001 /* type -a */
#define CDESC_SHORTDESC 0x002 /* command -V */
*** ../bash-4.2.47/builtins/evalstring.c 2010-11-23 08:22:15.000000000 -0500
--- builtins/evalstring.c 2014-09-16 19:35:45.000000000 -0400
***************
*** 262,265 ****
--- 262,273 ----
struct fd_bitmap *bitmap;
+ if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
+ {
+ internal_warning ("%s: ignoring function definition attempt", from_file);
+ should_jump_to_top_level = 0;
+ last_result = last_command_exit_value = EX_BADUSAGE;
+ break;
+ }
+
bitmap = new_fd_bitmap (FD_BITMAP_SIZE);
begin_unwind_frame ("pe_dispose");
***************
*** 322,325 ****
--- 330,336 ----
dispose_fd_bitmap (bitmap);
discard_unwind_frame ("pe_dispose");
+
+ if (flags & SEVAL_ONECMD)
+ break;
}
}
*** ../bash-4.2.47/variables.c 2011-03-01 16:15:20.000000000 -0500
--- variables.c 2014-09-16 19:35:45.000000000 -0400
***************
*** 348,357 ****
strcpy (temp_string + char_index + 1, string);
! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST);
!
! /* Ancient backwards compatibility. Old versions of bash exported
! functions like name()=() {...} */
! if (name[char_index - 1] == ')' && name[char_index - 2] == '(')
! name[char_index - 2] = '\0';
if (temp_var = find_function (name))
--- 348,355 ----
strcpy (temp_string + char_index + 1, string);
! /* Don't import function names that are invalid identifiers from the
! environment. */
! if (legal_identifier (name))
! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
if (temp_var = find_function (name))
***************
*** 362,369 ****
else
report_error (_("error importing function definition for `%s'"), name);
-
- /* ( */
- if (name[char_index - 1] == ')' && name[char_index - 2] == '\0')
- name[char_index - 2] = '('; /* ) */
}
#if defined (ARRAY_VARS)
--- 360,363 ----

View File

@@ -0,0 +1,44 @@
bash: Fix CVE-2014-6277 (shellshock)
Upstream-status: backport
Downloaded from:
ftp://ftp.gnu.org/pub/bash/bash-4.3-patches/bash43-029
Author: Chet Ramey <chet.ramey@case.edu>
Signed-off-by: Catalin Popeanga <catalin.popeanga@enea.com>
BASH PATCH REPORT
=================
Bash-Release: 4.3
Patch-ID: bash43-029
Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
When bash is parsing a function definition that contains a here-document
delimited by end-of-file (or end-of-string), it leaves the closing delimiter
uninitialized. This can result in an invalid memory access when the parsed
function is later copied.
---
--- a/make_cmd.c 2011-12-16 08:08:01.000000000 -0500
+++ b/make_cmd.c 2014-10-02 11:24:23.000000000 -0400
@@ -693,4 +693,5 @@
temp->redirector = source;
temp->redirectee = dest_and_filename;
+ temp->here_doc_eof = 0;
temp->instruction = instruction;
temp->flags = 0;
--- a/copy_cmd.c 2009-09-11 16:28:02.000000000 -0400
+++ b/copy_cmd.c 2014-10-02 11:24:23.000000000 -0400
@@ -127,5 +127,5 @@
case r_reading_until:
case r_deblank_reading_until:
- new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
+ new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
/*FALLTHROUGH*/
case r_reading_string:

View File

@@ -0,0 +1,127 @@
bash: Fix CVE-2014-6278 (shellshock)
Upstream-status: backport
Downloaded from:
http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-053
Author: Chet Ramey <chet.ramey@case.edu>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
BASH PATCH REPORT
=================
Bash-Release: 4.2
Patch-ID: bash42-053
Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
A combination of nested command substitutions and function importing from
the environment can cause bash to execute code appearing in the environment
variable value following the function definition.
Patch (apply with `patch -p0'):
*** ../bash-4.2.52/builtins/evalstring.c 2014-09-16 19:35:45.000000000 -0400
--- builtins/evalstring.c 2014-10-04 15:00:26.000000000 -0400
***************
*** 262,271 ****
struct fd_bitmap *bitmap;
! if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
{
! internal_warning ("%s: ignoring function definition attempt", from_file);
! should_jump_to_top_level = 0;
! last_result = last_command_exit_value = EX_BADUSAGE;
! break;
}
--- 262,284 ----
struct fd_bitmap *bitmap;
! if (flags & SEVAL_FUNCDEF)
{
! char *x;
!
! /* If the command parses to something other than a straight
! function definition, or if we have not consumed the entire
! string, or if the parser has transformed the function
! name (as parsing will if it begins or ends with shell
! whitespace, for example), reject the attempt */
! if (command->type != cm_function_def ||
! ((x = parser_remaining_input ()) && *x) ||
! (STREQ (from_file, command->value.Function_def->name->word) == 0))
! {
! internal_warning (_("%s: ignoring function definition attempt"), from_file);
! should_jump_to_top_level = 0;
! last_result = last_command_exit_value = EX_BADUSAGE;
! reset_parser ();
! break;
! }
}
***************
*** 332,336 ****
if (flags & SEVAL_ONECMD)
! break;
}
}
--- 345,352 ----
if (flags & SEVAL_ONECMD)
! {
! reset_parser ();
! break;
! }
}
}
*** ../bash-4.2.52/parse.y 2014-09-30 19:24:19.000000000 -0400
--- parse.y 2014-10-04 15:00:26.000000000 -0400
***************
*** 2436,2439 ****
--- 2436,2449 ----
}
+ char *
+ parser_remaining_input ()
+ {
+ if (shell_input_line == 0)
+ return 0;
+ if (shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len)
+ return '\0'; /* XXX */
+ return (shell_input_line + shell_input_line_index);
+ }
+
#ifdef INCLUDE_UNUSED
/* Back the input pointer up by one, effectively `ungetting' a character. */
***************
*** 3891,3896 ****
/* reset_parser clears shell_input_line and associated variables */
restore_input_line_state (&ls);
! if (interactive)
! token_to_read = 0;
/* Need to find how many characters parse_and_execute consumed, update
--- 3901,3906 ----
/* reset_parser clears shell_input_line and associated variables */
restore_input_line_state (&ls);
!
! token_to_read = 0;
/* Need to find how many characters parse_and_execute consumed, update
*** ../bash-4.2.52/shell.h 2011-11-21 18:03:32.000000000 -0500
--- shell.h 2014-10-04 15:00:26.000000000 -0400
***************
*** 178,181 ****
--- 178,183 ----
/* Let's try declaring these here. */
+ extern char *parser_remaining_input __P((void));
+
extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *));
extern void restore_parser_state __P((sh_parser_state_t *));

View File

@@ -0,0 +1,16 @@
Taken from http://www.openwall.com/lists/oss-security/2016/09/25/10
Upstream-Status: Backport
Index: bash-4.3/parse.y
===================================================================
--- bash-4.3.orig/parse.y 2014-09-26 13:10:44.340080056 -0700
+++ bash-4.3/parse.y 2014-09-26 13:11:44.764080056 -0700
@@ -2953,6 +2953,8 @@
FREE (word_desc_to_read);
word_desc_to_read = (WORD_DESC *)NULL;
+ eol_ungetc_lookahead = 0;
+
current_token = '\n'; /* XXX */
last_read_token = '\n';
token_to_read = '\n';

View File

@@ -0,0 +1,167 @@
bash: Fix for CVE-2014-7186 and CVE-2014-7187
Upstream-Status: Backport {GNU Patch-ID: bash42-051}
Downloaded from: http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-051
Author: Chet Ramey <chet.ramey@case.edu>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
BASH PATCH REPORT
=================
Bash-Release: 4.2
Patch-ID: bash42-051
Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
There are two local buffer overflows in parse.y that can cause the shell
to dump core when given many here-documents attached to a single command
or many nested loops.
Patch (apply with `patch -p0'):
*** ../bash-4.2.50/parse.y 2014-09-27 12:18:53.000000000 -0400
--- parse.y 2014-09-30 19:24:19.000000000 -0400
***************
*** 168,171 ****
--- 168,174 ----
static int reserved_word_acceptable __P((int));
static int yylex __P((void));
+
+ static void push_heredoc __P((REDIRECT *));
+ static char *mk_alexpansion __P((char *));
static int alias_expand_token __P((char *));
static int time_command_acceptable __P((void));
***************
*** 265,269 ****
/* Variables to manage the task of reading here documents, because we need to
defer the reading until after a complete command has been collected. */
! static REDIRECT *redir_stack[10];
int need_here_doc;
--- 268,274 ----
/* Variables to manage the task of reading here documents, because we need to
defer the reading until after a complete command has been collected. */
! #define HEREDOC_MAX 16
!
! static REDIRECT *redir_stack[HEREDOC_MAX];
int need_here_doc;
***************
*** 307,311 ****
index is decremented after a case, select, or for command is parsed. */
#define MAX_CASE_NEST 128
! static int word_lineno[MAX_CASE_NEST];
static int word_top = -1;
--- 312,316 ----
index is decremented after a case, select, or for command is parsed. */
#define MAX_CASE_NEST 128
! static int word_lineno[MAX_CASE_NEST+1];
static int word_top = -1;
***************
*** 520,524 ****
redir.filename = $2;
$$ = make_redirection (source, r_reading_until, redir, 0);
! redir_stack[need_here_doc++] = $$;
}
| NUMBER LESS_LESS WORD
--- 525,529 ----
redir.filename = $2;
$$ = make_redirection (source, r_reading_until, redir, 0);
! push_heredoc ($$);
}
| NUMBER LESS_LESS WORD
***************
*** 527,531 ****
redir.filename = $3;
$$ = make_redirection (source, r_reading_until, redir, 0);
! redir_stack[need_here_doc++] = $$;
}
| REDIR_WORD LESS_LESS WORD
--- 532,536 ----
redir.filename = $3;
$$ = make_redirection (source, r_reading_until, redir, 0);
! push_heredoc ($$);
}
| REDIR_WORD LESS_LESS WORD
***************
*** 534,538 ****
redir.filename = $3;
$$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
! redir_stack[need_here_doc++] = $$;
}
| LESS_LESS_MINUS WORD
--- 539,543 ----
redir.filename = $3;
$$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
! push_heredoc ($$);
}
| LESS_LESS_MINUS WORD
***************
*** 541,545 ****
redir.filename = $2;
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
! redir_stack[need_here_doc++] = $$;
}
| NUMBER LESS_LESS_MINUS WORD
--- 546,550 ----
redir.filename = $2;
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
! push_heredoc ($$);
}
| NUMBER LESS_LESS_MINUS WORD
***************
*** 548,552 ****
redir.filename = $3;
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
! redir_stack[need_here_doc++] = $$;
}
| REDIR_WORD LESS_LESS_MINUS WORD
--- 553,557 ----
redir.filename = $3;
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
! push_heredoc ($$);
}
| REDIR_WORD LESS_LESS_MINUS WORD
***************
*** 555,559 ****
redir.filename = $3;
$$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
! redir_stack[need_here_doc++] = $$;
}
| LESS_LESS_LESS WORD
--- 560,564 ----
redir.filename = $3;
$$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
! push_heredoc ($$);
}
| LESS_LESS_LESS WORD
***************
*** 2534,2537 ****
--- 2539,2557 ----
static int esacs_needed_count;
+ static void
+ push_heredoc (r)
+ REDIRECT *r;
+ {
+ if (need_here_doc >= HEREDOC_MAX)
+ {
+ last_command_exit_value = EX_BADUSAGE;
+ need_here_doc = 0;
+ report_syntax_error (_("maximum here-document count exceeded"));
+ reset_parser ();
+ exit_shell (last_command_exit_value);
+ }
+ redir_stack[need_here_doc++] = r;
+ }
+
void
gather_here_documents ()

View File

@@ -10,6 +10,12 @@ SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch002 \
${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch003 \
file://mkbuiltins_have_stringize.patch \
file://cve-2014-6271.patch;striplevel=0 \
file://cve-2014-7169.patch \
file://Fix-for-bash-exported-function-namespace-change.patch \
file://cve-2014-7186_cve-2014-7187.patch \
file://cve-2014-6277.patch \
file://cve-2014-6278.patch \
"
SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"

View File

@@ -19,8 +19,14 @@ SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-010;apply=yes;striplevel=0;name=patch010 \
file://execute_cmd.patch;striplevel=0 \
file://mkbuiltins_have_stringize.patch \
file://cve-2014-6271.patch;striplevel=0 \
file://cve-2014-7169.patch \
file://build-tests.patch \
file://test-output.patch \
file://Fix-for-bash-exported-function-namespace-change.patch;striplevel=0 \
file://cve-2014-7186_cve-2014-7187.patch;striplevel=0 \
file://cve-2014-6277.patch \
file://cve-2014-6278.patch;striplevel=0 \
file://run-ptest \
"

View File

@@ -0,0 +1,53 @@
From 33cba24cba7b0973a702e9627bd5b93962948ae4 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 17 Sep 2013 16:11:16 +0800
Subject: [PATCH] findutils: fix doc build error
Upstream-Status: Backport
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
doc/find.texi | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/find.texi b/doc/find.texi
index 5b5f0cf..b3d9c6b 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -63,7 +63,7 @@ translation approved by the Foundation.
@page
@vskip 0pt plus 1filll
-@insertcopying{}
+@insertcopying
@end titlepage
@contents
@@ -1466,6 +1466,7 @@ no output is ever sent to it.
* Escapes::
* Format Directives::
* Time Formats::
+* Formatting Flags::
@end menu
@node Escapes
@@ -1534,7 +1535,6 @@ from the novel you are reading.
* Size Directives::
* Location Directives::
* Time Directives::
-* Formatting Flags::
@end menu
@node Name Directives
@@ -1780,7 +1780,7 @@ setting the TZ environment variable). This is a GNU extension.
@end table
@node Formatting Flags
-@subsubsection Formatting Flags
+@subsection Formatting Flags
The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0}
and @samp{+} flags, but the other directives do not, even if they
--
1.7.4.1

View File

@@ -6,6 +6,7 @@ require findutils.inc
SRC_URI += "file://gnulib-extension.patch \
file://findutils_fix_for_automake-1.12.patch \
file://findutils-fix-doc-build-error.patch \
"
SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a"

View File

@@ -0,0 +1,13 @@
Index: grep-2.5.1a/doc/grep.texi
===================================================================
--- grep-2.5.1a.orig/doc/grep.texi
+++ grep-2.5.1a/doc/grep.texi
@@ -288,7 +288,7 @@ This version number should be included i
Print a usage message briefly summarizing these command-line options
and the bug-reporting address, then exit.
-@itemx --binary-files=@var{type}
+@item --binary-files=@var{type}
@opindex --binary-files
@cindex binary files
If the first few bytes of a file indicate that the file contains binary

View File

@@ -14,6 +14,7 @@ SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
file://fix64-int-to-pointer.patch \
file://Makevars \
file://grep-CVE-2012-5667.patch \
file://fix-for-texinfo-5.1.patch \
"
SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c"

View File

@@ -272,7 +272,7 @@ then
fi
if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then
if [ ${ARCH} == i686 ];then
if [ ${ARCH} = i686 ];then
echo "i486-suse" >> ${PLATFORM_FILE}
echo "i486-noarch" >> ${PLATFORM_FILE}
echo "i486-pc" >> ${PLATFORM_FILE}

View File

@@ -19,15 +19,15 @@ do_install() {
install -d ${D}/opt/lsb-test
install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
install -m 0644 ${S}/session ${D}/opt/lsb-test/session
if [ "${TARGET_ARCH}" == "i586" ];then
if [ "${TARGET_ARCH}" = "i586" ];then
sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list
sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session
fi
if [ "${TARGET_ARCH}" == "x86_64" ];then
if [ "${TARGET_ARCH}" = "x86_64" ];then
sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list
sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session
fi
if [ "${TARGET_ARCH}" == "powerpc" ];then
if [ "${TARGET_ARCH}" = "powerpc" ];then
sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list
sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session
fi

View File

@@ -20,6 +20,28 @@ EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-
FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
do_install_append () {
sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
}
PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
DESCRIPTION_${BPN}-helpers-perl = "Midnight Commander perl based helper scripts"
FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
${libexecdir}/mc/extfs.d/uzip"
RDEPENDS_${BPN}-helpers-perl = "perl"
DESCRIPTION_${BPN}-helpers-python = "Midnight Commander python based helper scripts"
FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
RDEPENDS_${BPN}-helpers-python = "python"
DESCRIPTION_${BPN}-helpers = "Midnight Commander shell helper scripts"
FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
DESCRIPTION_${BPN}-fish = "Midnight Commander Fish scripts"
FILES_${BPN}-fish = "${libexecdir}/mc/fish"

View File

@@ -21,5 +21,26 @@ FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
do_install_append () {
sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
rm -rf ${D}${libdir}
sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
}
PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
DESCRIPTION_${BPN}-helpers-perl = "Midnight Commander perl based helper scripts"
FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
${libexecdir}/mc/extfs.d/uzip"
RDEPENDS_${BPN}-helpers-perl = "perl"
DESCRIPTION_${BPN}-helpers-python = "Midnight Commander python based helper scripts"
FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
RDEPENDS_${BPN}-helpers-python = "python"
DESCRIPTION_${BPN}-helpers = "Midnight Commander shell helper scripts"
FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
DESCRIPTION_${BPN}-fish = "Midnight Commander Fish scripts"
FILES_${BPN}-fish = "${libexecdir}/mc/fish"

View File

@@ -0,0 +1,65 @@
From 9f5d83706543696fc944c1835a403938c06f2cc5 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat, 02 Mar 2013 04:54:24 +0000
Subject: Add _XEatDataWords to discard a given number of 32-bit words of reply data
Matches the units of the length field in X protocol replies, and provides
a single implementation of overflow checking to avoid having to replicate
those checks in every caller.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Upstream-Status: Backport
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
index 06395b3..d63a534 100644
--- a/include/X11/Xlibint.h
+++ b/include/X11/Xlibint.h
@@ -855,6 +855,10 @@ extern void _XEatData(
Display* /* dpy */,
unsigned long /* n */
);
+extern void _XEatDataWords(
+ Display* /* dpy */,
+ unsigned long /* n */
+);
extern char *_XAllocScratch(
Display* /* dpy */,
unsigned long /* nbytes */
diff --git a/src/xcb_io.c b/src/xcb_io.c
index 300ef57..727c6c7 100644
--- a/src/xcb_io.c
+++ b/src/xcb_io.c
@@ -19,6 +19,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
@@ -757,3 +758,19 @@ void _XEatData(Display *dpy, unsigned long n)
dpy->xcb->reply_consumed += n;
_XFreeReplyData(dpy, False);
}
+
+/*
+ * Read and discard "n" 32-bit words of data
+ * Matches the units of the length field in X protocol replies, and provides
+ * a single implementation of overflow checking to avoid having to replicate
+ * those checks in every caller.
+ */
+void _XEatDataWords(Display *dpy, unsigned long n)
+{
+ if (n < ((INT_MAX - dpy->xcb->reply_consumed) >> 2))
+ dpy->xcb->reply_consumed += (n << 2);
+ else
+ /* Overflow would happen, so just eat the rest of the reply */
+ dpy->xcb->reply_consumed = dpy->xcb->reply_length;
+ _XFreeReplyData(dpy, False);
+}
--
cgit v0.9.0.2-2-gbebe

View File

@@ -7,6 +7,7 @@ BBCLASSEXTEND = "native nativesdk"
SRC_URI += "file://keysymdef_include.patch \
file://disable_tests.patch \
file://xeatdatawords.patch \
"
SRC_URI[md5sum] = "78b4b3bab4acbdf0abcfca30a8c70cc6"

Some files were not shown because too many files have changed in this diff Show More