mirror of
https://git.yoctoproject.org/poky
synced 2026-02-21 17:09:42 +01:00
Compare commits
77 Commits
yocto-1.6.
...
yocto-1.6.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3dd621197 | ||
|
|
30b8d9378b | ||
|
|
895c86d71d | ||
|
|
07a7905689 | ||
|
|
e76d790bbf | ||
|
|
b60383c1b9 | ||
|
|
19dc8bf950 | ||
|
|
6c576a4ac8 | ||
|
|
9f5ea81070 | ||
|
|
51a5a5df84 | ||
|
|
6c9eb8a67a | ||
|
|
b8e521809b | ||
|
|
994b637d58 | ||
|
|
a85328245d | ||
|
|
61da1b1197 | ||
|
|
3428e70035 | ||
|
|
dbf99ab134 | ||
|
|
18d859a8c9 | ||
|
|
313864bf52 | ||
|
|
e93f9a8382 | ||
|
|
df4a397df9 | ||
|
|
9b3389e023 | ||
|
|
4b22a21b4e | ||
|
|
27a877becf | ||
|
|
2d5bd89565 | ||
|
|
bda51ee782 | ||
|
|
5dd12beccd | ||
|
|
1d21eaf4e0 | ||
|
|
95821e8566 | ||
|
|
57138de0fc | ||
|
|
57a806cc32 | ||
|
|
452619ba41 | ||
|
|
8d28013312 | ||
|
|
570345adfd | ||
|
|
9062377624 | ||
|
|
0143097095 | ||
|
|
4b1b580749 | ||
|
|
65ed47e597 | ||
|
|
608ac7794f | ||
|
|
4dada3c092 | ||
|
|
43903a5bfd | ||
|
|
e464615684 | ||
|
|
7a12eda785 | ||
|
|
d88fa68141 | ||
|
|
3a93bfe1c7 | ||
|
|
9fee4d138b | ||
|
|
87e924e377 | ||
|
|
8de7e102cf | ||
|
|
6780f20525 | ||
|
|
1d04721fe8 | ||
|
|
a4d8015687 | ||
|
|
7b57145498 | ||
|
|
38b1b68923 | ||
|
|
ec3c8fcf81 | ||
|
|
b2f045c400 | ||
|
|
87671f72e7 | ||
|
|
b028947d67 | ||
|
|
f5847d4f24 | ||
|
|
59198004c0 | ||
|
|
984be33145 | ||
|
|
96ee64c96b | ||
|
|
7a8f9114bc | ||
|
|
21ac977e2a | ||
|
|
33a4425d6d | ||
|
|
8abf510a13 | ||
|
|
3ff30c0bfb | ||
|
|
7e68f57dec | ||
|
|
3b998b3f4c | ||
|
|
d8155f1f95 | ||
|
|
e378410fb2 | ||
|
|
3a1d9e9e11 | ||
|
|
26dcc54c60 | ||
|
|
8e05d5e3fe | ||
|
|
5c1f10f56e | ||
|
|
0843e07873 | ||
|
|
793afb3e81 | ||
|
|
aebbf8c8f3 |
@@ -35,7 +35,7 @@ def check_indent(codestr):
|
||||
|
||||
class CodeParserCache(MultiProcessCache):
|
||||
cache_file_name = "bb_codeparser.dat"
|
||||
CACHE_VERSION = 4
|
||||
CACHE_VERSION = 6
|
||||
|
||||
def __init__(self):
|
||||
MultiProcessCache.__init__(self)
|
||||
@@ -102,7 +102,7 @@ class BufferedLogger(Logger):
|
||||
self.buffer = []
|
||||
|
||||
class PythonParser():
|
||||
getvars = ("d.getVar", "bb.data.getVar", "data.getVar", "d.appendVar", "d.prependVar")
|
||||
getvars = (".getVar", ".appendVar", ".prependVar")
|
||||
containsfuncs = ("bb.utils.contains", "base_contains", "oe.utils.contains")
|
||||
execfuncs = ("bb.build.exec_func", "bb.build.exec_task")
|
||||
|
||||
@@ -122,7 +122,7 @@ class PythonParser():
|
||||
|
||||
def visit_Call(self, node):
|
||||
name = self.called_node_name(node.func)
|
||||
if name in self.getvars or name in self.containsfuncs:
|
||||
if name and name.endswith(self.getvars) or name in self.containsfuncs:
|
||||
if isinstance(node.args[0], ast.Str):
|
||||
varname = node.args[0].s
|
||||
if name in self.containsfuncs and isinstance(node.args[1], ast.Str):
|
||||
@@ -217,6 +217,15 @@ class ShellParser():
|
||||
self.execs = codeparsercache.shellcacheextras[h]["execs"]
|
||||
return self.execs
|
||||
|
||||
self._parse_shell(value)
|
||||
self.execs = set(cmd for cmd in self.allexecs if cmd not in self.funcdefs)
|
||||
|
||||
codeparsercache.shellcacheextras[h] = {}
|
||||
codeparsercache.shellcacheextras[h]["execs"] = self.execs
|
||||
|
||||
return self.execs
|
||||
|
||||
def _parse_shell(self, value):
|
||||
try:
|
||||
tokens, _ = pyshyacc.parse(value, eof=True, debug=False)
|
||||
except pyshlex.NeedMore:
|
||||
@@ -224,12 +233,6 @@ class ShellParser():
|
||||
|
||||
for token in tokens:
|
||||
self.process_tokens(token)
|
||||
self.execs = set(cmd for cmd in self.allexecs if cmd not in self.funcdefs)
|
||||
|
||||
codeparsercache.shellcacheextras[h] = {}
|
||||
codeparsercache.shellcacheextras[h]["execs"] = self.execs
|
||||
|
||||
return self.execs
|
||||
|
||||
def process_tokens(self, tokens):
|
||||
"""Process a supplied portion of the syntax tree as returned by
|
||||
@@ -303,7 +306,7 @@ class ShellParser():
|
||||
|
||||
if part[0] in ('`', '$('):
|
||||
command = pyshlex.wordtree_as_string(part[1:-1])
|
||||
self.parse_shell(command)
|
||||
self._parse_shell(command)
|
||||
|
||||
if word[0] in ("cmd_name", "cmd_word"):
|
||||
if word in words:
|
||||
@@ -322,7 +325,7 @@ class ShellParser():
|
||||
self.log.debug(1, self.unhandled_template % cmd)
|
||||
elif cmd == "eval":
|
||||
command = " ".join(word for _, word in words[1:])
|
||||
self.parse_shell(command)
|
||||
self._parse_shell(command)
|
||||
else:
|
||||
self.allexecs.add(cmd)
|
||||
break
|
||||
|
||||
@@ -81,6 +81,11 @@
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.1 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.6.2</revnumber>
|
||||
<date>November 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.2 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -93,6 +93,11 @@
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.1 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.6.2</revnumber>
|
||||
<date>November 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.2 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -3577,32 +3577,227 @@
|
||||
<title>Making Images More Secure</title>
|
||||
|
||||
<para>
|
||||
The Yocto Project has security flags that you can enable that
|
||||
help make your build output more secure.
|
||||
The security flags are in the
|
||||
<filename>meta/conf/distro/include/security_flags.inc</filename>
|
||||
file in your
|
||||
<link linkend='source-directory'>Source Directory</link>
|
||||
(e.g. <filename>poky</filename>).
|
||||
Security is of increasing concern for embedded devices.
|
||||
Consider the issues and problems discussed in just this
|
||||
sampling of work found across the Internet:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>
|
||||
"<ulink url='https://www.schneier.com/blog/archives/2014/01/security_risks_9.html'>Security Risks of Embedded Systems</ulink>"</emphasis>
|
||||
by Bruce Schneier
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
"<ulink url='http://internetcensus2012.bitbucket.org/paper.html'>Internet Census 2012</ulink>"</emphasis>
|
||||
by Carna Botnet</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
"<ulink url='http://elinux.org/images/6/6f/Security-issues.pdf'>Security Issues for Embedded Devices</ulink>"</emphasis>
|
||||
by Jake Edge
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
"<ulink url='https://www.nccgroup.com/media/18475/exploiting_security_gateways_via_their_web_interfaces.pdf'>They ought to know better: Exploiting Security
|
||||
Gateways via their Web Interfaces</ulink>"</emphasis>
|
||||
by Ben Williams
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These GCC/LD flags enable more secure code generation.
|
||||
By including the <filename>security_flags.inc</filename>
|
||||
file, you enable flags to the compiler and linker that cause
|
||||
them to generate more secure code.
|
||||
When securing your image is of concern, there are steps, tools,
|
||||
and variables that you can consider to help you reach the
|
||||
security goals you need for your particular device.
|
||||
Not all situations are identical when it comes to making an
|
||||
image secure.
|
||||
Consequently, this section provides some guidance and suggestions
|
||||
for consideration when you want to make your image more secure.
|
||||
<note>
|
||||
These flags are enabled by default in the
|
||||
<filename>poky-lsb</filename> distribution.
|
||||
Because the security requirements and risks are
|
||||
different for every type of device, this section cannot
|
||||
provide a complete reference on securing your custom OS.
|
||||
It is strongly recommended that you also consult other sources
|
||||
of information on embedded Linux system hardening and on
|
||||
security.
|
||||
</note>
|
||||
Use the following line in your
|
||||
<filename>local.conf</filename> file
|
||||
to enable the security compiler and
|
||||
linker flags to your build:
|
||||
<literallayout class='monospaced'>
|
||||
require conf/distro/include/security_flags.inc
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<section id='general-considerations'>
|
||||
<title>General Considerations</title>
|
||||
|
||||
<para>
|
||||
General considerations exist that help you create more
|
||||
secure images.
|
||||
You should consider the following suggestions to help
|
||||
make your device more secure:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Scan additional code you are adding to the system
|
||||
(e.g. application code) by using static analysis
|
||||
tools.
|
||||
Look for buffer overflows and other potential
|
||||
security problems.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Pay particular attention to to the security for
|
||||
any web-based administration interface.
|
||||
</para>
|
||||
<para>Web interfaces typically need to perform
|
||||
administrative functions and tend to need to run with
|
||||
elevated privileges.
|
||||
Thus, the consequences resulting from the interface's
|
||||
security becoming compromised can be serious.
|
||||
Look for common web vulnerabilities such as
|
||||
cross-site-scripting (XSS), unvalidated inputs,
|
||||
and so forth.</para>
|
||||
<para>As with system passwords, the default credentials
|
||||
for accessing a web-based interface should not be the
|
||||
same across all devices.
|
||||
This is particularly true if the interface is enabled
|
||||
by default as it can be assumed that many end-users
|
||||
will not change the credentials.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Ensure you can update the software on the device to
|
||||
mitigate vulnerabilities discovered in the future.
|
||||
This consideration especially applies when your
|
||||
device is network-enabled.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Ensure you remove or disable debugging functionality
|
||||
before producing the final image.
|
||||
For information on how to do this, see the
|
||||
"<link linkend='considerations-specific-to-the-openembedded-build-system'>Considerations Specific to the OpenEmbedded Build System</link>"
|
||||
section.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Ensure you have no network services listening that
|
||||
are not needed.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Remove any software from the image that is not needed.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Enable hardware support for secure boot functionality
|
||||
when your device supports this functionality.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='security-flags'>
|
||||
<title>Security Flags</title>
|
||||
|
||||
<para>
|
||||
The Yocto Project has security flags that you can enable that
|
||||
help make your build output more secure.
|
||||
The security flags are in the
|
||||
<filename>meta/conf/distro/include/security_flags.inc</filename>
|
||||
file in your
|
||||
<link linkend='source-directory'>Source Directory</link>
|
||||
(e.g. <filename>poky</filename>).
|
||||
<note>
|
||||
Depending on the recipe, certain security flags are enabled
|
||||
and disabled by default.
|
||||
</note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<!--
|
||||
The GCC/LD flags in <filename>security_flags.inc</filename>
|
||||
enable more secure code generation.
|
||||
By including the <filename>security_flags.inc</filename>
|
||||
file, you enable flags to the compiler and linker that cause
|
||||
them to generate more secure code.
|
||||
<note>
|
||||
The GCC/LD flags are enabled by default in the
|
||||
<filename>poky-lsb</filename> distribution.
|
||||
</note>
|
||||
-->
|
||||
Use the following line in your
|
||||
<filename>local.conf</filename> file or in your custom
|
||||
distribution configuration file to enable the security
|
||||
compiler and linker flags to your build:
|
||||
<literallayout class='monospaced'>
|
||||
require conf/distro/include/security_flags.inc
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='considerations-specific-to-the-openembedded-build-system'>
|
||||
<title>Considerations Specific to the OpenEmbedded Build System</title>
|
||||
|
||||
<para>
|
||||
You can take some steps that are specific to the
|
||||
OpenEmbedded build system to make your images more secure:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Ensure "debug-tweaks" is not listed with
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>.
|
||||
The default is to enable "debug-tweaks" by adding it
|
||||
to
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
|
||||
in <filename>local.conf</filename>.
|
||||
However, you should comment out the variable or be
|
||||
sure that it does not have "debug-tweaks" before
|
||||
producing your final image.
|
||||
Among other things, leaving this in place sets the
|
||||
root password as blank, which makes logging in for
|
||||
debugging or inspection easy during
|
||||
development but also means anyone can easily log in
|
||||
during production.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
It is possible to set a root password for the image
|
||||
and also to set passwords for any extra users you might
|
||||
add (e.g. administrative or service type users).
|
||||
When you set up passwords for multiple images or
|
||||
users, you should not duplicate passwords.
|
||||
</para>
|
||||
<para>
|
||||
To set up passwords, use the
|
||||
<filename>extrausers</filename> class, which is the
|
||||
preferred method.
|
||||
For an example on how to set up both root and user
|
||||
passwords, see the
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-extrausers'><filename>extrausers.bbclass</filename></ulink>"
|
||||
section.
|
||||
<note>
|
||||
When adding extra user accounts or setting a
|
||||
root password, be cautious about setting the
|
||||
same password on every device.
|
||||
If you do this, and the password you have set
|
||||
is exposed, then every device is now potentially
|
||||
compromised.
|
||||
If you need this access but want to ensure
|
||||
security, consider setting a different,
|
||||
random password for each device.
|
||||
Typically, you do this as a separate step after
|
||||
you deploy the image onto the device.
|
||||
</note>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Consider enabling a Mandatory Access Control (MAC)
|
||||
framework (such as SMACK or SELinux) and tuning it
|
||||
appropriately for your device's usage.
|
||||
You can find more information in the
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/'><filename>meta-selinux</filename></ulink>
|
||||
layer.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='tools-for-hardening-your-image'>
|
||||
<title>Tools for Hardening Your Image</title>
|
||||
|
||||
<para>
|
||||
The Yocto Project provides tools for making your image
|
||||
more secure.
|
||||
You can find these tools in the
|
||||
<filename>meta-security</filename> layer of the
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'>Yocto Project Source Repositories</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='creating-your-own-distribution'>
|
||||
|
||||
@@ -71,6 +71,11 @@
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.1 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.6.2</revnumber>
|
||||
<date>November 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.2 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.1 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.6.2</revnumber>
|
||||
<date>November 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.2 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<!ENTITY DISTRO "1.6.1">
|
||||
<!ENTITY DISTRO_COMPRESSED "161">
|
||||
<!ENTITY DISTRO "1.6.2">
|
||||
<!ENTITY DISTRO_COMPRESSED "162">
|
||||
<!ENTITY DISTRO_NAME "daisy">
|
||||
<!ENTITY YOCTO_DOC_VERSION "1.6.1">
|
||||
<!ENTITY POKYVERSION "11.0.1">
|
||||
<!ENTITY POKYVERSION_COMPRESSED "1101">
|
||||
<!ENTITY YOCTO_DOC_VERSION "1.6.2">
|
||||
<!ENTITY POKYVERSION "11.0.2">
|
||||
<!ENTITY POKYVERSION_COMPRESSED "1102">
|
||||
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
||||
<!ENTITY COPYRIGHT_YEAR "2010-2014">
|
||||
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
|
||||
@@ -14,7 +14,7 @@
|
||||
<!ENTITY YOCTO_AB_URL "http://autobuilder.yoctoproject.org">
|
||||
<!ENTITY YOCTO_GIT_URL "http://git.yoctoproject.org">
|
||||
<!ENTITY YOCTO_ADTREPO_URL "http://adtrepo.yoctoproject.org">
|
||||
<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/download/yocto-project-&DISTRO_COMPRESSED;-poky-&POKYVERSION_COMPRESSED;">
|
||||
<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/downloads/core/&DISTRO_NAME;&DISTRO_COMPRESSED;">
|
||||
<!ENTITY OE_HOME_URL "http://www.openembedded.org">
|
||||
<!ENTITY OE_LISTS_URL "http://lists.openembedded.org/mailman">
|
||||
<!ENTITY OE_DOCS_URL "http://docs.openembedded.org">
|
||||
|
||||
@@ -842,7 +842,7 @@
|
||||
idea. One of the first projects to do this was IBM's DProbes
|
||||
dpcc compiler, an ANSI C compiler which targeted a low-level
|
||||
assembly language running on an in-kernel interpreter on the
|
||||
target system. This is exactly analagous to what Sun's DTrace
|
||||
target system. This is exactly analogous to what Sun's DTrace
|
||||
did, except that DTrace invented its own language for the purpose.
|
||||
Systemtap, heavily inspired by DTrace, also created its own
|
||||
one-off language, but rather than running the product on an
|
||||
@@ -1275,7 +1275,7 @@
|
||||
</para>
|
||||
|
||||
<informalexample>
|
||||
<emphasis>Tying it Together:</emphasis> The trace events subsystem accomodate static
|
||||
<emphasis>Tying it Together:</emphasis> The trace events subsystem accommodate static
|
||||
and dynamic tracepoints in exactly the same way - there's no
|
||||
difference as far as the infrastructure is concerned. See the
|
||||
ftrace section for more details on the trace event subsystem.
|
||||
@@ -3257,15 +3257,25 @@
|
||||
<title>Documentation</title>
|
||||
|
||||
<para>
|
||||
There doesn't seem to be any current documentation covering
|
||||
LTTng 2.0, but maybe that's because the project is in transition.
|
||||
The LTTng 2.0 website, however, is here:
|
||||
<ulink url='http://lttng.org/lttng2.0'>LTTng Project</ulink>
|
||||
You can find the primary LTTng Documentation on the
|
||||
<ulink url='https://lttng.org/docs/'>LTTng Documentation</ulink>
|
||||
site.
|
||||
The documentation on this site is appropriate for intermediate to
|
||||
advanced software developers who are working in a Linux environment
|
||||
and are interested in efficient software tracing.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can access extensive help information on how to use the
|
||||
LTTng plug-in to search and analyze captured traces via the
|
||||
For information on LTTng in general, visit the
|
||||
<ulink url='http://lttng.org/lttng2.0'>LTTng Project</ulink>
|
||||
site.
|
||||
You can find a "Getting Started" link on this site that takes
|
||||
you to an LTTng Quick Start.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Finally, you can access extensive help information on how to use
|
||||
the LTTng plug-in to search and analyze captured traces via the
|
||||
Eclipse help system:
|
||||
<literallayout class='monospaced'>
|
||||
Help | Help Contents | LTTng Plug-in User Guide
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.1 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.6.2</revnumber>
|
||||
<date>November 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.2 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -306,11 +306,17 @@
|
||||
<para>
|
||||
The following list shows the required packages by function
|
||||
given a supported CentOS Linux distribution:
|
||||
<note>Depending on the CentOS version you are using, other requirements
|
||||
and dependencies might exist.
|
||||
For details, you should look at the CentOS sections on the
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
|
||||
wiki page.
|
||||
<note>
|
||||
For CentOS 6.x, some of the versions of the components
|
||||
provided by the distribution are too old (e.g. Git, Python,
|
||||
and tar).
|
||||
It is recommended that you install the buildtools in order
|
||||
to provide versions that will work with the OpenEmbedded
|
||||
build system.
|
||||
For information on how to install the buildtools tarball,
|
||||
see the
|
||||
"<link linkend='required-git-tar-and-python-versions'>Required Git, Tar, and Python Versions</link>"
|
||||
section.
|
||||
</note>
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Essentials:</emphasis>
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.1 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.6.2</revnumber>
|
||||
<date>November 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.6.2 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -63,9 +63,8 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For more information on BitBake, see the BitBake documentation
|
||||
included in the <filename>bitbake/doc/manual</filename> directory of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
For more information on BitBake, see the
|
||||
<ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -2431,9 +2431,8 @@
|
||||
used by the OpenEmbedded build system for creating
|
||||
<link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
|
||||
You can find more information on how overrides are handled
|
||||
in the BitBake Manual that is located at
|
||||
<filename>bitbake/doc/manual</filename> in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
in the
|
||||
<ulink url='&YOCTO_DOCS_BB_URL;'>BitBake Manual</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -5069,9 +5068,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
|
||||
what variables are overridden after BitBake parses
|
||||
recipes and configuration files.
|
||||
You can find more information on how overrides are handled
|
||||
in the BitBake Manual that is located at
|
||||
<filename>bitbake/doc/manual</filename> in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
in the
|
||||
<ulink url='&YOCTO_DOCS_BB_URL;'>BitBake Manual</ulink>.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
@@ -1,14 +1,31 @@
|
||||
# Processes ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.1\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
# Processes poky-ref-manual and yocto-project-qs manual (<word>-<word>-<word> style).
|
||||
# This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
|
||||
# This is the old way that did it. Can't do that now that we have "bitbake-user-manual" strings
|
||||
# in the mega-manual.
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.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.6.2\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.2\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
|
||||
|
||||
# Processes all other manuals (<word>-<word> style)
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.1\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
# Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
|
||||
# it is not included in the mega-manual.
|
||||
# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
|
||||
# This was the one-liner that worked before we introduced the BitBake User Manual, which is
|
||||
# not in the mega-manual.
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.2\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.2\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.2\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.2\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.2\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.2\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.2\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.6.2\/yocto-project-qs\/yocto-project-qs.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.6.1\/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.6.1\/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.6.1\/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.6.1\/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.6.1\/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.6.1\/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.6.1\/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.6.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.6.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.6.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.6.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.6.2\/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.6.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.6.2\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
|
||||
|
||||
@@ -528,7 +528,7 @@
|
||||
<filename>bitbake --help</filename> command, see the
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>"
|
||||
section in the Yocto Project Reference Manual, or see the
|
||||
"<ulink url='&YOCTO_DOCS_BB_URL;#user-manual-command'>BitBake Command</ulink>"
|
||||
"<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-command'>BitBake Command</ulink>"
|
||||
section in the BitBake User Manual.
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake -k core-image-sato
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
DISTRO_VERSION = "1.6.1"
|
||||
DISTRO_VERSION = "1.6.2"
|
||||
DISTRO_CODENAME = "daisy"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION := "${@'${DISTRO_VERSION}'}"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
inherit cross
|
||||
|
||||
CLASSOVERRIDE = "class-crosssdk"
|
||||
MACHINEOVERRIDES = ""
|
||||
PACKAGE_ARCH = "${SDK_ARCH}"
|
||||
python () {
|
||||
# set TUNE_PKGARCH to SDK_ARCH
|
||||
|
||||
@@ -232,7 +232,7 @@ kernel_do_install() {
|
||||
# dir. This ensures the original Makefiles are used and not the
|
||||
# redirecting Makefiles in the build directory.
|
||||
#
|
||||
find . -depth -not -name "*.cmd" -not -name "*.o" -not -path "./Documentation*" -not -path "./source*" -not -path "./.*" -print0 | cpio --null -pdlu $kerneldir
|
||||
find . -depth -not -name "*.cmd" -not -name "*.o" -not -name "*.so.dbg" -not -path "./Documentation*" -not -path "./source*" -not -path "./.*" -print0 | cpio --null -pdlu $kerneldir
|
||||
cp .config $kerneldir
|
||||
if [ "${S}" != "${B}" ]; then
|
||||
pwd="$PWD"
|
||||
|
||||
@@ -104,6 +104,7 @@ PKG_CONFIG_SYSROOT_DIR = ""
|
||||
# we dont want libc-uclibc or libc-glibc to kick in for native recipes
|
||||
LIBCOVERRIDE = ""
|
||||
CLASSOVERRIDE = "class-native"
|
||||
MACHINEOVERRIDES = ""
|
||||
|
||||
PATH_prepend = "${COREBASE}/scripts/native-intercept:"
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
|
||||
NATIVESDKLIBC ?= "libc-glibc"
|
||||
LIBCOVERRIDE = ":${NATIVESDKLIBC}"
|
||||
CLASSOVERRIDE = "class-nativesdk"
|
||||
MACHINEOVERRIDES = ""
|
||||
|
||||
#
|
||||
# Update PACKAGE_ARCH and PACKAGE_ARCHS
|
||||
|
||||
@@ -284,7 +284,7 @@ done
|
||||
|
||||
# find out all perl scripts in $native_sysroot and modify them replacing the
|
||||
# host perl with SDK perl.
|
||||
for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do
|
||||
for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep "^#!.*perl" -l '{}' \;); do
|
||||
$SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
|
||||
"s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
|
||||
done
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
|
||||
|
||||
DEB_SDK_ARCH = "${@[d.getVar('SDK_ARCH', True), "i386"]\
|
||||
[d.getVar('SDK_ARCH', True) in \
|
||||
["x86", "i486", "i586", "i686", "pentium"]]}"
|
||||
python () {
|
||||
# Map TARGET_ARCH to Debian's ideas about architectures
|
||||
darch = d.getVar('SDK_ARCH', True)
|
||||
if darch in ["x86", "i486", "i586", "i686", "pentium"]:
|
||||
d.setVar('DEB_SDK_ARCH', 'i386')
|
||||
elif darch == "x86_64":
|
||||
d.setVar('DEB_SDK_ARCH', 'amd64')
|
||||
elif darch == "arm":
|
||||
d.setVar('DEB_SDK_ARCH', 'armel')
|
||||
}
|
||||
|
||||
DEB_SDK_ARCH = "${@[d.getVar('SDK_ARCH', True), "amd64"]\
|
||||
[d.getVar('SDK_ARCH', True) == "x86_64"]}"
|
||||
|
||||
do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ fi
|
||||
|
||||
|
||||
systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst"
|
||||
systemd_populate_packages[vardepsexclude] += "OVERRIDES"
|
||||
|
||||
python systemd_populate_packages() {
|
||||
if not oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
|
||||
|
||||
@@ -71,6 +71,7 @@ PACKAGESPLITFUNCS_prepend = "populate_packages_updatercd "
|
||||
PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd "
|
||||
|
||||
populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst"
|
||||
populate_packages_updatercd[vardepsexclude] += "OVERRIDES"
|
||||
|
||||
python populate_packages_updatercd () {
|
||||
def update_rcd_auto_depend(pkg):
|
||||
|
||||
@@ -58,7 +58,9 @@ def update_useradd_static_config(d):
|
||||
|
||||
newparams = []
|
||||
for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
|
||||
param=param.strip()
|
||||
param = param.strip()
|
||||
if not param:
|
||||
continue
|
||||
try:
|
||||
uaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
|
||||
except:
|
||||
@@ -194,7 +196,9 @@ def update_useradd_static_config(d):
|
||||
|
||||
newparams = []
|
||||
for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
|
||||
param=param.strip()
|
||||
param = param.strip()
|
||||
if not param:
|
||||
continue
|
||||
try:
|
||||
# If we're processing multiple lines, we could have left over values here...
|
||||
gaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
|
||||
|
||||
@@ -14,6 +14,7 @@ LAYERVERSION_core = "4"
|
||||
# Set a variable to get to the top of the metadata location
|
||||
COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
|
||||
|
||||
# opkg-utils is for update-altnernatives :(
|
||||
SIGGEN_EXCLUDERECIPES_ABISAFE += " \
|
||||
sysvinit-inittab \
|
||||
shadow-securetty \
|
||||
@@ -30,4 +31,9 @@ SIGGEN_EXCLUDERECIPES_ABISAFE += " \
|
||||
udev-extraconf \
|
||||
packagegroup-x11-xserver \
|
||||
systemd-serialgetty \
|
||||
initscripts \
|
||||
shadow \
|
||||
shadow-sysroot \
|
||||
base-passwd \
|
||||
opkg-utils \
|
||||
"
|
||||
|
||||
@@ -8,3 +8,4 @@ ExecStart=-@SBINDIR@/sshd -i
|
||||
ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
StandardError=syslog
|
||||
KillMode=process
|
||||
|
||||
@@ -9,6 +9,7 @@ LICENSE = "openssl"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
|
||||
|
||||
DEPENDS = "perl-native-runtime"
|
||||
DEPENDS_append_class-target = " openssl-native"
|
||||
|
||||
SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
|
||||
"
|
||||
@@ -30,14 +31,14 @@ export DIRS = "crypto ssl apps"
|
||||
export EX_LIBS = "-lgcc -ldl"
|
||||
export AS = "${CC} -c"
|
||||
|
||||
inherit pkgconfig siteinfo multilib_header
|
||||
inherit pkgconfig siteinfo multilib_header ptest
|
||||
|
||||
PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"
|
||||
FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
|
||||
FILES_libssl = "${libdir}/libssl.so.*"
|
||||
FILES_${PN} =+ " ${libdir}/ssl/*"
|
||||
FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash"
|
||||
RDEPENDS_${PN}-misc = "${@base_contains('PACKAGECONFIG', 'perl', 'perl', '', d)}"
|
||||
RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}"
|
||||
FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
|
||||
|
||||
# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
|
||||
@@ -47,6 +48,7 @@ FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
|
||||
FILES_openssl-conf = "${libdir}/ssl/openssl.cnf"
|
||||
CONFFILES_openssl-conf = "${libdir}/ssl/openssl.cnf"
|
||||
RRECOMMENDS_libcrypto += "openssl-conf"
|
||||
RDEPENDS_${PN}-ptest += "${PN}-misc make perl perl-module-filehandle bc"
|
||||
|
||||
do_configure_prepend_darwin () {
|
||||
sed -i -e '/version-script=openssl\.ld/d' Configure
|
||||
@@ -59,17 +61,18 @@ do_configure () {
|
||||
ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
|
||||
|
||||
os=${HOST_OS}
|
||||
if [ "x$os" = "xlinux-uclibc" ]; then
|
||||
case $os in
|
||||
linux-uclibc |\
|
||||
linux-uclibceabi |\
|
||||
linux-gnueabi |\
|
||||
linux-uclibcspe |\
|
||||
linux-gnuspe |\
|
||||
linux-musl*)
|
||||
os=linux
|
||||
elif [ "x$os" = "xlinux-uclibceabi" ]; then
|
||||
os=linux
|
||||
elif [ "x$os" = "xlinux-uclibcspe" ]; then
|
||||
os=linux
|
||||
elif [ "x$os" = "xlinux-gnuspe" ]; then
|
||||
os=linux
|
||||
elif [ "x$os" = "xlinux-gnueabi" ]; then
|
||||
os=linux
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
target="$os-${HOST_ARCH}"
|
||||
case $target in
|
||||
linux-arm)
|
||||
@@ -136,10 +139,18 @@ do_configure () {
|
||||
perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target
|
||||
}
|
||||
|
||||
do_compile_prepend_class-target () {
|
||||
sed -i 's/\((OPENSSL=\)".*"/\1"openssl"/' Makefile
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
oe_runmake
|
||||
}
|
||||
|
||||
do_compile_ptest () {
|
||||
oe_runmake buildtest
|
||||
}
|
||||
|
||||
do_install () {
|
||||
oe_runmake INSTALL_PREFIX="${D}" MANDIR="${mandir}" install
|
||||
|
||||
@@ -157,7 +168,7 @@ do_install () {
|
||||
cp --dereference -R include/openssl ${D}${includedir}
|
||||
|
||||
oe_multilib_header openssl/opensslconf.h
|
||||
if [ "${@base_contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then
|
||||
if [ "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then
|
||||
install -m 0755 ${S}/tools/c_rehash ${D}${bindir}
|
||||
sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${bindir}/c_rehash
|
||||
sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl
|
||||
@@ -169,5 +180,18 @@ do_install () {
|
||||
fi
|
||||
}
|
||||
|
||||
do_install_ptest () {
|
||||
cp -r Makefile test ${D}${PTEST_PATH}
|
||||
cp -r certs ${D}${PTEST_PATH}
|
||||
mkdir -p ${D}${PTEST_PATH}/apps
|
||||
ln -sf /usr/lib/ssl/misc/CA.sh ${D}${PTEST_PATH}/apps
|
||||
ln -sf /usr/lib/ssl/openssl.cnf ${D}${PTEST_PATH}/apps
|
||||
ln -sf /usr/bin/openssl ${D}${PTEST_PATH}/apps
|
||||
cp apps/server2.pem ${D}${PTEST_PATH}/apps
|
||||
mkdir -p ${D}${PTEST_PATH}/util
|
||||
install util/opensslwrap.sh ${D}${PTEST_PATH}/util
|
||||
install util/shlib_wrap.sh ${D}${PTEST_PATH}/util
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
Add 'buildtest' and 'runtest' targets to Makefile, to build and run tests
|
||||
cross-compiled.
|
||||
|
||||
Signed-off-by: Anders Roxell <anders.roxell@enea.com>
|
||||
Signed-off-by: Maxin B. John <maxin.john@enea.com>
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
diff -uNr a/Makefile b/Makefile
|
||||
--- a/Makefile.org 2012-05-10 17:06:02.000000000 +0200
|
||||
+++ b/Makefile.org 2012-10-27 00:05:55.359424024 +0200
|
||||
@@ -411,8 +411,16 @@
|
||||
test: tests
|
||||
|
||||
tests: rehash
|
||||
+ $(MAKE) buildtest
|
||||
+ $(MAKE) runtest
|
||||
+
|
||||
+buildtest:
|
||||
+ @(cd test && \
|
||||
+ $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf exe apps);
|
||||
+
|
||||
+runtest:
|
||||
@(cd test && echo "testing..." && \
|
||||
- $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
|
||||
+ $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf alltests );
|
||||
OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
|
||||
|
||||
report:
|
||||
diff --git a/test/Makefile b/test/Makefile
|
||||
index 3912f82..1696767 100644
|
||||
--- a/test/Makefile
|
||||
+++ b/test/Makefile
|
||||
@@ -128,7 +128,7 @@ tests: exe apps $(TESTS)
|
||||
apps:
|
||||
@(cd ..; $(MAKE) DIRS=apps all)
|
||||
|
||||
-alltests: \
|
||||
+all-tests= \
|
||||
test_des test_idea test_sha test_md4 test_md5 test_hmac \
|
||||
test_md2 test_mdc2 test_wp \
|
||||
test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \
|
||||
@@ -138,6 +138,11 @@ alltests: \
|
||||
test_ss test_ca test_engine test_evp test_ssl test_tsa test_ige \
|
||||
test_jpake test_cms
|
||||
|
||||
+alltests:
|
||||
+ @(for i in $(all-tests); do \
|
||||
+ ( $(MAKE) $$i && echo "PASS: $$i" ) || echo "FAIL: $$i"; \
|
||||
+ done)
|
||||
+
|
||||
test_evp:
|
||||
../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
|
||||
|
||||
@@ -203,7 +208,7 @@ test_x509:
|
||||
echo test second x509v3 certificate
|
||||
sh ./tx509 v3-cert2.pem 2>/dev/null
|
||||
|
||||
-test_rsa: $(RSATEST)$(EXE_EXT)
|
||||
+test_rsa:
|
||||
@sh ./trsa 2>/dev/null
|
||||
../util/shlib_wrap.sh ./$(RSATEST)
|
||||
|
||||
@@ -298,11 +303,11 @@ test_tsa:
|
||||
sh ./testtsa; \
|
||||
fi
|
||||
|
||||
-test_ige: $(IGETEST)$(EXE_EXT)
|
||||
+test_ige:
|
||||
@echo "Test IGE mode"
|
||||
../util/shlib_wrap.sh ./$(IGETEST)
|
||||
|
||||
-test_jpake: $(JPAKETEST)$(EXE_EXT)
|
||||
+test_jpake:
|
||||
@echo "Test JPAKE"
|
||||
../util/shlib_wrap.sh ./$(JPAKETEST)
|
||||
@@ -4,6 +4,7 @@ Subject: Initial aarch64 bits.
|
||||
X-Git-Url: http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=039081b80977e2a5de84e1f88f8b4d025b559956
|
||||
|
||||
Initial aarch64 bits.
|
||||
Upstream-Status: backport (will be included in 1.0.2)
|
||||
---
|
||||
crypto/bn/bn_lcl.h | 9 +++++++++
|
||||
crypto/md32_common.h | 18 ++++++++++++++++++
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
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.
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
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;
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
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 */
|
||||
{
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
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
|
||||
@@ -1,31 +0,0 @@
|
||||
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?
|
||||
@@ -1,24 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -1,401 +0,0 @@
|
||||
Fix documentation build errors with Perl 5.18 pod2man
|
||||
|
||||
This fixes errors building man pages with newer versions of pod2man
|
||||
included with Perl 5.18.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
Signed-off-by: Jonathan Liu
|
||||
|
||||
Index: openssl-1.0.1f/doc/apps/cms.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/apps/cms.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/apps/cms.pod 2014-02-28 10:13:51.899979213 +0200
|
||||
@@ -450,28 +450,28 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
the operation was completely successfully.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
an error occurred parsing the command options.
|
||||
|
||||
-=item 2
|
||||
+=item Z<>2
|
||||
|
||||
one of the input files could not be read.
|
||||
|
||||
-=item 3
|
||||
+=item Z<>3
|
||||
|
||||
an error occurred creating the CMS file or when reading the MIME
|
||||
message.
|
||||
|
||||
-=item 4
|
||||
+=item Z<>4
|
||||
|
||||
an error occurred decrypting or verifying the message.
|
||||
|
||||
-=item 5
|
||||
+=item Z<>5
|
||||
|
||||
the message was verified correctly but an error occurred writing out
|
||||
the signers certificates.
|
||||
Index: openssl-1.0.1f/doc/apps/smime.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/apps/smime.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/apps/smime.pod 2014-02-28 10:16:57.795979233 +0200
|
||||
@@ -308,28 +308,28 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
the operation was completely successfully.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
an error occurred parsing the command options.
|
||||
|
||||
-=item 2
|
||||
+=item Z<>2
|
||||
|
||||
one of the input files could not be read.
|
||||
|
||||
-=item 3
|
||||
+=item Z<>3
|
||||
|
||||
an error occurred creating the PKCS#7 file or when reading the MIME
|
||||
message.
|
||||
|
||||
-=item 4
|
||||
+=item Z<>4
|
||||
|
||||
an error occurred decrypting or verifying the message.
|
||||
|
||||
-=item 5
|
||||
+=item Z<>5
|
||||
|
||||
the message was verified correctly but an error occurred writing out
|
||||
the signers certificates.
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_COMP_add_compression_method.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_COMP_add_compression_method.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_COMP_add_compression_method.pod 2014-02-28 10:18:09.679979225 +0200
|
||||
@@ -53,11 +53,11 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The operation failed. Check the error queue to find out the reason.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_CTX_add_session.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_add_session.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_CTX_add_session.pod 2014-02-28 10:18:42.687979221 +0200
|
||||
@@ -52,13 +52,13 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The operation failed. In case of the add operation, it was tried to add
|
||||
the same (identical) session twice. In case of the remove operation, the
|
||||
session was not found in the cache.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_CTX_load_verify_locations.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_load_verify_locations.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_CTX_load_verify_locations.pod 2014-02-28 10:19:09.079979218 +0200
|
||||
@@ -100,13 +100,13 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The operation failed because B<CAfile> and B<CApath> are NULL or the
|
||||
processing at one of the locations specified failed. Check the error
|
||||
stack to find out the reason.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_CTX_set_client_CA_list.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_set_client_CA_list.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_client_CA_list.pod 2014-02-28 10:19:42.999979220 +0200
|
||||
@@ -66,13 +66,13 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
A failure while manipulating the STACK_OF(X509_NAME) object occurred or
|
||||
the X509_NAME could not be extracted from B<cacert>. Check the error stack
|
||||
to find out the reason.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_CTX_set_session_id_context.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_set_session_id_context.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_session_id_context.pod 2014-02-28 10:20:06.495979211 +0200
|
||||
@@ -64,13 +64,13 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The length B<sid_ctx_len> of the session id context B<sid_ctx> exceeded
|
||||
the maximum allowed length of B<SSL_MAX_SSL_SESSION_ID_LENGTH>. The error
|
||||
is logged to the error stack.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_CTX_set_ssl_version.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_set_ssl_version.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_ssl_version.pod 2014-02-28 10:20:32.111979208 +0200
|
||||
@@ -42,11 +42,11 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The new choice failed, check the error stack to find out the reason.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_CTX_use_psk_identity_hint.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_CTX_use_psk_identity_hint.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_CTX_use_psk_identity_hint.pod 2014-02-28 10:21:12.351979203 +0200
|
||||
@@ -96,7 +96,7 @@
|
||||
connection will fail with decryption_error before it will be finished
|
||||
completely.
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
PSK identity was not found. An "unknown_psk_identity" alert message
|
||||
will be sent and the connection setup fails.
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_accept.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_accept.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_accept.pod 2014-02-28 10:21:51.535979215 +0200
|
||||
@@ -44,13 +44,13 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The TLS/SSL handshake was not successful but was shut down controlled and
|
||||
by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
|
||||
return value B<ret> to find out the reason.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been
|
||||
established.
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_clear.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_clear.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_clear.pod 2014-02-28 10:22:13.087979196 +0200
|
||||
@@ -56,12 +56,12 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The SSL_clear() operation could not be performed. Check the error stack to
|
||||
find out the reason.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The SSL_clear() operation was successful.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_connect.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_connect.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_connect.pod 2014-02-28 10:22:33.991979193 +0200
|
||||
@@ -41,13 +41,13 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The TLS/SSL handshake was not successful but was shut down controlled and
|
||||
by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
|
||||
return value B<ret> to find out the reason.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been
|
||||
established.
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_do_handshake.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_do_handshake.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_do_handshake.pod 2014-02-28 10:22:56.887979159 +0200
|
||||
@@ -45,13 +45,13 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The TLS/SSL handshake was not successful but was shut down controlled and
|
||||
by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
|
||||
return value B<ret> to find out the reason.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been
|
||||
established.
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_read.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_read.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_read.pod 2014-02-28 10:23:15.303979188 +0200
|
||||
@@ -86,7 +86,7 @@
|
||||
The read operation was successful; the return value is the number of
|
||||
bytes actually read from the TLS/SSL connection.
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The read operation was not successful. The reason may either be a clean
|
||||
shutdown due to a "close notify" alert sent by the peer (in which case
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_session_reused.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_session_reused.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_session_reused.pod 2014-02-28 10:23:36.615979186 +0200
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
A new session was negotiated.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
A session was reused.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_set_fd.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_set_fd.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_set_fd.pod 2014-02-28 10:23:57.599979183 +0200
|
||||
@@ -35,11 +35,11 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The operation failed. Check the error stack to find out why.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_set_session.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_set_session.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_set_session.pod 2014-02-28 10:24:16.943979181 +0200
|
||||
@@ -37,11 +37,11 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The operation failed; check the error stack to find out the reason.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_shutdown.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_shutdown.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_shutdown.pod 2014-02-28 10:25:03.623979175 +0200
|
||||
@@ -92,19 +92,19 @@
|
||||
|
||||
=over 4
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The shutdown is not yet finished. Call SSL_shutdown() for a second time,
|
||||
if a bidirectional shutdown shall be performed.
|
||||
The output of L<SSL_get_error(3)|SSL_get_error(3)> may be misleading, as an
|
||||
erroneous SSL_ERROR_SYSCALL may be flagged even though no error occurred.
|
||||
|
||||
-=item 1
|
||||
+=item Z<>1
|
||||
|
||||
The shutdown was successfully completed. The "close notify" alert was sent
|
||||
and the peer's "close notify" alert was received.
|
||||
|
||||
-=item -1
|
||||
+=item Z<>-1
|
||||
|
||||
The shutdown was not successful because a fatal error occurred either
|
||||
at the protocol level or a connection failure occurred. It can also occur if
|
||||
Index: openssl-1.0.1f/doc/ssl/SSL_write.pod
|
||||
===================================================================
|
||||
--- openssl-1.0.1f.orig/doc/ssl/SSL_write.pod 2014-01-06 15:47:42.000000000 +0200
|
||||
+++ openssl-1.0.1f/doc/ssl/SSL_write.pod 2014-02-28 10:25:36.031979168 +0200
|
||||
@@ -79,7 +79,7 @@
|
||||
The write operation was successful, the return value is the number of
|
||||
bytes actually written to the TLS/SSL connection.
|
||||
|
||||
-=item 0
|
||||
+=item Z<>0
|
||||
|
||||
The write operation was not successful. Probably the underlying connection
|
||||
was closed. Call SSL_get_error() with the return value B<ret> to find out,
|
||||
30
meta/recipes-connectivity/openssl/openssl/ptest-deps.patch
Normal file
30
meta/recipes-connectivity/openssl/openssl/ptest-deps.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
Remove Makefile dependencies for test targets
|
||||
|
||||
These are probably here because the executables aren't always built for
|
||||
other platforms (e.g. Windows); however we can safely assume they'll
|
||||
always be there. None of the other test targets have such dependencies
|
||||
and if we don't remove them, make tries to rebuild the executables and
|
||||
fails during run-ptest.
|
||||
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
diff --git a/test/Makefile b/test/Makefile
|
||||
index e6fcfb4..5ae043b 100644
|
||||
--- a/test/Makefile
|
||||
+++ b/test/Makefile
|
||||
@@ -322,11 +322,11 @@ test_cms:
|
||||
@echo "CMS consistency test"
|
||||
$(PERL) cms-test.pl
|
||||
|
||||
-test_srp: $(SRPTEST)$(EXE_EXT)
|
||||
+test_srp:
|
||||
@echo "Test SRP"
|
||||
../util/shlib_wrap.sh ./srptest
|
||||
|
||||
-test_heartbeat: $(HEARTBEATTEST)$(EXE_EXT)
|
||||
+test_heartbeat:
|
||||
../util/shlib_wrap.sh ./$(HEARTBEATTEST)
|
||||
|
||||
lint:
|
||||
2
meta/recipes-connectivity/openssl/openssl/run-ptest
Executable file
2
meta/recipes-connectivity/openssl/openssl/run-ptest
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
make -k runtest
|
||||
@@ -27,23 +27,19 @@ SRC_URI += "file://configure-targets.patch \
|
||||
file://debian/no-symbolic.patch \
|
||||
file://debian/debian-targets.patch \
|
||||
file://openssl_fix_for_x32.patch \
|
||||
file://openssl-fix-doc.patch \
|
||||
file://fix-cipher-des-ede3-cfb1.patch \
|
||||
file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \
|
||||
file://openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch \
|
||||
file://initial-aarch64-bits.patch \
|
||||
file://find.pl \
|
||||
file://openssl-fix-des.pod-error.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 \
|
||||
file://Makefiles-ptest.patch \
|
||||
file://ptest-deps.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "de62b43dfcd858e66a74bee1c834e959"
|
||||
SRC_URI[sha256sum] = "53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028"
|
||||
SRC_URI[md5sum] = "f7175c9cd3c39bb1907ac8bba9df8ed3"
|
||||
SRC_URI[sha256sum] = "1b60ca8789ba6f03e8ef20da2293b8dc131c39d83814e775069f02d26354edf3"
|
||||
|
||||
PACKAGES =+ " \
|
||||
${PN}-engines \
|
||||
240
meta/recipes-core/eglibc/eglibc-2.19/CVE-2014-5119.patch
Normal file
240
meta/recipes-core/eglibc/eglibc-2.19/CVE-2014-5119.patch
Normal file
@@ -0,0 +1,240 @@
|
||||
CVE-2014-5119
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster808@gmail.com>
|
||||
|
||||
Upstream commit:
|
||||
|
||||
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a1a6a401ab0a3c9f15fb7eaebbdcee24192254e8
|
||||
|
||||
|
||||
From a1a6a401ab0a3c9f15fb7eaebbdcee24192254e8 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Tue, 26 Aug 2014 19:38:59 +0200
|
||||
Subject: [PATCH] __gconv_translit_find: Disable function [BZ #17187]
|
||||
|
||||
This functionality has never worked correctly, and the implementation
|
||||
contained a security vulnerability (CVE-2014-5119).
|
||||
---
|
||||
ChangeLog | 7 ++
|
||||
NEWS | 9 ++-
|
||||
iconv/gconv_trans.c | 177 +-------------------------------------------------
|
||||
3 files changed, 19 insertions(+), 174 deletions(-)
|
||||
|
||||
Index: libc/NEWS
|
||||
===================================================================
|
||||
--- libc.orig/NEWS
|
||||
+++ libc/NEWS
|
||||
@@ -26,7 +26,7 @@ Version 2.19
|
||||
16271, 16274, 16283, 16289, 16293, 16314, 16316, 16330, 16337, 16338,
|
||||
16356, 16365, 16366, 16369, 16372, 16375, 16379, 16384, 16385, 16386,
|
||||
16387, 16390, 16394, 16398, 16400, 16407, 16408, 16414, 16430, 16431,
|
||||
- 16453, 16474, 16506, 16510, 16529
|
||||
+ 16453, 16474, 16506, 16510, 16529, 17187
|
||||
|
||||
* Slovenian translations for glibc messages have been contributed by the
|
||||
Translation Project's Slovenian team of translators.
|
||||
Index: libc/iconv/gconv_trans.c
|
||||
===================================================================
|
||||
--- libc.orig/iconv/gconv_trans.c
|
||||
+++ libc/iconv/gconv_trans.c
|
||||
@@ -241,181 +241,12 @@ __gconv_transliterate (struct __gconv_st
|
||||
return __GCONV_ILLEGAL_INPUT;
|
||||
}
|
||||
|
||||
-
|
||||
-/* Structure to represent results of found (or not) transliteration
|
||||
- modules. */
|
||||
-struct known_trans
|
||||
-{
|
||||
- /* This structure must remain the first member. */
|
||||
- struct trans_struct info;
|
||||
-
|
||||
- char *fname;
|
||||
- void *handle;
|
||||
- int open_count;
|
||||
-};
|
||||
-
|
||||
-
|
||||
-/* Tree with results of previous calls to __gconv_translit_find. */
|
||||
-static void *search_tree;
|
||||
-
|
||||
-/* We modify global data. */
|
||||
-__libc_lock_define_initialized (static, lock);
|
||||
-
|
||||
-
|
||||
-/* Compare two transliteration entries. */
|
||||
-static int
|
||||
-trans_compare (const void *p1, const void *p2)
|
||||
-{
|
||||
- const struct known_trans *s1 = (const struct known_trans *) p1;
|
||||
- const struct known_trans *s2 = (const struct known_trans *) p2;
|
||||
-
|
||||
- return strcmp (s1->info.name, s2->info.name);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/* Open (maybe reopen) the module named in the struct. Get the function
|
||||
- and data structure pointers we need. */
|
||||
-static int
|
||||
-open_translit (struct known_trans *trans)
|
||||
-{
|
||||
- __gconv_trans_query_fct queryfct;
|
||||
-
|
||||
- trans->handle = __libc_dlopen (trans->fname);
|
||||
- if (trans->handle == NULL)
|
||||
- /* Not available. */
|
||||
- return 1;
|
||||
-
|
||||
- /* Find the required symbol. */
|
||||
- queryfct = __libc_dlsym (trans->handle, "gconv_trans_context");
|
||||
- if (queryfct == NULL)
|
||||
- {
|
||||
- /* We cannot live with that. */
|
||||
- close_and_out:
|
||||
- __libc_dlclose (trans->handle);
|
||||
- trans->handle = NULL;
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
- /* Get the context. */
|
||||
- if (queryfct (trans->info.name, &trans->info.csnames, &trans->info.ncsnames)
|
||||
- != 0)
|
||||
- goto close_and_out;
|
||||
-
|
||||
- /* Of course we also have to have the actual function. */
|
||||
- trans->info.trans_fct = __libc_dlsym (trans->handle, "gconv_trans");
|
||||
- if (trans->info.trans_fct == NULL)
|
||||
- goto close_and_out;
|
||||
-
|
||||
- /* Now the optional functions. */
|
||||
- trans->info.trans_init_fct =
|
||||
- __libc_dlsym (trans->handle, "gconv_trans_init");
|
||||
- trans->info.trans_context_fct =
|
||||
- __libc_dlsym (trans->handle, "gconv_trans_context");
|
||||
- trans->info.trans_end_fct =
|
||||
- __libc_dlsym (trans->handle, "gconv_trans_end");
|
||||
-
|
||||
- trans->open_count = 1;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
int
|
||||
internal_function
|
||||
__gconv_translit_find (struct trans_struct *trans)
|
||||
{
|
||||
- struct known_trans **found;
|
||||
- const struct path_elem *runp;
|
||||
- int res = 1;
|
||||
-
|
||||
- /* We have to have a name. */
|
||||
- assert (trans->name != NULL);
|
||||
-
|
||||
- /* Acquire the lock. */
|
||||
- __libc_lock_lock (lock);
|
||||
-
|
||||
- /* See whether we know this module already. */
|
||||
- found = __tfind (trans, &search_tree, trans_compare);
|
||||
- if (found != NULL)
|
||||
- {
|
||||
- /* Is this module available? */
|
||||
- if ((*found)->handle != NULL)
|
||||
- {
|
||||
- /* Maybe we have to reopen the file. */
|
||||
- if ((*found)->handle != (void *) -1)
|
||||
- /* The object is not unloaded. */
|
||||
- res = 0;
|
||||
- else if (open_translit (*found) == 0)
|
||||
- {
|
||||
- /* Copy the data. */
|
||||
- *trans = (*found)->info;
|
||||
- (*found)->open_count++;
|
||||
- res = 0;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- size_t name_len = strlen (trans->name) + 1;
|
||||
- int need_so = 0;
|
||||
- struct known_trans *newp;
|
||||
-
|
||||
- /* We have to continue looking for the module. */
|
||||
- if (__gconv_path_elem == NULL)
|
||||
- __gconv_get_path ();
|
||||
-
|
||||
- /* See whether we have to append .so. */
|
||||
- if (name_len <= 4 || memcmp (&trans->name[name_len - 4], ".so", 3) != 0)
|
||||
- need_so = 1;
|
||||
-
|
||||
- /* Create a new entry. */
|
||||
- newp = (struct known_trans *) malloc (sizeof (struct known_trans)
|
||||
- + (__gconv_max_path_elem_len
|
||||
- + name_len + 3)
|
||||
- + name_len);
|
||||
- if (newp != NULL)
|
||||
- {
|
||||
- char *cp;
|
||||
-
|
||||
- /* Clear the struct. */
|
||||
- memset (newp, '\0', sizeof (struct known_trans));
|
||||
-
|
||||
- /* Store a copy of the module name. */
|
||||
- newp->info.name = cp = (char *) (newp + 1);
|
||||
- cp = __mempcpy (cp, trans->name, name_len);
|
||||
-
|
||||
- newp->fname = cp;
|
||||
-
|
||||
- /* Search in all the directories. */
|
||||
- for (runp = __gconv_path_elem; runp->name != NULL; ++runp)
|
||||
- {
|
||||
- cp = __mempcpy (__stpcpy ((char *) newp->fname, runp->name),
|
||||
- trans->name, name_len);
|
||||
- if (need_so)
|
||||
- memcpy (cp, ".so", sizeof (".so"));
|
||||
-
|
||||
- if (open_translit (newp) == 0)
|
||||
- {
|
||||
- /* We found a module. */
|
||||
- res = 0;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (res)
|
||||
- newp->fname = NULL;
|
||||
-
|
||||
- /* In any case we'll add the entry to our search tree. */
|
||||
- if (__tsearch (newp, &search_tree, trans_compare) == NULL)
|
||||
- {
|
||||
- /* Yickes, this should not happen. Unload the object. */
|
||||
- res = 1;
|
||||
- /* XXX unload here. */
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- __libc_lock_unlock (lock);
|
||||
-
|
||||
- return res;
|
||||
+ /* Transliteration module loading has been removed because it never
|
||||
+ worked as intended and suffered from a security vulnerability.
|
||||
+ Consequently, this function always fails. */
|
||||
+ return 1;
|
||||
}
|
||||
Index: libc/ChangeLog
|
||||
===================================================================
|
||||
--- libc.orig/ChangeLog
|
||||
+++ libc/ChangeLog
|
||||
@@ -1,3 +1,10 @@
|
||||
+2014-08-26 Florian Weimer <fweimer@redhat.com>
|
||||
+
|
||||
+ [BZ #17187]
|
||||
+ * iconv/gconv_trans.c (struct known_trans, search_tree, lock,
|
||||
+ trans_compare, open_translit, __gconv_translit_find):
|
||||
+ Remove module loading code.
|
||||
+
|
||||
2014-02-06 Carlos O'Donell <carlos@redhat.com>
|
||||
|
||||
[BZ #16529]
|
||||
@@ -26,6 +26,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25
|
||||
file://fix-tibetian-locales.patch \
|
||||
file://ppce6500-32b_slow_ieee754_sqrt.patch \
|
||||
file://grok_gold.patch \
|
||||
file://CVE-2014-5119.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "197836c2ba42fb146e971222647198dd"
|
||||
SRC_URI[sha256sum] = "baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c"
|
||||
|
||||
@@ -21,7 +21,7 @@ IMAGE_FSTYPES = "vmdk"
|
||||
|
||||
inherit core-image
|
||||
|
||||
SRCREV ?= "810dd79720d607f1a31e73ff5f0862928fe06eb2"
|
||||
SRCREV ?= "07a7905689f62e382c5640006dacb2c331ae454a"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=daisy \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -19,6 +19,7 @@ SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
|
||||
file://runtest.patch \
|
||||
file://run-ptest \
|
||||
file://libxml2-CVE-2014-0191-fix.patch \
|
||||
file://python-sitepackages-dir.patch \
|
||||
"
|
||||
|
||||
inherit autotools pkgconfig binconfig pythonnative ptest
|
||||
@@ -30,6 +31,11 @@ do_configure_prepend () {
|
||||
sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.in
|
||||
}
|
||||
|
||||
do_configure_prepend_class-nativesdk () {
|
||||
# Ensure we get the correct site-packages path
|
||||
export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
|
||||
}
|
||||
|
||||
EXTRA_OECONF = "--without-python --without-debug --without-legacy --without-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
|
||||
EXTRA_OECONF_class-native = "--with-python=${STAGING_BINDIR}/python --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma"
|
||||
EXTRA_OECONF_class-nativesdk = "--with-python=${STAGING_BINDIR}/python --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma"
|
||||
@@ -49,10 +55,13 @@ python populate_packages_prepend () {
|
||||
d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
|
||||
}
|
||||
|
||||
PACKAGES += "${PN}-utils"
|
||||
PACKAGES += "${PN}-utils ${PN}-python"
|
||||
|
||||
FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug"
|
||||
FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
|
||||
FILES_${PN}-dev += "${libdir}/xml2Conf.sh"
|
||||
FILES_${PN}-utils += "${bindir}/*"
|
||||
FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
|
||||
|
||||
do_install_ptest () {
|
||||
cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
Allow us to pass in PYTHON_SITE_PACKAGES
|
||||
|
||||
The python binary used when building for nativesdk doesn't give us the
|
||||
correct path here so we need to be able to specify it ourselves.
|
||||
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -743,7 +743,8 @@ dnl
|
||||
|
||||
PYTHON_VERSION=
|
||||
PYTHON_INCLUDES=
|
||||
-PYTHON_SITE_PACKAGES=
|
||||
+# Allow this to be set externally
|
||||
+#PYTHON_SITE_PACKAGES=
|
||||
PYTHON_TESTS=
|
||||
pythondir=
|
||||
if test "$with_python" != "no" ; then
|
||||
@@ -0,0 +1,32 @@
|
||||
From 8ef852a5be72c75e17f2510bea52455f809b56ce Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Fri, 28 Mar 2014 14:07:42 -0400
|
||||
Subject: [PATCH 04/10] Readline-6.3 patch 2
|
||||
|
||||
Fixes multi-key issue identified in this thread:
|
||||
http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
||||
---
|
||||
readline.c | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/readline.c b/readline.c
|
||||
index eb4eae3..abb29a0 100644
|
||||
--- a/readline.c
|
||||
+++ b/readline.c
|
||||
@@ -744,7 +744,8 @@ _rl_dispatch_callback (cxt)
|
||||
r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
|
||||
|
||||
RL_CHECK_SIGNALS ();
|
||||
- if (r == 0) /* success! */
|
||||
+ /* We only treat values < 0 specially to simulate recursion. */
|
||||
+ if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */
|
||||
{
|
||||
_rl_keyseq_chain_dispose ();
|
||||
RL_UNSETSTATE (RL_STATE_MULTIKEY);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
43
meta/recipes-core/readline/readline-6.3/readline63-003
Normal file
43
meta/recipes-core/readline/readline-6.3/readline63-003
Normal file
@@ -0,0 +1,43 @@
|
||||
readline: Security Advisory - readline - CVE-2014-2524
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Yue Tao <yue.tao@windriver.com>
|
||||
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 6.3
|
||||
Patch-ID: readline63-003
|
||||
|
||||
Bug-Reported-by:
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL:
|
||||
|
||||
Bug-Description:
|
||||
|
||||
There are debugging functions in the readline release that are theoretically
|
||||
exploitable as security problems. They are not public functions, but have
|
||||
global linkage.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-6.3/util.c 2013-09-02 13:36:12.000000000 -0400
|
||||
--- util.c 2014-03-20 10:25:53.000000000 -0400
|
||||
***************
|
||||
*** 477,480 ****
|
||||
--- 479,483 ----
|
||||
}
|
||||
|
||||
+ #if defined (DEBUG)
|
||||
#if defined (USE_VARARGS)
|
||||
static FILE *_rl_tracefp;
|
||||
***************
|
||||
*** 539,542 ****
|
||||
--- 542,546 ----
|
||||
}
|
||||
#endif
|
||||
+ #endif /* DEBUG */
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
require readline.inc
|
||||
|
||||
SRC_URI_append = " file://readline63-003 \
|
||||
file://readline-dispatch-multikey.patch"
|
||||
|
||||
SRC_URI[archive.md5sum] = "33c8fb279e981274f485fd91da77e94a"
|
||||
SRC_URI[archive.sha256sum] = "56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43"
|
||||
|
||||
|
||||
@@ -102,7 +102,12 @@ case "$1" in
|
||||
|
||||
udevadm control --env=STARTUP=1
|
||||
if [ "$not_first_boot" != "" ];then
|
||||
udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform
|
||||
if [ "$PROBE_PLATFORM_BUS" != "yes" ]; then
|
||||
PLATFORM_BUS_NOMATCH="--subsystem-nomatch=platform"
|
||||
else
|
||||
PLATFORM_BUS_NOMATCH=""
|
||||
fi
|
||||
udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux $PLATFORM_BUS_NOMATCH
|
||||
(udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
|
||||
else
|
||||
udevadm trigger --action=add
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
|
||||
# Comment this out to disable device cache
|
||||
DEVCACHE="/etc/dev.tar"
|
||||
PROBE_PLATFORM_BUS="yes"
|
||||
|
||||
@@ -28,10 +28,10 @@ SRC_URI = "\
|
||||
file://fix-pr15815.patch \
|
||||
file://fix-pr2404.patch \
|
||||
file://fix-pr16476.patch \
|
||||
file://fix-pr16428a.patch \
|
||||
file://fix-pr16428b.patch \
|
||||
file://fix-pr16428.patch \
|
||||
file://replace_macros_with_static_inline.patch \
|
||||
file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch \
|
||||
file://binutils-uninitialised-warning.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "e0f71a7b2ddab0f8612336ac81d9636b"
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From f9c316c4d75be236bbaa8464ef803ed2d3859d6d Mon Sep 17 00:00:00 2001
|
||||
From: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Wed, 15 Jan 2014 07:43:19 -0800
|
||||
Subject: [PATCH 1/1] Silence uninitialized warning on ehdr_start_save
|
||||
|
||||
Older GCC, like 4.1/4.2, will issue an uninitialized warning on
|
||||
ehdr_start_save. This patch silences by using
|
||||
|
||||
struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
|
||||
|
||||
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
|
||||
Silence uninitialized warning on ehdr_start_save with older
|
||||
GCC.
|
||||
|
||||
Upstream-Status: Backport
|
||||
---
|
||||
ld/ChangeLog | 6 ++++++
|
||||
ld/emultempl/elf32.em | 2 +-
|
||||
2 files changed, 7 insertions(+), 1 deletions(-)
|
||||
|
||||
#diff --git a/ld/ChangeLog b/ld/ChangeLog
|
||||
#index eaa6b93..91055de 100644
|
||||
#--- a/ld/ChangeLog
|
||||
#+++ b/ld/ChangeLog
|
||||
#@@ -1,3 +1,9 @@
|
||||
#+2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||
#+
|
||||
#+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
|
||||
#+ Silence uninitialized warning on ehdr_start_save with older
|
||||
#+ GCC.
|
||||
#+
|
||||
# 2014-01-15 Alan Modra <amodra@gmail.com>
|
||||
#
|
||||
# * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define
|
||||
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
|
||||
index 13f86f0..569c7f7 100644
|
||||
--- a/ld/emultempl/elf32.em
|
||||
+++ b/ld/emultempl/elf32.em
|
||||
@@ -1481,7 +1481,7 @@ gld${EMULATION_NAME}_before_allocation (void)
|
||||
asection *sinterp;
|
||||
bfd *abfd;
|
||||
struct elf_link_hash_entry *ehdr_start = NULL;
|
||||
- struct bfd_link_hash_entry ehdr_start_save;
|
||||
+ struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
|
||||
|
||||
if (is_elf_hash_table (link_info.hash))
|
||||
{
|
||||
--
|
||||
1.7.1
|
||||
|
||||
123
meta/recipes-devtools/binutils/binutils/fix-pr16428.patch
Normal file
123
meta/recipes-devtools/binutils/binutils/fix-pr16428.patch
Normal file
@@ -0,0 +1,123 @@
|
||||
commit 4199e3b8669d0a36448687850374fdc2ad7240b6
|
||||
Author: Alan Modra <amodra@gmail.com>
|
||||
Date: Wed Jan 15 21:50:55 2014 +1030
|
||||
|
||||
non-PIC references to __ehdr_start in pie and shared
|
||||
|
||||
Rather than hacking every backend to not discard dynamic relocations
|
||||
against an undefined hidden __ehdr_start, make it appear to be defined
|
||||
early. We want __ehdr_start hidden before size_dynamic_sections so
|
||||
that it isn't put in .dynsym, but we do need the dynamic relocations
|
||||
for a PIE or shared library with a non-PIC reference. Defining it
|
||||
early is wrong if we don't actually define the symbol later to its
|
||||
proper value. (In some cases we want to leave the symbol undefined,
|
||||
for example, when the ELF header isn't loaded, and we don't have this
|
||||
infomation available in before_allocation.)
|
||||
|
||||
ld/
|
||||
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define
|
||||
__ehdr_start before size_dynamic_sections and restore afterwards.
|
||||
ld/testsuite/
|
||||
* ld-elf/ehdr_start-shared.d: New.
|
||||
* ld-elf/ehdr_start-userdef.d: xfail frv.
|
||||
* ld-elf/ehdr_start-weak.d: Likewise.
|
||||
* ld-elf/ehdr_start.d: Likewise.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
|
||||
index 9a2fe89..13f86f0 100644
|
||||
--- a/ld/emultempl/elf32.em
|
||||
+++ b/ld/emultempl/elf32.em
|
||||
@@ -1480,6 +1480,8 @@ gld${EMULATION_NAME}_before_allocation (void)
|
||||
const char *rpath;
|
||||
asection *sinterp;
|
||||
bfd *abfd;
|
||||
+ struct elf_link_hash_entry *ehdr_start = NULL;
|
||||
+ struct bfd_link_hash_entry ehdr_start_save;
|
||||
|
||||
if (is_elf_hash_table (link_info.hash))
|
||||
{
|
||||
@@ -1504,6 +1506,16 @@ gld${EMULATION_NAME}_before_allocation (void)
|
||||
_bfd_elf_link_hash_hide_symbol (&link_info, h, TRUE);
|
||||
if (ELF_ST_VISIBILITY (h->other) != STV_INTERNAL)
|
||||
h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN;
|
||||
+ /* Don't leave the symbol undefined. Undefined hidden
|
||||
+ symbols typically won't have dynamic relocations, but
|
||||
+ we most likely will need dynamic relocations for
|
||||
+ __ehdr_start if we are building a PIE or shared
|
||||
+ library. */
|
||||
+ ehdr_start = h;
|
||||
+ ehdr_start_save = h->root;
|
||||
+ h->root.type = bfd_link_hash_defined;
|
||||
+ h->root.u.def.section = bfd_abs_section_ptr;
|
||||
+ h->root.u.def.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1620,6 +1632,14 @@ ${ELF_INTERPRETER_SET_DEFAULT}
|
||||
|
||||
if (!bfd_elf_size_dynsym_hash_dynstr (link_info.output_bfd, &link_info))
|
||||
einfo ("%P%F: failed to set dynamic section sizes: %E\n");
|
||||
+
|
||||
+ if (ehdr_start != NULL)
|
||||
+ {
|
||||
+ /* If we twiddled __ehdr_start to defined earlier, put it back
|
||||
+ as it was. */
|
||||
+ ehdr_start->root.type = ehdr_start_save.type;
|
||||
+ ehdr_start->root.u = ehdr_start_save.u;
|
||||
+ }
|
||||
}
|
||||
|
||||
EOF
|
||||
diff --git a/ld/testsuite/ld-elf/ehdr_start-shared.d b/ld/testsuite/ld-elf/ehdr_start-shared.d
|
||||
new file mode 100644
|
||||
index 0000000..c17516a
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/ehdr_start-shared.d
|
||||
@@ -0,0 +1,9 @@
|
||||
+#source: ehdr_start.s
|
||||
+#ld: -e _start -shared
|
||||
+#nm: -n
|
||||
+#target: *-*-linux* *-*-gnu* *-*-nacl*
|
||||
+#xfail: cris*-*-* frv-*-*
|
||||
+
|
||||
+#...
|
||||
+[0-9a-f]*000 [Adrt] __ehdr_start
|
||||
+#pass
|
||||
diff --git a/ld/testsuite/ld-elf/ehdr_start-userdef.d b/ld/testsuite/ld-elf/ehdr_start-userdef.d
|
||||
index 2a88e98..b58ae3f 100644
|
||||
--- a/ld/testsuite/ld-elf/ehdr_start-userdef.d
|
||||
+++ b/ld/testsuite/ld-elf/ehdr_start-userdef.d
|
||||
@@ -2,6 +2,7 @@
|
||||
#ld: -e _start -T ehdr_start-userdef.t
|
||||
#readelf: -Ws
|
||||
#target: *-*-linux* *-*-gnu* *-*-nacl*
|
||||
+#xfail: frv-*-*
|
||||
|
||||
#...
|
||||
Symbol table '\.symtab' contains [0-9]+ entries:
|
||||
diff --git a/ld/testsuite/ld-elf/ehdr_start-weak.d b/ld/testsuite/ld-elf/ehdr_start-weak.d
|
||||
index 8bd9035..24ae34c 100644
|
||||
--- a/ld/testsuite/ld-elf/ehdr_start-weak.d
|
||||
+++ b/ld/testsuite/ld-elf/ehdr_start-weak.d
|
||||
@@ -2,6 +2,7 @@
|
||||
#ld: -e _start -T ehdr_start-missing.t
|
||||
#nm: -n
|
||||
#target: *-*-linux* *-*-gnu* *-*-nacl*
|
||||
+#xfail: frv-*-*
|
||||
|
||||
#...
|
||||
\s+[wU] __ehdr_start
|
||||
diff --git a/ld/testsuite/ld-elf/ehdr_start.d b/ld/testsuite/ld-elf/ehdr_start.d
|
||||
index 52e5b54..d538b66 100644
|
||||
--- a/ld/testsuite/ld-elf/ehdr_start.d
|
||||
+++ b/ld/testsuite/ld-elf/ehdr_start.d
|
||||
@@ -2,6 +2,7 @@
|
||||
#ld: -e _start
|
||||
#nm: -n
|
||||
#target: *-*-linux* *-*-gnu* *-*-nacl*
|
||||
+#xfail: frv-*-*
|
||||
|
||||
#...
|
||||
[0-9a-f]*000 [Adrt] __ehdr_start
|
||||
@@ -1,75 +0,0 @@
|
||||
From d1ec1e40b5b457c92aaa23f7af40e026e4596a99 Mon Sep 17 00:00:00 2001
|
||||
From: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Tue, 14 Jan 2014 10:48:39 -0800
|
||||
Subject: [PATCH 1/1] Don't update reloc count if there are any non pc-relative relocs
|
||||
|
||||
PR ld/16428
|
||||
* elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
|
||||
count if there are any non pc-relative relocs.
|
||||
* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
|
||||
---
|
||||
bfd/ChangeLog | 7 +++++++
|
||||
bfd/elf32-i386.c | 9 +++++++--
|
||||
bfd/elf64-x86-64.c | 9 +++++++--
|
||||
3 files changed, 21 insertions(+), 4 deletions(-)
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
#diff --git a/bfd/ChangeLog b/bfd/ChangeLog
|
||||
#index a8f1f94..7a49fd1 100644
|
||||
#--- a/bfd/ChangeLog
|
||||
#+++ b/bfd/ChangeLog
|
||||
#@@ -1,3 +1,10 @@
|
||||
#+2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
|
||||
#+
|
||||
#+ PR ld/16428
|
||||
#+ * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
|
||||
#+ count if there are any non pc-relative relocs.
|
||||
#+ * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
|
||||
#+
|
||||
# 2014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>
|
||||
# Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
|
||||
#
|
||||
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
|
||||
index 4d391e1..d7f59e5 100644
|
||||
--- a/bfd/elf32-i386.c
|
||||
+++ b/bfd/elf32-i386.c
|
||||
@@ -2368,8 +2368,13 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
|
||||
|
||||
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
|
||||
{
|
||||
- p->count -= p->pc_count;
|
||||
- p->pc_count = 0;
|
||||
+ /* Don't update reloc count if there are any non
|
||||
+ pc-relative relocs. */
|
||||
+ if (!h->pointer_equality_needed)
|
||||
+ {
|
||||
+ p->count -= p->pc_count;
|
||||
+ p->pc_count = 0;
|
||||
+ }
|
||||
if (p->count == 0)
|
||||
*pp = p->next;
|
||||
else
|
||||
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
|
||||
index edee8ec..999011b 100644
|
||||
--- a/bfd/elf64-x86-64.c
|
||||
+++ b/bfd/elf64-x86-64.c
|
||||
@@ -2463,8 +2463,13 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
|
||||
|
||||
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
|
||||
{
|
||||
- p->count -= p->pc_count;
|
||||
- p->pc_count = 0;
|
||||
+ /* Don't update reloc count if there are any non
|
||||
+ pc-relative relocs. */
|
||||
+ if (!h->pointer_equality_needed)
|
||||
+ {
|
||||
+ p->count -= p->pc_count;
|
||||
+ p->pc_count = 0;
|
||||
+ }
|
||||
if (p->count == 0)
|
||||
*pp = p->next;
|
||||
else
|
||||
--
|
||||
1.7.1
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
From 818d220a6fe3d0512a226188e9164245a02c9185 Mon Sep 17 00:00:00 2001
|
||||
From: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Tue, 14 Jan 2014 16:42:35 -0800
|
||||
Subject: [PATCH] Don't discard relocs against __ehdr_start
|
||||
|
||||
__ehdr_start will be defined by assign_file_positions_for_non_load_sections
|
||||
later.
|
||||
|
||||
PR ld/16428
|
||||
* elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
|
||||
against __ehdr_start.
|
||||
* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
|
||||
---
|
||||
bfd/ChangeLog | 7 +++++++
|
||||
bfd/elf32-i386.c | 7 +++++--
|
||||
bfd/elf64-x86-64.c | 7 +++++--
|
||||
3 files changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
#diff --git a/bfd/ChangeLog b/bfd/ChangeLog
|
||||
#index 7d13a35..f4acda0 100644
|
||||
#--- a/bfd/ChangeLog
|
||||
#+++ b/bfd/ChangeLog
|
||||
#@@ -1,5 +1,12 @@
|
||||
# 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
|
||||
#
|
||||
#+ PR ld/16428
|
||||
#+ * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
|
||||
#+ against __ehdr_start.
|
||||
#+ * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
|
||||
#+
|
||||
#+2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
|
||||
#+
|
||||
# * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
|
||||
# change.
|
||||
# * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
|
||||
Index: binutils-2.24/bfd/elf32-i386.c
|
||||
===================================================================
|
||||
--- binutils-2.24.orig/bfd/elf32-i386.c 2014-03-25 10:26:54.818385608 +0000
|
||||
+++ binutils-2.24/bfd/elf32-i386.c 2014-03-25 10:26:54.814385607 +0000
|
||||
@@ -2395,9 +2395,12 @@
|
||||
}
|
||||
|
||||
/* Also discard relocs on undefined weak syms with non-default
|
||||
- visibility. */
|
||||
+ visibility. Don't discard relocs against __ehdr_start which
|
||||
+ will be defined by assign_file_positions_for_non_load_sections
|
||||
+ later. */
|
||||
if (eh->dyn_relocs != NULL
|
||||
- && h->root.type == bfd_link_hash_undefweak)
|
||||
+ && h->root.type == bfd_link_hash_undefweak
|
||||
+ && strcmp (h->root.root.string, "__ehdr_start") != 0)
|
||||
{
|
||||
if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
|
||||
eh->dyn_relocs = NULL;
|
||||
Index: binutils-2.24/bfd/elf64-x86-64.c
|
||||
===================================================================
|
||||
--- binutils-2.24.orig/bfd/elf64-x86-64.c 2014-03-25 10:26:54.818385608 +0000
|
||||
+++ binutils-2.24/bfd/elf64-x86-64.c 2014-03-25 10:26:54.814385607 +0000
|
||||
@@ -2478,9 +2478,12 @@
|
||||
}
|
||||
|
||||
/* Also discard relocs on undefined weak syms with non-default
|
||||
- visibility. */
|
||||
+ visibility. Don't discard relocs against __ehdr_start which
|
||||
+ will be defined by assign_file_positions_for_non_load_sections
|
||||
+ later. */
|
||||
if (eh->dyn_relocs != NULL
|
||||
- && h->root.type == bfd_link_hash_undefweak)
|
||||
+ && h->root.type == bfd_link_hash_undefweak
|
||||
+ && strcmp (h->root.root.string, "__ehdr_start") != 0)
|
||||
{
|
||||
if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
|
||||
eh->dyn_relocs = NULL;
|
||||
@@ -0,0 +1,68 @@
|
||||
dpkg: Security Advisory - CVE-2014-3127
|
||||
|
||||
commit a12eb58959d0a10584a428f4a3103a49204c410f upstream
|
||||
|
||||
dpkg 1.15.9 on Debian squeeze introduces support for the "C-style
|
||||
encoded filenames" feature without recognizing that the squeeze patch
|
||||
program lacks this feature, which triggers an interaction error that
|
||||
allows remote attackers to conduct directory traversal attacks and
|
||||
modify files outside of the intended directories via a crafted source
|
||||
package.
|
||||
|
||||
NOTE: this can be considered a release engineering problem in the
|
||||
effort to fix CVE-2014-0471.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
|
||||
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
|
||||
=====================================================
|
||||
diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm
|
||||
--- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:32:41.765446564 +0800
|
||||
+++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:37:21.461446359 +0800
|
||||
@@ -324,31 +324,6 @@
|
||||
return $line;
|
||||
}
|
||||
|
||||
-my %ESCAPE = ((
|
||||
- 'a' => "\a",
|
||||
- 'b' => "\b",
|
||||
- 'f' => "\f",
|
||||
- 'n' => "\n",
|
||||
- 'r' => "\r",
|
||||
- 't' => "\t",
|
||||
- 'v' => "\cK",
|
||||
- '\\' => '\\',
|
||||
- '"' => '"',
|
||||
-), (
|
||||
- map { sprintf('%03o', $_) => chr($_) } (0..255)
|
||||
-));
|
||||
-
|
||||
-sub _unescape {
|
||||
- my ($diff, $str) = @_;
|
||||
-
|
||||
- if (exists $ESCAPE{$str}) {
|
||||
- return $ESCAPE{$str};
|
||||
- } else {
|
||||
- error(_g('diff %s patches file with unknown escape sequence \\%s'),
|
||||
- $diff, $str);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
# Fetch the header filename ignoring the optional timestamp
|
||||
sub _fetch_filename {
|
||||
my ($diff, $header) = @_;
|
||||
@@ -358,12 +333,7 @@
|
||||
|
||||
# Is it a C-style string?
|
||||
if ($header =~ m/^"/) {
|
||||
- $header =~ m/^"((?:[^\\"]|\\.)*)"/;
|
||||
- error(_g('diff %s patches file with unbalanced quote'), $diff)
|
||||
- unless defined $1;
|
||||
-
|
||||
- $header = $1;
|
||||
- $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg;
|
||||
+ error(_g('diff %s patches file with C-style encoded filename'), $diff);
|
||||
} else {
|
||||
# Tab is the official separator, it's always used when
|
||||
# filename contain spaces. Try it first, otherwise strip on space
|
||||
@@ -0,0 +1,97 @@
|
||||
dpkg: Security Advisory - CVE-2014-0471
|
||||
|
||||
commit a82651188476841d190c58693f95827d61959b51 upstream
|
||||
|
||||
Directory traversal vulnerability in the unpacking functionality in
|
||||
dpkg before 1.15.9, 1.16.x before 1.16.13, and 1.17.x before 1.17.8
|
||||
allows remote attackers to write arbitrary files via a crafted source
|
||||
package, related to "C-style filename quoting."
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
|
||||
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
|
||||
===================================================
|
||||
diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm
|
||||
--- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:24:07.422446284 +0800
|
||||
+++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:41:37.746446314 +0800
|
||||
@@ -324,14 +324,53 @@
|
||||
return $line;
|
||||
}
|
||||
|
||||
-# Strip timestamp
|
||||
-sub _strip_ts {
|
||||
- my $header = shift;
|
||||
-
|
||||
- # Tab is the official separator, it's always used when
|
||||
- # filename contain spaces. Try it first, otherwise strip on space
|
||||
- # if there's no tab
|
||||
- $header =~ s/\s.*// unless ($header =~ s/\t.*//);
|
||||
+my %ESCAPE = ((
|
||||
+ 'a' => "\a",
|
||||
+ 'b' => "\b",
|
||||
+ 'f' => "\f",
|
||||
+ 'n' => "\n",
|
||||
+ 'r' => "\r",
|
||||
+ 't' => "\t",
|
||||
+ 'v' => "\cK",
|
||||
+ '\\' => '\\',
|
||||
+ '"' => '"',
|
||||
+), (
|
||||
+ map { sprintf('%03o', $_) => chr($_) } (0..255)
|
||||
+));
|
||||
+
|
||||
+sub _unescape {
|
||||
+ my ($diff, $str) = @_;
|
||||
+
|
||||
+ if (exists $ESCAPE{$str}) {
|
||||
+ return $ESCAPE{$str};
|
||||
+ } else {
|
||||
+ error(_g('diff %s patches file with unknown escape sequence \\%s'),
|
||||
+ $diff, $str);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Fetch the header filename ignoring the optional timestamp
|
||||
+sub _fetch_filename {
|
||||
+ my ($diff, $header) = @_;
|
||||
+
|
||||
+ # Strip any leading spaces.
|
||||
+ $header =~ s/^\s+//;
|
||||
+
|
||||
+ # Is it a C-style string?
|
||||
+ if ($header =~ m/^"/) {
|
||||
+ $header =~ m/^"((?:[^\\"]|\\.)*)"/;
|
||||
+ error(_g('diff %s patches file with unbalanced quote'), $diff)
|
||||
+ unless defined $1;
|
||||
+
|
||||
+ $header = $1;
|
||||
+ $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg;
|
||||
+ } else {
|
||||
+ # Tab is the official separator, it's always used when
|
||||
+ # filename contain spaces. Try it first, otherwise strip on space
|
||||
+ # if there's no tab
|
||||
+ $header =~ s/\s.*// unless $header =~ s/\t.*//;
|
||||
+ }
|
||||
+
|
||||
return $header;
|
||||
}
|
||||
|
||||
@@ -400,7 +439,7 @@
|
||||
unless(s/^--- //) {
|
||||
error(_g("expected ^--- in line %d of diff `%s'"), $., $diff);
|
||||
}
|
||||
- $path{old} = $_ = _strip_ts($_);
|
||||
+ $path{old} = $_ = _fetch_filename($diff, $_);
|
||||
$fn{old} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/};
|
||||
if (/\.dpkg-orig$/) {
|
||||
error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff);
|
||||
@@ -412,7 +451,7 @@
|
||||
unless (s/^\+\+\+ //) {
|
||||
error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.);
|
||||
}
|
||||
- $path{new} = $_ = _strip_ts($_);
|
||||
+ $path{new} = $_ = _fetch_filename($diff, $_);
|
||||
$fn{new} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/};
|
||||
|
||||
unless (defined $fn{old} or defined $fn{new}) {
|
||||
@@ -12,6 +12,8 @@ SRC_URI += "file://noman.patch \
|
||||
file://dpkg-configure.service \
|
||||
file://glibc2.5-sync_file_range.patch \
|
||||
file://no-vla-warning.patch \
|
||||
file://dpkg-1.17.4-CVE-2014-0471.patch \
|
||||
file://dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "cc25086e1e3bd9512a95f14cfe9002e1"
|
||||
|
||||
@@ -163,6 +163,7 @@ for target_type in $YOCTOADT_TARGETS; do
|
||||
|
||||
# opkg will not install packagegroup-cross-canadian package if it was already
|
||||
# installed. So, the environment script is in one place or the other.
|
||||
[ -e "$INSTALL_FOLDER/$env_script_original" ] && env_script=$INSTALL_FOLDER/$env_script_original
|
||||
[ -e "$env_script_original" ] && env_script=$env_script_original
|
||||
[ -e "$env_script_relocated" ] && env_script=$env_script_relocated
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
perl:fix for CVE-2010-4777
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
The Perl_reg_numbered_buff_fetch function in Perl 5.10.0, 5.12.0,
|
||||
5.14.0, and other versions, when running with debugging enabled,
|
||||
allows context-dependent attackers to cause a denial of service
|
||||
(assertion failure and application exit) via crafted input that
|
||||
is not properly handled when using certain regular expressions,
|
||||
as demonstrated by causing SpamAssassin and OCSInventory to
|
||||
crash.
|
||||
|
||||
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-4777
|
||||
|
||||
Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
|
||||
--- a/regcomp.c
|
||||
+++ b/regcomp.c
|
||||
@@ -11868,8 +11868,25 @@ Perl_save_re_context(pTHX)
|
||||
|
||||
if (gvp) {
|
||||
GV * const gv = *gvp;
|
||||
- if (SvTYPE(gv) == SVt_PVGV && GvSV(gv))
|
||||
- save_scalar(gv);
|
||||
+ if (SvTYPE(gv) == SVt_PVGV && GvSV(gv)) {
|
||||
+ /* this is a copy of save_scalar() without the GETMAGIC call, RT#76538 */
|
||||
+ SV ** const sptr = &GvSVn(gv);
|
||||
+ SV * osv = *sptr;
|
||||
+ SV * nsv = newSV(0);
|
||||
+ save_pushptrptr(SvREFCNT_inc_simple(gv),
|
||||
+ SvREFCNT_inc(osv), SAVEt_SV);
|
||||
+ if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv) &&
|
||||
+ SvTYPE(osv) != SVt_PVGV) {
|
||||
+ if (SvGMAGICAL(osv)) {
|
||||
+ const bool oldtainted = PL_tainted;
|
||||
+ SvFLAGS(osv) |= (SvFLAGS(osv) &
|
||||
+ (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
|
||||
+ PL_tainted = oldtainted;
|
||||
+ }
|
||||
+ mg_localize(osv, nsv, 1);
|
||||
+ }
|
||||
+ *sptr = nsv;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,8 @@ SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
|
||||
file://MM_Unix.pm.patch \
|
||||
file://debian/errno_ver.diff \
|
||||
file://dynaloaderhack.patch \
|
||||
file://perl-build-in-t-dir.patch"
|
||||
file://perl-build-in-t-dir.patch \
|
||||
file://perl-5.14.3-fix-CVE-2010-4777.patch "
|
||||
|
||||
SRC_URI[md5sum] = "f6a3d878c688d111b495c87db56c5be5"
|
||||
SRC_URI[sha256sum] = "03638a4f01bc26b81231233671524b4163849a3a9ea5cc2397293080c4ea339f"
|
||||
|
||||
@@ -74,7 +74,8 @@ SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
|
||||
file://config.sh-32-be \
|
||||
file://config.sh-64 \
|
||||
file://config.sh-64-le \
|
||||
file://config.sh-64-be"
|
||||
file://config.sh-64-be \
|
||||
file://perl-5.14.3-fix-CVE-2010-4777.patch "
|
||||
# file://debian/fakeroot.diff
|
||||
|
||||
SRC_URI[md5sum] = "f6a3d878c688d111b495c87db56c5be5"
|
||||
|
||||
@@ -7,11 +7,7 @@ HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/pseudo"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
|
||||
SECTION = "base"
|
||||
LICENSE = "LGPL2.1"
|
||||
DEPENDS = "sqlite3"
|
||||
|
||||
SRC_URI_append_class-nativesdk = " file://symver.patch"
|
||||
|
||||
SRC_URI_append_class-native = " file://symver.patch"
|
||||
DEPENDS = "sqlite3 attr"
|
||||
|
||||
FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
|
||||
FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
require pseudo.inc
|
||||
|
||||
PR = "r4"
|
||||
|
||||
SRC_URI = " \
|
||||
http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
|
||||
file://0001-pseudo_has_unload-add-function.patch \
|
||||
file://shutdownping.patch \
|
||||
file://pseudo-1.5.1-install-directory-mode.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172"
|
||||
SRC_URI[sha256sum] = "3b896f592f4d568569bd02323fad2d6b8c398e16ca36ee5a8947d2ff6c1d3d52"
|
||||
|
||||
PSEUDO_EXTRA_OPTS ?= "--enable-force-async"
|
||||
10
meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
Normal file
10
meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
Normal file
@@ -0,0 +1,10 @@
|
||||
require pseudo.inc
|
||||
|
||||
SRC_URI = " \
|
||||
http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "4d7b4f9d1b4aafa680ce94a5a9a52f1f"
|
||||
SRC_URI[sha256sum] = "c72be92689511ced7c419149c6aaa1b1a9e4dfc6409d1f16ab72cc35bc1e376a"
|
||||
|
||||
PSEUDO_EXTRA_OPTS ?= "--enable-force-async"
|
||||
@@ -1,7 +1,7 @@
|
||||
require pseudo.inc
|
||||
|
||||
SRCREV = "b9eb2b5633b5a23efe72c950494728d93c2b5823"
|
||||
PV = "1.5.1+git${SRCPV}"
|
||||
SRCREV = "0dc29e7c67f25d0978a7da5cd8965514912c5b36"
|
||||
PV = "1.6.2+git${SRCPV}"
|
||||
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@ inherit autotools multilib_header python-dir pythonnative
|
||||
TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
|
||||
TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
|
||||
|
||||
# The following is a hack until we drop ac_cv_sizeof_off_t from site files
|
||||
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}"
|
||||
|
||||
do_configure_prepend() {
|
||||
rm -f ${S}/Makefile.orig
|
||||
autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
|
||||
|
||||
@@ -26,7 +26,7 @@ SRC_URI_append_class-native = "\
|
||||
file://fix-libcap-header-issue-on-some-distro.patch \
|
||||
"
|
||||
|
||||
EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --audio-drv-list=oss,alsa --disable-bluez --with-system-pixman --extra-cflags='${CFLAGS}'"
|
||||
EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --audio-drv-list=oss,alsa --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'"
|
||||
|
||||
EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror \
|
||||
"
|
||||
|
||||
@@ -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)
|
||||
77
meta/recipes-extended/bash/bash-3.2.48/cve-2014-6271.patch
Normal file
77
meta/recipes-extended/bash/bash-3.2.48/cve-2014-6271.patch
Normal 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 ----
|
||||
44
meta/recipes-extended/bash/bash-3.2.48/cve-2014-6277.patch
Normal file
44
meta/recipes-extended/bash/bash-3.2.48/cve-2014-6277.patch
Normal 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:
|
||||
99
meta/recipes-extended/bash/bash-3.2.48/cve-2014-6278.patch
Normal file
99
meta/recipes-extended/bash/bash-3.2.48/cve-2014-6278.patch
Normal 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 *));
|
||||
16
meta/recipes-extended/bash/bash-3.2.48/cve-2014-7169.patch
Normal file
16
meta/recipes-extended/bash/bash-3.2.48/cve-2014-7169.patch
Normal 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';
|
||||
}
|
||||
@@ -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 ()
|
||||
@@ -0,0 +1,175 @@
|
||||
Fix for exported function namespace change
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Downloaded from: http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-027
|
||||
|
||||
Author: Chet Ramey <chet.ramey@case.edu>
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
|
||||
|
||||
BASH PATCH REPORT
|
||||
=================
|
||||
|
||||
Bash-Release: 4.3
|
||||
Patch-ID: bash43-027
|
||||
|
||||
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.
|
||||
---
|
||||
diff -ruN a/variables.c b/variables.c
|
||||
--- a/variables.c 2014-09-30 10:21:12.481674914 +0200
|
||||
+++ b/variables.c 2014-09-30 10:21:40.820459492 +0200
|
||||
@@ -83,6 +83,11 @@
|
||||
|
||||
#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;
|
||||
|
||||
/* Variables used here and defined in other files. */
|
||||
@@ -279,7 +284,7 @@
|
||||
static void propagate_temp_var __P((PTR_T));
|
||||
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 *));
|
||||
static char **make_func_export_array __P((void));
|
||||
@@ -349,22 +354,33 @@
|
||||
|
||||
/* 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, though we still allow them to be defined as shell
|
||||
variables. */
|
||||
- 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));
|
||||
array_needs_making = 1;
|
||||
@@ -377,8 +393,11 @@
|
||||
array_needs_making = 1;
|
||||
}
|
||||
last_command_exit_value = 1;
|
||||
- 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)
|
||||
# if ARRAY_EXPORT
|
||||
@@ -2957,7 +2976,7 @@
|
||||
var->context = variable_context; /* XXX */
|
||||
|
||||
INVALIDATE_EXPORTSTR (var);
|
||||
- var->exportstr = mk_env_string (name, value);
|
||||
+ var->exportstr = mk_env_string (name, value, 0);
|
||||
|
||||
array_needs_making = 1;
|
||||
|
||||
@@ -3855,21 +3874,42 @@
|
||||
/* **************************************************************** */
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -3955,7 +3995,7 @@
|
||||
/* Gee, I'd like to get away with not using savestring() if we're
|
||||
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)
|
||||
SAVE_EXPORTSTR (var, list[list_index]);
|
||||
114
meta/recipes-extended/bash/bash/cve-2014-6271.patch
Normal file
114
meta/recipes-extended/bash/bash/cve-2014-6271.patch
Normal file
@@ -0,0 +1,114 @@
|
||||
Fix CVE-2014-6271, aka ShellShock. This is the upstream 4.3 patchlevel 25, minus the hunk to
|
||||
set the patch level.
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||
|
||||
BASH PATCH REPORT
|
||||
=================
|
||||
|
||||
Bash-Release: 4.3
|
||||
Patch-ID: bash43-025
|
||||
|
||||
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.3-patched/builtins/common.h 2013-07-08 16:54:47.000000000 -0400
|
||||
--- builtins/common.h 2014-09-12 14:25:47.000000000 -0400
|
||||
***************
|
||||
*** 34,37 ****
|
||||
--- 49,54 ----
|
||||
#define SEVAL_PARSEONLY 0x020
|
||||
#define SEVAL_NOLONGJMP 0x040
|
||||
+ #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */
|
||||
+ #define SEVAL_ONECMD 0x100 /* only allow a single command */
|
||||
|
||||
/* Flags for describe_command, shared between type.def and command.def */
|
||||
*** ../bash-4.3-patched/builtins/evalstring.c 2014-02-11 09:42:10.000000000 -0500
|
||||
--- builtins/evalstring.c 2014-09-14 14:15:13.000000000 -0400
|
||||
***************
|
||||
*** 309,312 ****
|
||||
--- 313,324 ----
|
||||
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");
|
||||
***************
|
||||
*** 369,372 ****
|
||||
--- 381,387 ----
|
||||
dispose_fd_bitmap (bitmap);
|
||||
discard_unwind_frame ("pe_dispose");
|
||||
+
|
||||
+ if (flags & SEVAL_ONECMD)
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
*** ../bash-4.3-patched/variables.c 2014-05-15 08:26:50.000000000 -0400
|
||||
--- variables.c 2014-09-14 14:23:35.000000000 -0400
|
||||
***************
|
||||
*** 359,369 ****
|
||||
strcpy (temp_string + char_index + 1, string);
|
||||
|
||||
! if (posixly_correct == 0 || legal_identifier (name))
|
||||
! 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))
|
||||
--- 364,372 ----
|
||||
strcpy (temp_string + char_index + 1, string);
|
||||
|
||||
! /* Don't import function names that are invalid identifiers from the
|
||||
! environment, though we still allow them to be defined as shell
|
||||
! variables. */
|
||||
! if (legal_identifier (name))
|
||||
! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
|
||||
|
||||
if (temp_var = find_function (name))
|
||||
***************
|
||||
*** 382,389 ****
|
||||
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)
|
||||
--- 385,388 ----
|
||||
*** ../bash-4.3-patched/subst.c 2014-08-11 11:16:35.000000000 -0400
|
||||
--- subst.c 2014-09-12 15:31:04.000000000 -0400
|
||||
***************
|
||||
*** 8048,8052 ****
|
||||
goto return0;
|
||||
}
|
||||
! else if (var = find_variable_last_nameref (temp1))
|
||||
{
|
||||
temp = nameref_cell (var);
|
||||
--- 8118,8124 ----
|
||||
goto return0;
|
||||
}
|
||||
! else if (var && (invisible_p (var) || var_isset (var) == 0))
|
||||
! temp = (char *)NULL;
|
||||
! else if ((var = find_variable_last_nameref (temp1)) && var_isset (var) && invisible_p (var) == 0)
|
||||
{
|
||||
temp = nameref_cell (var);
|
||||
44
meta/recipes-extended/bash/bash/cve-2014-6277.patch
Normal file
44
meta/recipes-extended/bash/bash/cve-2014-6277.patch
Normal 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:
|
||||
1191
meta/recipes-extended/bash/bash/cve-2014-6278.patch
Normal file
1191
meta/recipes-extended/bash/bash/cve-2014-6278.patch
Normal file
File diff suppressed because it is too large
Load Diff
16
meta/recipes-extended/bash/bash/cve-2014-7169.patch
Normal file
16
meta/recipes-extended/bash/bash/cve-2014-7169.patch
Normal 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';
|
||||
1315
meta/recipes-extended/bash/bash/cve-2014-7186_cve-2014-7187.patch
Normal file
1315
meta/recipes-extended/bash/bash/cve-2014-7186_cve-2014-7187.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -12,6 +12,12 @@ SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
|
||||
file://mkbuiltins_have_stringize.patch \
|
||||
file://build-tests.patch \
|
||||
file://test-output.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 \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
|
||||
@@ -9,6 +9,12 @@ SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
|
||||
file://mkbuiltins_have_stringize.patch \
|
||||
file://build-tests.patch \
|
||||
file://test-output.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 \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ SECTION = "devel"
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b4e3ffd607d6686c6cb2f63394370841"
|
||||
|
||||
DEPENDS = "e2fsprogs-native"
|
||||
|
||||
PACKAGECONFIG ?= "libxml2 zlib bz2"
|
||||
|
||||
PACKAGECONFIG_append_class-target = "\
|
||||
@@ -35,4 +37,13 @@ SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2
|
||||
|
||||
inherit autotools-brokensep lib_package
|
||||
|
||||
CPPFLAGS += "-I${WORKDIR}/extra-includes"
|
||||
|
||||
do_configure[cleandirs] += "${WORKDIR}/extra-includes"
|
||||
do_configure_prepend() {
|
||||
# We just need the headers for some type constants, so no need to
|
||||
# build all of e2fsprogs for the target
|
||||
cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
@@ -19,7 +19,7 @@ LIC_FILES_CHKSUM = "\
|
||||
file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
|
||||
"
|
||||
|
||||
DEPENDS = "attr libaio libcap acl openssl"
|
||||
DEPENDS = "attr libaio libcap acl openssl zip-native"
|
||||
SRCREV = "c8b3e28097e7d3208df9daceaf92c25eae87ebf0"
|
||||
|
||||
SRC_URI = "git://github.com/linux-test-project/ltp.git \
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From 9dcead87e6d7f66d34e7a56d11a30daca367dffb Mon Sep 17 00:00:00 2001
|
||||
From: "Dmitry V. Levin" <ldv@altlinux.org>
|
||||
Date: Wed, 26 Mar 2014 22:17:23 +0000
|
||||
Subject: [PATCH] pam_timestamp: fix potential directory traversal issue
|
||||
(ticket #27)
|
||||
|
||||
commit 9dcead87e6d7f66d34e7a56d11a30daca367dffb upstream
|
||||
|
||||
pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of
|
||||
the timestamp pathname it creates, so extra care should be taken to
|
||||
avoid potential directory traversal issues.
|
||||
|
||||
* modules/pam_timestamp/pam_timestamp.c (check_tty): Treat
|
||||
"." and ".." tty values as invalid.
|
||||
(get_ruser): Treat "." and ".." ruser values, as well as any ruser
|
||||
value containing '/', as invalid.
|
||||
|
||||
Fixes CVE-2014-2583.
|
||||
|
||||
Reported-by: Sebastian Krahmer <krahmer@suse.de>
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
|
||||
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
|
||||
---
|
||||
modules/pam_timestamp/pam_timestamp.c | 13 ++++++++++++-
|
||||
1 files changed, 12 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c
|
||||
index 5193733..b3f08b1 100644
|
||||
--- a/modules/pam_timestamp/pam_timestamp.c
|
||||
+++ b/modules/pam_timestamp/pam_timestamp.c
|
||||
@@ -158,7 +158,7 @@ check_tty(const char *tty)
|
||||
tty = strrchr(tty, '/') + 1;
|
||||
}
|
||||
/* Make sure the tty wasn't actually a directory (no basename). */
|
||||
- if (strlen(tty) == 0) {
|
||||
+ if (!strlen(tty) || !strcmp(tty, ".") || !strcmp(tty, "..")) {
|
||||
return NULL;
|
||||
}
|
||||
return tty;
|
||||
@@ -243,6 +243,17 @@ get_ruser(pam_handle_t *pamh, char *ruserbuf, size_t ruserbuflen)
|
||||
if (pwd != NULL) {
|
||||
ruser = pwd->pw_name;
|
||||
}
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * This ruser is used by format_timestamp_name as a component
|
||||
+ * of constructed timestamp pathname, so ".", "..", and '/'
|
||||
+ * are disallowed to avoid potential path traversal issues.
|
||||
+ */
|
||||
+ if (!strcmp(ruser, ".") ||
|
||||
+ !strcmp(ruser, "..") ||
|
||||
+ strchr(ruser, '/')) {
|
||||
+ ruser = NULL;
|
||||
+ }
|
||||
}
|
||||
if (ruser == NULL || strlen(ruser) >= ruserbuflen) {
|
||||
*ruserbuf = '\0';
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -25,6 +25,7 @@ SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
|
||||
file://libpam-fix-for-CVE-2010-4708.patch \
|
||||
file://pam-security-abstract-securetty-handling.patch \
|
||||
file://pam-unix-nullok-secure.patch \
|
||||
file://pam_timestamp-fix-potential-directory-traversal-issu.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4"
|
||||
SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2"
|
||||
|
||||
@@ -137,6 +137,14 @@ ttymxc3
|
||||
ttymxc4
|
||||
ttymxc5
|
||||
|
||||
# Freescale lpuart ports
|
||||
ttyLP0
|
||||
ttyLP1
|
||||
ttyLP2
|
||||
ttyLP3
|
||||
ttyLP4
|
||||
ttyLP5
|
||||
|
||||
# Standard serial ports, with devfs
|
||||
tts/0
|
||||
tts/1
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
From 18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7 Mon Sep 17 00:00:00 2001
|
||||
From: Darshit Shah <darnir@gmail.com>
|
||||
Date: Sun, 07 Sep 2014 19:11:17 +0000
|
||||
Subject: CVE-2014-4877: Arbitrary Symlink Access
|
||||
|
||||
Wget was susceptible to a symlink attack which could create arbitrary
|
||||
files, directories or symbolic links and set their permissions when
|
||||
retrieving a directory recursively through FTP. This commit changes the
|
||||
default settings in Wget such that Wget no longer creates local symbolic
|
||||
links, but rather traverses them and retrieves the pointed-to file in
|
||||
such a retrieval.
|
||||
|
||||
The old behaviour can be attained by passing the --retr-symlinks=no
|
||||
option to the Wget invokation command.
|
||||
---
|
||||
diff --git a/doc/wget.texi b/doc/wget.texi
|
||||
index aef1f80..d7a4c94 100644
|
||||
--- a/doc/wget.texi
|
||||
+++ b/doc/wget.texi
|
||||
@@ -1883,17 +1883,18 @@ Preserve remote file permissions instead of permissions set by umask.
|
||||
|
||||
@cindex symbolic links, retrieving
|
||||
@item --retr-symlinks
|
||||
-Usually, when retrieving @sc{ftp} directories recursively and a symbolic
|
||||
-link is encountered, the linked-to file is not downloaded. Instead, a
|
||||
-matching symbolic link is created on the local filesystem. The
|
||||
-pointed-to file will not be downloaded unless this recursive retrieval
|
||||
-would have encountered it separately and downloaded it anyway.
|
||||
-
|
||||
-When @samp{--retr-symlinks} is specified, however, symbolic links are
|
||||
-traversed and the pointed-to files are retrieved. At this time, this
|
||||
-option does not cause Wget to traverse symlinks to directories and
|
||||
-recurse through them, but in the future it should be enhanced to do
|
||||
-this.
|
||||
+By default, when retrieving @sc{ftp} directories recursively and a symbolic link
|
||||
+is encountered, the symbolic link is traversed and the pointed-to files are
|
||||
+retrieved. Currently, Wget does not traverse symbolic links to directories to
|
||||
+download them recursively, though this feature may be added in the future.
|
||||
+
|
||||
+When @samp{--retr-symlinks=no} is specified, the linked-to file is not
|
||||
+downloaded. Instead, a matching symbolic link is created on the local
|
||||
+filesystem. The pointed-to file will not be retrieved unless this recursive
|
||||
+retrieval would have encountered it separately and downloaded it anyway. This
|
||||
+option poses a security risk where a malicious FTP Server may cause Wget to
|
||||
+write to files outside of the intended directories through a specially crafted
|
||||
+@sc{.listing} file.
|
||||
|
||||
Note that when retrieving a file (not a directory) because it was
|
||||
specified on the command-line, rather than because it was recursed to,
|
||||
diff --git a/src/init.c b/src/init.c
|
||||
index 09557af..3bdaa48 100644
|
||||
--- a/src/init.c
|
||||
+++ b/src/init.c
|
||||
@@ -366,6 +366,22 @@ defaults (void)
|
||||
|
||||
opt.dns_cache = true;
|
||||
opt.ftp_pasv = true;
|
||||
+ /* 2014-09-07 Darshit Shah <darnir@gmail.com>
|
||||
+ * opt.retr_symlinks is set to true by default. Creating symbolic links on the
|
||||
+ * local filesystem pose a security threat by malicious FTP Servers that
|
||||
+ * server a specially crafted .listing file akin to this:
|
||||
+ *
|
||||
+ * lrwxrwxrwx 1 root root 33 Dec 25 2012 JoCxl6d8rFU -> /
|
||||
+ * drwxrwxr-x 15 1024 106 4096 Aug 28 02:02 JoCxl6d8rFU
|
||||
+ *
|
||||
+ * A .listing file in this fashion makes Wget susceptiple to a symlink attack
|
||||
+ * wherein the attacker is able to create arbitrary files, directories and
|
||||
+ * symbolic links on the target system and even set permissions.
|
||||
+ *
|
||||
+ * Hence, by default Wget attempts to retrieve the pointed-to files and does
|
||||
+ * not create the symbolic links locally.
|
||||
+ */
|
||||
+ opt.retr_symlinks = true;
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
opt.check_cert = true;
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
@@ -3,6 +3,7 @@ PR = "${INC_PR}.0"
|
||||
SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
|
||||
file://fix_makefile.patch \
|
||||
file://fix_doc.patch \
|
||||
file://wget_cve-2014-4877.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "12edc291dba8127f2e9696e69f36299e"
|
||||
SRC_URI[sha256sum] = "f3a6898e3a765bb94435b04a6668db9e5d19b3e90e0c69a503a2773ae936c269"
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From bdf15c249130568093676ed3b6c91f6f5e06f089 Mon Sep 17 00:00:00 2001
|
||||
From: Uli Schlachter <psychon@znc.in>
|
||||
Date: Mon, 21 Jul 2014 17:10:16 +0200
|
||||
Subject: [PATCH] Remove LTO support
|
||||
|
||||
This just never worked too well and caused too many issues. I don't think anyone
|
||||
will miss this.
|
||||
|
||||
As mentioned in the below bug report, proper LTO support also requires using
|
||||
special versions of ranlib, nm and ar which support the LTO object files.
|
||||
Otherwise, calling the normal ranlib on an .a library breaks the list of
|
||||
exported symbols and thus completely breaks the static library.
|
||||
|
||||
This (partly) reverts the following commits:
|
||||
|
||||
c3645d97ebd24c6f7ad850785d585aebc706a11c configure.ac: Add a --disable-lto configure option
|
||||
d486ea30f1a58640a1178de74f705a73845b1cda configure: Conditionally include -flto
|
||||
0870c6fb5b39dcc04fa376123848adde2d06d2ce gcc-4.5 warnings and optimisation flags.
|
||||
|
||||
(The last commit is the one which brought us -flto in the first place even
|
||||
though it doesn't talk about this. It's also the one which is only reverted
|
||||
partly.)
|
||||
|
||||
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77060
|
||||
CC: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
||||
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
|
||||
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||
|
||||
Upstream-Status: Backport (will be in 1.14*)
|
||||
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||
---
|
||||
build/configure.ac.warnings | 11 -----------
|
||||
1 file changed, 11 deletions(-)
|
||||
|
||||
diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
|
||||
index f984eb2..2c4e34d 100644
|
||||
--- a/build/configure.ac.warnings
|
||||
+++ b/build/configure.ac.warnings
|
||||
@@ -35,17 +35,6 @@ MAYBE_WARN="$MAYBE_WARN -erroff=E_ENUM_TYPE_MISMATCH_ARG \
|
||||
|
||||
dnl We also abuse the warning-flag facility to enable other compiler
|
||||
dnl options. Namely, the following:
|
||||
-
|
||||
-dnl -flto working really needs a test link, not just a compile
|
||||
-
|
||||
-safe_MAYBE_WARN="$MAYBE_WARN"
|
||||
-MAYBE_WARN="$MAYBE_WARN -flto"
|
||||
-AC_TRY_LINK([],[
|
||||
- int main(int argc, char **argv) { return 0; }
|
||||
-],[],[
|
||||
- MAYBE_WARN="$safe_MAYBE_WARN"
|
||||
-])
|
||||
-
|
||||
MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common"
|
||||
|
||||
dnl Also to turn various gcc/glibc-specific preprocessor checks
|
||||
--
|
||||
2.0.2
|
||||
|
||||
@@ -2,7 +2,9 @@ require cairo.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
|
||||
|
||||
SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz"
|
||||
SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
|
||||
file://0001-Remove-LTO-support.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "a1304edcdc99282f478b995ee5f8f854"
|
||||
SRC_URI[sha256sum] = "2505959eb3f1de3e1841023b61585bfd35684b9733c7b6a3643f4f4cbde6d846"
|
||||
|
||||
@@ -10,15 +10,15 @@ DEPENDS = "virtual/kernel"
|
||||
|
||||
inherit module
|
||||
|
||||
SRCREV = "fb2c37799306d16fb590aebee6fad8be431264b7"
|
||||
PV = "2.4.0"
|
||||
SRCREV = "85016adfb21268836df48dfb5cda106391e72fd1"
|
||||
PV = "2.4.2"
|
||||
|
||||
# lttng currently blacklists arm with gcc-4.8
|
||||
COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips).*-linux'
|
||||
|
||||
SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.4 \
|
||||
file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \
|
||||
file://bio-bvec-iter.patch"
|
||||
"
|
||||
|
||||
export INSTALL_MOD_DIR="kernel/lttng-modules"
|
||||
export KERNEL_SRC="${STAGING_KERNEL_DIR}"
|
||||
@@ -9,13 +9,16 @@ as well."
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
||||
|
||||
PR = "r8"
|
||||
PR = "r9"
|
||||
|
||||
require perf-features.inc
|
||||
|
||||
BUILDPERF_libc-uclibc = "no"
|
||||
|
||||
TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt', '',d)}"
|
||||
# gui support was added with kernel 3.6.35
|
||||
# since 3.10 libnewt was replaced by slang
|
||||
# to cover a wide range of kernel we add both dependencies
|
||||
TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}"
|
||||
SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}"
|
||||
|
||||
DEPENDS = "virtual/kernel \
|
||||
@@ -27,9 +30,6 @@ DEPENDS = "virtual/kernel \
|
||||
bison flex \
|
||||
"
|
||||
|
||||
SCRIPTING_RDEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl perl-modules python', '',d)}"
|
||||
RDEPENDS_${PN} += "elfutils bash ${SCRIPTING_RDEPENDS}"
|
||||
|
||||
PROVIDES = "virtual/perf"
|
||||
|
||||
inherit linux-kernel-base kernel-arch pythonnative
|
||||
@@ -76,7 +76,7 @@ EXTRA_OEMAKE = \
|
||||
CC="${CC}" \
|
||||
AR="${AR}" \
|
||||
perfexecdir=${libexecdir} \
|
||||
NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
|
||||
NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 NO_LIBUNWIND=1 ${SCRIPTING_DEFINES} \
|
||||
'
|
||||
|
||||
EXTRA_OEMAKE += "\
|
||||
@@ -112,7 +112,7 @@ do_install() {
|
||||
unset CFLAGS
|
||||
oe_runmake DESTDIR=${D} install
|
||||
# we are checking for this make target to be compatible with older perf versions
|
||||
if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0"]; then
|
||||
if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0" ]; then
|
||||
oe_runmake DESTDIR=${D} install-python_ext
|
||||
fi
|
||||
}
|
||||
@@ -153,8 +153,23 @@ python do_package_prepend() {
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
|
||||
PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python"
|
||||
|
||||
RDEPENDS_${PN} += "elfutils"
|
||||
RDEPENDS_${PN}-archive =+ "bash"
|
||||
RDEPENDS_${PN}-python =+ "bash python"
|
||||
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
|
||||
|
||||
RSUGGESTS_SCRIPTING = "${@perf_feature_enabled('perf-scripting', '${PN}-perl ${PN}-python', '',d)}"
|
||||
RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
|
||||
|
||||
FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent"
|
||||
FILES_${PN}-dbg += "${libdir}/python*/site-packages/.debug"
|
||||
FILES_${PN} += "${libdir}/python*/site-packages"
|
||||
FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
|
||||
FILES_${PN}-tests = "${libdir}/perf/perf-core/tests"
|
||||
FILES_${PN}-python = "${libdir}/python*/site-packages ${libdir}/perf/perf-core/scripts/python"
|
||||
FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl"
|
||||
|
||||
|
||||
INHIBIT_PACKAGE_DEBUG_SPLIT="1"
|
||||
|
||||
@@ -25,6 +25,7 @@ FILESPATH = "${FILE_DIRNAME}/trace-cmd"
|
||||
|
||||
do_install() {
|
||||
oe_runmake CC="${CC}" AR="${AR}" prefix="${prefix}" DESTDIR="${D}" install_gui
|
||||
rm ${D}${bindir}/trace-cmd
|
||||
rm -rf ${D}${datadir}/trace-cmd
|
||||
rmdir ${D}${datadir}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
gst-ffmpeg: aacdec: check channel count
|
||||
|
||||
Prevent out of array accesses
|
||||
|
||||
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
|
||||
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
|
||||
(cherry picked from commit 96f452ac647dae33c53c242ef3266b65a9beafb6)
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Yue Tao <yue.tao@windriver.com>
|
||||
---
|
||||
libavcodec/aacdec.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
|
||||
index 239153a..6c17c33 100644
|
||||
--- a/gst-libs/ext/libav/libavcodec/aacdec.c
|
||||
+++ b/gst-libs/ext/libav/libavcodec/aacdec.c
|
||||
@@ -914,6 +914,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (avctx->channels > MAX_CHANNELS) {
|
||||
+ av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
|
||||
+ return AVERROR_INVALIDDATA;
|
||||
+ }
|
||||
+
|
||||
AAC_INIT_VLC_STATIC( 0, 304);
|
||||
AAC_INIT_VLC_STATIC( 1, 270);
|
||||
AAC_INIT_VLC_STATIC( 2, 550);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From a99aff4e4bbef8e64b51f267cd1769214e1b4e80 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Niedermayer <michaelni@gmx.at>
|
||||
Date: Fri, 30 Aug 2013 23:40:47 +0200
|
||||
Subject: [PATCH] avcodec/dsputil: fix signedness in sizeof() comparissions
|
||||
|
||||
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
|
||||
(cherry picked from commit 454a11a1c9c686c78aa97954306fb63453299760)
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
|
||||
---
|
||||
libavcodec/dsputil.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
|
||||
index 53dc2eb..6264832 100644
|
||||
--- a/gst-libs/ext/libav/libavcodec/dsputil.c
|
||||
+++ b/gst-libs/ext/libav/libavcodec/dsputil.c
|
||||
@@ -1912,7 +1912,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type){
|
||||
|
||||
static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
|
||||
long i;
|
||||
- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
|
||||
+ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
|
||||
long a = *(long*)(src+i);
|
||||
long b = *(long*)(dst+i);
|
||||
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
|
||||
@@ -1937,7 +1937,7 @@ static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
|
||||
}
|
||||
}else
|
||||
#endif
|
||||
- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
|
||||
+ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
|
||||
long a = *(long*)(src1+i);
|
||||
long b = *(long*)(src2+i);
|
||||
*(long*)(dst+i) = ((a|pb_80) - (b&pb_7f)) ^ ((a^b^pb_80)&pb_80);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
gst-ffmpeg: avcodec/parser: reset indexes on realloc failure
|
||||
|
||||
Fixes Ticket2982
|
||||
|
||||
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
|
||||
(cherry picked from commit f31011e9abfb2ae75bb32bc44e2c34194c8dc40a)
|
||||
|
||||
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Yue Tao <yue.tao@windriver.com>
|
||||
|
||||
---
|
||||
libavcodec/parser.c | 10 +++++++---
|
||||
1 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
|
||||
index 2c6de6e..66eca06 100644
|
||||
--- a/gst-libs/ext/libav/libavcodec/parser.c
|
||||
+++ b/gst-libs/ext/libav/libavcodec/parser.c
|
||||
@@ -241,8 +241,10 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
|
||||
if(next == END_NOT_FOUND){
|
||||
void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
||||
- if(!new_buffer)
|
||||
+ if(!new_buffer) {
|
||||
+ pc->index = 0;
|
||||
return AVERROR(ENOMEM);
|
||||
+ }
|
||||
pc->buffer = new_buffer;
|
||||
memcpy(&pc->buffer[pc->index], *buf, *buf_size);
|
||||
pc->index += *buf_size;
|
||||
@@ -255,9 +257,11 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
|
||||
/* append to buffer */
|
||||
if(pc->index){
|
||||
void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
-
|
||||
- if(!new_buffer)
|
||||
+ if(!new_buffer) {
|
||||
+ pc->overread_index =
|
||||
+ pc->index = 0;
|
||||
return AVERROR(ENOMEM);
|
||||
+ }
|
||||
pc->buffer = new_buffer;
|
||||
if (next > -FF_INPUT_BUFFER_PADDING_SIZE)
|
||||
memcpy(&pc->buffer[pc->index], *buf,
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
gst-ffmpeg: avcodec/rpza: Perform pointer advance and checks before
|
||||
using the pointers
|
||||
|
||||
Fixes out of array accesses
|
||||
Fixes Ticket2850
|
||||
|
||||
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
|
||||
(cherry picked from commit 3819db745da2ac7fb3faacb116788c32f4753f34)
|
||||
|
||||
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Singed-off-by: Yue Tao <yue.tao@windriver.com>
|
||||
|
||||
---
|
||||
libavcodec/rpza.c | 8 ++++----
|
||||
1 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
|
||||
index 635b406..f291a95 100644
|
||||
--- a/gst-libs/ext/libav/libavcodec/rpza.c
|
||||
+++ b/gst-libs/ext/libav/libavcodec/rpza.c
|
||||
@@ -83,7 +83,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
unsigned short *pixels = (unsigned short *)s->frame.data[0];
|
||||
|
||||
int row_ptr = 0;
|
||||
- int pixel_ptr = 0;
|
||||
+ int pixel_ptr = -4;
|
||||
int block_ptr;
|
||||
int pixel_x, pixel_y;
|
||||
int total_blocks;
|
||||
@@ -139,6 +139,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
colorA = AV_RB16 (&s->buf[stream_ptr]);
|
||||
stream_ptr += 2;
|
||||
while (n_blocks--) {
|
||||
+ ADVANCE_BLOCK()
|
||||
block_ptr = row_ptr + pixel_ptr;
|
||||
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
||||
for (pixel_x = 0; pixel_x < 4; pixel_x++){
|
||||
@@ -147,7 +148,6 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
}
|
||||
block_ptr += row_inc;
|
||||
}
|
||||
- ADVANCE_BLOCK();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -184,6 +184,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
color4[2] |= ((21 * ta + 11 * tb) >> 5);
|
||||
|
||||
while (n_blocks--) {
|
||||
+ ADVANCE_BLOCK();
|
||||
block_ptr = row_ptr + pixel_ptr;
|
||||
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
||||
index = s->buf[stream_ptr++];
|
||||
@@ -194,12 +195,12 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
}
|
||||
block_ptr += row_inc;
|
||||
}
|
||||
- ADVANCE_BLOCK();
|
||||
}
|
||||
break;
|
||||
|
||||
/* Fill block with 16 colors */
|
||||
case 0x00:
|
||||
+ ADVANCE_BLOCK();
|
||||
block_ptr = row_ptr + pixel_ptr;
|
||||
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
||||
for (pixel_x = 0; pixel_x < 4; pixel_x++){
|
||||
@@ -213,7 +214,6 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
}
|
||||
block_ptr += row_inc;
|
||||
}
|
||||
- ADVANCE_BLOCK();
|
||||
break;
|
||||
|
||||
/* Unknown opcode */
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
gst-ffmpeg: error concealment: initialize block index.
|
||||
|
||||
Fixes CVE-2011-3941 (out of bounds write)
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
|
||||
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
|
||||
---
|
||||
libavcodec/error_resilience.c | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
|
||||
index 8bb5d0c..d55c000 100644
|
||||
--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
|
||||
+++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
|
||||
@@ -45,6 +45,9 @@ static void decode_mb(MpegEncContext *s, int ref){
|
||||
s->dest[1] = s->current_picture.data[1] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
|
||||
s->dest[2] = s->current_picture.data[2] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
|
||||
|
||||
+ ff_init_block_index(s);
|
||||
+ ff_update_block_index(s);
|
||||
+
|
||||
if(CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264){
|
||||
H264Context *h= (void*)s;
|
||||
h->mb_xy= s->mb_x + s->mb_y*s->mb_stride;
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
gst-ffmpeg: error_concealment: Check that the picture is not in a half
|
||||
|
||||
Fixes state becoming inconsistent
|
||||
Fixes a null pointer dereference
|
||||
|
||||
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
|
||||
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
|
||||
(cherry picked from commit 23318a57358358e7a4dc551e830e4503f0638cfe)
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Yue Tao <yue.tao@windriver.com>
|
||||
|
||||
---
|
||||
libavcodec/error_resilience.c | 6 ++++++
|
||||
1 files changed, 6 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
|
||||
index 01f7424..2b6bc42 100644
|
||||
--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
|
||||
+++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
|
||||
@@ -793,6 +793,12 @@ void ff_er_frame_end(MpegEncContext *s){
|
||||
s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled
|
||||
s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return;
|
||||
|
||||
+ if ( s->picture_structure == PICT_FRAME
|
||||
+ && s->current_picture.linesize[0] != s->current_picture_ptr->linesize[0]) {
|
||||
+ av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame not fully initialized\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if(s->current_picture.motion_val[0] == NULL){
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
|
||||
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user