mirror of
https://git.yoctoproject.org/poky
synced 2026-01-31 05:48:43 +01:00
Compare commits
24 Commits
dylan-9.0.
...
dylan
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fcfdc4d54 | ||
|
|
a04380fd0f | ||
|
|
6e08651e39 | ||
|
|
a92ee6a03f | ||
|
|
057a68d8ff | ||
|
|
b690589385 | ||
|
|
c0456385ce | ||
|
|
4b302b8fa0 | ||
|
|
7a9908432f | ||
|
|
b91889fb3e | ||
|
|
35ed0a06be | ||
|
|
c78877b07e | ||
|
|
02037d7daa | ||
|
|
804f6f71c5 | ||
|
|
bbdfb0ff1a | ||
|
|
6714a6c59a | ||
|
|
706dcccb5a | ||
|
|
033f5a5fa5 | ||
|
|
efdb05cf31 | ||
|
|
e5ac7abc95 | ||
|
|
d3bc30f75b | ||
|
|
889f731acc | ||
|
|
f3df1c7e77 | ||
|
|
32ed21cc09 |
@@ -81,6 +81,11 @@
|
||||
<date>May 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.4.5</revnumber>
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -93,6 +93,11 @@
|
||||
<date>May 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.4.5</revnumber>
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
|
||||
section in the Yocto Project Board Support Package (BSP) Developer's Guide.
|
||||
For more complete information on how to work with the kernel, see the
|
||||
<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel
|
||||
Development Manual</ulink>.
|
||||
<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>User Application Development:</emphasis>
|
||||
User Application Development covers development of applications that you intend
|
||||
@@ -131,7 +130,7 @@
|
||||
<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'><filename>yocto-bsp</filename></ulink> script</emphasis>:
|
||||
Layers are ideal for
|
||||
isolating and storing work for a given piece of hardware.
|
||||
A layer is really just a location or area in which you place
|
||||
A layer is really just a location or area in which you place
|
||||
the recipes and configurations for your BSP.
|
||||
In fact, a BSP is, in itself, a special type of layer.
|
||||
The simplest way to create a new BSP layer that is compliant with the
|
||||
@@ -165,7 +164,7 @@
|
||||
Romley, sys940x, Sugar Bay, and tlk exist in their own separate layers
|
||||
within the larger <filename>meta-intel</filename> layer.</note>
|
||||
<para>When you set up a layer for a new BSP, you should follow a standard layout.
|
||||
This layout is described in the
|
||||
This layout is described in the
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
|
||||
section of the Board Support Package (BSP) Development Guide.
|
||||
In the standard layout, you will notice a suggested structure for recipes and
|
||||
@@ -343,10 +342,10 @@
|
||||
If you are working in the kernel all the time, you probably would want
|
||||
to set up your own local Git repository of the kernel tree.
|
||||
If you just need to make some patches to the kernel, you can access
|
||||
temporary kernel source files that were extracted and used
|
||||
temporary kernel source files that were extracted and used
|
||||
during a build.
|
||||
We will just talk about working with the temporary source code.
|
||||
For more information on how to get kernel source code onto your
|
||||
For more information on how to get kernel source code onto your
|
||||
host system, see the
|
||||
"<link linkend='local-kernel-files'>Yocto Project Kernel</link>"
|
||||
bulleted item earlier in the manual.
|
||||
@@ -411,7 +410,7 @@
|
||||
"<link linkend='local-yp-release'>Yocto Project Release</link>" earlier in this manual.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Establish the temporary kernel source files</emphasis>:
|
||||
Temporary kernel source files are kept in the
|
||||
Temporary kernel source files are kept in the
|
||||
<link linkend='build-directory'>Build Directory</link>
|
||||
created by the
|
||||
OpenEmbedded build system when you run BitBake.
|
||||
@@ -474,7 +473,7 @@
|
||||
Application development involves creating an application that you want
|
||||
to run on your target hardware, which is running a kernel image created using the
|
||||
OpenEmbedded build system.
|
||||
The Yocto Project provides an
|
||||
The Yocto Project provides an
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#adt-intro-section'>Application Development Toolkit (ADT)</ulink>
|
||||
and stand-alone
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#the-cross-development-toolchain'>cross-development toolchains</ulink>
|
||||
@@ -950,7 +949,7 @@
|
||||
and then click "Next".</para></listitem>
|
||||
<listitem><para>Select the root directory and browse to
|
||||
<filename>~/yocto-eclipse/plugins</filename>.</para></listitem>
|
||||
<listitem><para>Three plug-ins exist:
|
||||
<listitem><para>Three plug-ins exist:
|
||||
<filename>org.yocto.bc.ui</filename>,
|
||||
<filename>org.yocto.sdk.ide</filename>, and
|
||||
<filename>org.yocto.sdk.remotetools</filename>.
|
||||
@@ -980,7 +979,7 @@
|
||||
<para>
|
||||
To start, you need to do the following from within the Eclipse IDE:
|
||||
<itemizedlist>
|
||||
<listitem><para>Choose "Preferences" from the
|
||||
<listitem><para>Choose "Preferences" from the
|
||||
"Windows" menu to display
|
||||
the Preferences Dialog</para></listitem>
|
||||
<listitem><para>Click "Yocto Project ADT"</para></listitem>
|
||||
@@ -1010,7 +1009,7 @@
|
||||
<listitem><para><emphasis>
|
||||
<filename>Build System Derived Toolchain:</filename></emphasis>
|
||||
Select this mode if the cross-toolchain has been installed and built
|
||||
as part of the
|
||||
as part of the
|
||||
<link linkend='build-directory'>Build Directory</link>.
|
||||
When you select <filename>Build system derived toolchain</filename>,
|
||||
you are using the toolchain bundled
|
||||
@@ -1022,7 +1021,7 @@
|
||||
If you are using a stand-alone pre-built toolchain, you should be pointing to the
|
||||
where it is installed.
|
||||
If you used the ADT Installer script and accepted the default
|
||||
installation directory, the toolchain will be installed in
|
||||
installation directory, the toolchain will be installed in
|
||||
the <filename>&YOCTO_ADTPATH_DIR;</filename> directory.
|
||||
Sections "<ulink url='&YOCTO_DOCS_ADT_URL;#configuring-and-running-the-adt-installer-script'>Configuring
|
||||
and Running the ADT Installer Script</ulink>" and
|
||||
@@ -1034,17 +1033,17 @@
|
||||
field is the <link linkend='build-directory'>Build Directory</link>.
|
||||
See the "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using
|
||||
BitBake and the Build Directory</ulink>" section in the Yocto Project Application
|
||||
Developer's Guide for information on how to install
|
||||
Developer's Guide for information on how to install
|
||||
the toolchain into the Build Directory.</para></listitem>
|
||||
<listitem><para><emphasis>Specify the Sysroot Location:</emphasis>
|
||||
This location is where the root filesystem for the target hardware resides.
|
||||
If you used the ADT Installer script and accepted the
|
||||
If you used the ADT Installer script and accepted the
|
||||
default installation directory, then the location is
|
||||
<filename>/opt/poky/<release></filename>.
|
||||
Additionally, when you use the ADT Installer script,
|
||||
the same location is used for
|
||||
the QEMU user-space tools and the NFS boot process.</para>
|
||||
<para>If you used either of the other two methods to
|
||||
<para>If you used either of the other two methods to
|
||||
install the toolchain or did not accept the ADT Installer
|
||||
script's default installation directory, then the
|
||||
location of the sysroot filesystem depends on where you separately
|
||||
@@ -1160,7 +1159,7 @@
|
||||
configurations.
|
||||
You can override these settings for a given project by following these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Select "Change Yocto Project Settings" from the
|
||||
<listitem><para>Select "Change Yocto Project Settings" from the
|
||||
"Project" menu.
|
||||
This selection brings up the Yocto Project Settings Dialog
|
||||
and allows you to make changes specific to an individual project.
|
||||
@@ -1170,14 +1169,14 @@
|
||||
Dialog as described earlier
|
||||
in the "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse
|
||||
Yocto Plug-in</link>" section.
|
||||
The Yocto Project Settings Dialog allows you to override
|
||||
The Yocto Project Settings Dialog allows you to override
|
||||
those default settings for a given project.</para></listitem>
|
||||
<listitem><para>Make your configurations for the project and click "OK".
|
||||
If you are running the Juno version of Eclipse, you can skip down to the next
|
||||
section where you build the project.
|
||||
If you are not working with Juno, you need to reconfigure the project as
|
||||
described in the next step.</para></listitem>
|
||||
<listitem><para>Select "Reconfigure Project" from the
|
||||
<listitem><para>Select "Reconfigure Project" from the
|
||||
"Project" menu.
|
||||
This selection reconfigures the project by running
|
||||
<filename>autogen.sh</filename> in the workspace for your project.
|
||||
@@ -1197,7 +1196,7 @@
|
||||
<para>
|
||||
To build the project in Juno, right click on the project in the navigator pane and select
|
||||
"Build Project".
|
||||
If you are not running Juno, select "Build Project" from the
|
||||
If you are not running Juno, select "Build Project" from the
|
||||
"Project" menu.
|
||||
The console should update and you can note the cross-compiler you are using.
|
||||
</para>
|
||||
@@ -1209,7 +1208,7 @@
|
||||
<para>
|
||||
To start the QEMU emulator from within Eclipse, follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Expose and select "External Tools" from
|
||||
<listitem><para>Expose and select "External Tools" from
|
||||
the "Run" menu.
|
||||
Your image should appear as a selectable menu item.
|
||||
</para></listitem>
|
||||
@@ -1232,12 +1231,12 @@
|
||||
<title>Deploying and Debugging the Application</title>
|
||||
|
||||
<para>
|
||||
Once the QEMU emulator is running the image, you can deploy
|
||||
your application using the Eclipse IDE and use then use
|
||||
Once the QEMU emulator is running the image, you can deploy
|
||||
your application using the Eclipse IDE and use then use
|
||||
the emulator to perform debugging.
|
||||
Follow these steps to deploy the application.
|
||||
<orderedlist>
|
||||
<listitem><para>Select "Debug Configurations..." from the
|
||||
<listitem><para>Select "Debug Configurations..." from the
|
||||
"Run" menu.</para></listitem>
|
||||
<listitem><para>In the left area, expand <filename>C/C++Remote Application</filename>.</para></listitem>
|
||||
<listitem><para>Locate your project and select it to bring up a new
|
||||
@@ -1258,7 +1257,7 @@
|
||||
determined earlier.</para></listitem>
|
||||
<listitem><para>Click "Finish" to close the
|
||||
New Connections Dialog.</para></listitem>
|
||||
<listitem><para>Use the drop-down menu now in the
|
||||
<listitem><para>Use the drop-down menu now in the
|
||||
"Connection" field and pick the IP Address you entered.
|
||||
</para></listitem>
|
||||
<listitem><para>Click "Run" to bring up a login screen
|
||||
@@ -1315,8 +1314,8 @@
|
||||
display the output.
|
||||
For information on how to use Lttng to trace an application,
|
||||
see <ulink url='http://lttng.org/documentation'></ulink>
|
||||
and the
|
||||
"<ulink url='&YOCTO_DOCS_PROF_URL;#lttng-linux-trace-toolkit-next-generation'>LTTng (Linux Trace Toolkit, next generation)</ulink>"
|
||||
and the
|
||||
"<ulink url='&YOCTO_DOCS_PROF_URL;#lttng-linux-trace-toolkit-next-generation'>LTTng (Linux Trace Toolkit, next generation)</ulink>"
|
||||
section, which is in the Yocto Project Profiling and Tracing Manual.
|
||||
<note>Do not use <filename>Lttng-user space (legacy)</filename> tool.
|
||||
This tool no longer has any upstream support.</note>
|
||||
@@ -1326,18 +1325,18 @@
|
||||
Tracing project.
|
||||
Do the following:
|
||||
<orderedlist>
|
||||
<listitem><para>Select "Open Perspective" from the
|
||||
<listitem><para>Select "Open Perspective" from the
|
||||
"Window" menu and then select "Tracing".</para></listitem>
|
||||
<listitem><para>Click "OK" to change the Eclipse perspective
|
||||
into the Tracing perspective.</para></listitem>
|
||||
<listitem><para>Create a new Tracing project by selecting
|
||||
"Project" from the "File -> New" menu.</para></listitem>
|
||||
<listitem><para>Choose "Tracing Project" from the
|
||||
<listitem><para>Choose "Tracing Project" from the
|
||||
"Tracing" menu.
|
||||
</para></listitem>
|
||||
<listitem><para>Generate your tracing data on the remote target.
|
||||
</para></listitem>
|
||||
<listitem><para>Select "Lttng2.0 ust trace import" from
|
||||
<listitem><para>Select "Lttng2.0 ust trace import" from
|
||||
the "Yocto Project Tools" menu to
|
||||
start the data import process.</para></listitem>
|
||||
<listitem><para>Specify your remote connection name.</para></listitem>
|
||||
@@ -1348,8 +1347,8 @@
|
||||
<listitem><para>Click "OK" to complete the import process.
|
||||
The data is now in the local tracing project you created.</para></listitem>
|
||||
<listitem><para>Right click on the data and then use the menu to
|
||||
Select "Generic CTF Trace" from the
|
||||
"Trace Type... -> Common Trace Format" menu to map
|
||||
Select "Generic CTF Trace" from the
|
||||
"Trace Type... -> Common Trace Format" menu to map
|
||||
the tracing type.</para></listitem>
|
||||
<listitem><para>Right click the mouse and select "Open"
|
||||
to bring up the Eclipse Lttng Trace Viewer so you
|
||||
@@ -1386,7 +1385,7 @@
|
||||
|
||||
<para>
|
||||
Within the Eclipse IDE, you can create a Yocto BitBake Commander project,
|
||||
edit the <link linkend='metadata'>Metadata</link>, and then use
|
||||
edit the <link linkend='metadata'>Metadata</link>, and then use
|
||||
<ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink> to build a customized
|
||||
image all within one IDE.
|
||||
</para>
|
||||
@@ -1397,16 +1396,16 @@
|
||||
<para>
|
||||
To create a Yocto BitBake Commander project, follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Select "Other" from the
|
||||
"Window -> Open Perspective" menu
|
||||
<listitem><para>Select "Other" from the
|
||||
"Window -> Open Perspective" menu
|
||||
and then choose "Bitbake Commander".</para></listitem>
|
||||
<listitem><para>Click "OK" to change the perspective to
|
||||
Bitbake Commander.</para></listitem>
|
||||
<listitem><para>Select "Project" from the "File -> New"
|
||||
menu to create a new Yocto
|
||||
Bitbake Commander project.</para></listitem>
|
||||
<listitem><para>Choose "New Yocto Project" from the
|
||||
"Yocto Project Bitbake Commander" menu and click
|
||||
<listitem><para>Choose "New Yocto Project" from the
|
||||
"Yocto Project Bitbake Commander" menu and click
|
||||
"Next".</para></listitem>
|
||||
<listitem><para>Enter the Project Name and choose the Project Location.
|
||||
The Yocto project's Metadata files will be put under the directory
|
||||
@@ -1424,7 +1423,7 @@
|
||||
<title>Editing the Metadata</title>
|
||||
|
||||
<para>
|
||||
After you create the Yocto Bitbake Commander project, you can modify the
|
||||
After you create the Yocto Bitbake Commander project, you can modify the
|
||||
<link linkend='metadata'>Metadata</link> files
|
||||
by opening them in the project.
|
||||
When editing recipe files (<filename>.bb</filename> files), you can view BitBake
|
||||
@@ -1436,8 +1435,8 @@
|
||||
To edit the Metadata, follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Select your Yocto Bitbake Commander project.</para></listitem>
|
||||
<listitem><para>Select "BitBake Recipe" from the
|
||||
"File -> New -> Yocto BitBake Commander" menu
|
||||
<listitem><para>Select "BitBake Recipe" from the
|
||||
"File -> New -> Yocto BitBake Commander" menu
|
||||
to open a new recipe wizard.</para></listitem>
|
||||
<listitem><para>Point to your source by filling in the "SRC_URL" field.
|
||||
For example, you can add a recipe to your
|
||||
@@ -1459,13 +1458,13 @@
|
||||
<title>Building and Customizing the Image Using Hob</title>
|
||||
|
||||
<para>
|
||||
To build and customize the image using Hob from within the
|
||||
To build and customize the image using Hob from within the
|
||||
Eclipse IDE, follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Select your Yocto Bitbake Commander project.</para></listitem>
|
||||
<listitem><para>Select "Launch Hob" from the "Project"
|
||||
menu.</para></listitem>
|
||||
<listitem><para>Enter the
|
||||
<listitem><para>Enter the
|
||||
<link linkend='build-directory'>Build Directory</link>
|
||||
where you want to put your final images.</para></listitem>
|
||||
<listitem><para>Click "OK" to launch Hob.</para></listitem>
|
||||
@@ -1508,7 +1507,7 @@
|
||||
support development using actual hardware.
|
||||
For example, the area might contain
|
||||
<filename>.hddimg</filename> files that combine the
|
||||
kernel image with the filesystem, boot loaders, and
|
||||
kernel image with the filesystem, boot loaders, and
|
||||
so forth.
|
||||
Be sure to get the files you need for your particular
|
||||
development process.</para>
|
||||
@@ -1879,9 +1878,9 @@
|
||||
|
||||
<para>
|
||||
For a better understanding of Hob, see the project page at
|
||||
<ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'></ulink>
|
||||
<ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'></ulink>
|
||||
on the Yocto Project website.
|
||||
If you follow the "Documentation" link from the Hob page, you will
|
||||
If you follow the "Documentation" link from the Hob page, you will
|
||||
find a short introductory training video on Hob.
|
||||
The following lists some features of Hob:
|
||||
<itemizedlist>
|
||||
@@ -1893,9 +1892,9 @@
|
||||
<listitem><para>You can set the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
|
||||
for which you are building the image.</para></listitem>
|
||||
<listitem><para>You can modify various policy settings such as the
|
||||
<listitem><para>You can modify various policy settings such as the
|
||||
package format with which to build,
|
||||
the parallelism BitBake uses, whether or not to build an
|
||||
the parallelism BitBake uses, whether or not to build an
|
||||
external toolchain, and which host to build against.
|
||||
</para></listitem>
|
||||
<listitem><para>You can manage
|
||||
|
||||
@@ -71,6 +71,11 @@
|
||||
<date>May 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.4.5</revnumber>
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
<date>May 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.4.5</revnumber>
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
@@ -71,7 +76,7 @@
|
||||
<note>
|
||||
Due to production processes, there could be differences between the Yocto Project
|
||||
documentation bundled in the release tarball and the
|
||||
<ulink url='&YOCTO_DOCS_KERNEL_URL;'>Yocto Project Linux Kernel Development Manual</ulink> on
|
||||
<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink> on
|
||||
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
||||
For the latest version of this manual, see the manual on the website.
|
||||
</note>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<!ENTITY DISTRO "1.4.4">
|
||||
<!ENTITY DISTRO_COMPRESSED "144">
|
||||
<!ENTITY DISTRO "1.4.5">
|
||||
<!ENTITY DISTRO_COMPRESSED "145">
|
||||
<!ENTITY DISTRO_NAME "dylan">
|
||||
<!ENTITY YOCTO_DOC_VERSION "1.4.4">
|
||||
<!ENTITY POKYVERSION "9.0.3">
|
||||
<!ENTITY POKYVERSION_COMPRESSED "904">
|
||||
<!ENTITY YOCTO_DOC_VERSION "1.4.5">
|
||||
<!ENTITY POKYVERSION "9.0.5">
|
||||
<!ENTITY POKYVERSION_COMPRESSED "905">
|
||||
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
||||
<!ENTITY COPYRIGHT_YEAR "2010-2014">
|
||||
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<chapter id='profile-manual-intro'>
|
||||
|
||||
<title>Yocto Project Tracing and Profiling Manual</title>
|
||||
<title>Yocto Project Profiling and Tracing Manual</title>
|
||||
<section id='intro'>
|
||||
<title>Introduction</title>
|
||||
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
<date>May 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.4.5</revnumber>
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
@@ -74,7 +79,7 @@
|
||||
<note>
|
||||
Due to production processes, there could be differences between the Yocto Project
|
||||
documentation bundled in the release tarball and the
|
||||
<ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Tracing and Profiling Manual</ulink> on
|
||||
<ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink> on
|
||||
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
||||
For the latest version of this manual, see the manual on the website.
|
||||
</note>
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
<date>May 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.4 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.4.5</revnumber>
|
||||
<date>July 2014</date>
|
||||
<revremark>Released with the Yocto Project 1.4.5 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Processes ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.4\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
|
||||
# Processes all other manuals (<word>-<word> style)
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.4\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
|
||||
# Process cases where just an external manual is referenced without an id anchor
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.4\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.4\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.4\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.4\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.4\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profile and Tracing Manual<\/a>/Yocto Project Profile and Tracing Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.4\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.4\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.4.5\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
|
||||
|
||||
@@ -372,7 +372,7 @@ kernel_do_deploy() {
|
||||
if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
|
||||
mkdir -p ${D}/lib
|
||||
tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
|
||||
ln -sf ${MODULE_TARBALL_BASE_NAME}.bin ${MODULE_TARBALL_SYMLINK_NAME}
|
||||
ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
|
||||
fi
|
||||
|
||||
cd ${DEPLOYDIR}
|
||||
|
||||
@@ -431,13 +431,14 @@ def sstate_package(ss, d):
|
||||
if not link.startswith(tmpdir):
|
||||
return
|
||||
|
||||
depth = link.rpartition(tmpdir)[2].count('/')
|
||||
depth = outputpath.rpartition(tmpdir)[2].count('/')
|
||||
base = link.partition(tmpdir)[2].strip()
|
||||
while depth > 1:
|
||||
base = "../" + base
|
||||
base = "/.." + base
|
||||
depth -= 1
|
||||
base = "." + base
|
||||
|
||||
bb.debug(2, "Replacing absolute path %s with relative path %s" % (link, base))
|
||||
bb.debug(2, "Replacing absolute path %s with relative path %s for %s" % (link, base, outputpath))
|
||||
os.remove(path)
|
||||
os.symlink(base, path)
|
||||
|
||||
@@ -455,11 +456,11 @@ def sstate_package(ss, d):
|
||||
for walkroot, dirs, files in os.walk(state[1]):
|
||||
for file in files:
|
||||
srcpath = os.path.join(walkroot, file)
|
||||
dstpath = srcpath.replace(state[1], sstatebuild + state[0])
|
||||
dstpath = srcpath.replace(state[1], state[2])
|
||||
make_relative_symlink(srcpath, dstpath, d)
|
||||
for dir in dirs:
|
||||
srcpath = os.path.join(walkroot, dir)
|
||||
dstpath = srcpath.replace(state[1], sstatebuild + state[0])
|
||||
dstpath = srcpath.replace(state[1], state[2])
|
||||
make_relative_symlink(srcpath, dstpath, d)
|
||||
bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0]))
|
||||
oe.path.copyhardlinktree(state[1], sstatebuild + state[0])
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
commit 208d54db20d58c9a5e45e856a0650caadd7d9612
|
||||
Author: Dr. Stephen Henson <steve@openssl.org>
|
||||
Date: Tue May 13 18:48:31 2014 +0100
|
||||
|
||||
Fix for CVE-2014-0195
|
||||
|
||||
A buffer overrun attack can be triggered by sending invalid DTLS fragments
|
||||
to an OpenSSL DTLS client or server. This is potentially exploitable to
|
||||
run arbitrary code on a vulnerable client or server.
|
||||
|
||||
Fixed by adding consistency check for DTLS fragments.
|
||||
|
||||
Thanks to Jüri Aedla for reporting this issue.
|
||||
|
||||
Patch borrowed from Fedora
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
|
||||
index 2e8cf68..07f67f8 100644
|
||||
--- a/ssl/d1_both.c
|
||||
+++ b/ssl/d1_both.c
|
||||
@@ -627,7 +627,16 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
frag->msg_header.frag_off = 0;
|
||||
}
|
||||
else
|
||||
+ {
|
||||
frag = (hm_fragment*) item->data;
|
||||
+ if (frag->msg_header.msg_len != msg_hdr->msg_len)
|
||||
+ {
|
||||
+ item = NULL;
|
||||
+ frag = NULL;
|
||||
+ goto err;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
/* If message is already reassembled, this must be a
|
||||
* retransmit and can be dropped.
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From: Matt Caswell <matt@openssl.org>
|
||||
Date: Sun, 11 May 2014 23:38:37 +0000 (+0100)
|
||||
Subject: Fixed NULL pointer dereference. See PR#3321
|
||||
X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=b107586
|
||||
|
||||
Fixed NULL pointer dereference. See PR#3321
|
||||
|
||||
Patch borrowed from Fedora
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
|
||||
index 40eb0dd..d961d12 100644
|
||||
--- a/ssl/s3_pkt.c
|
||||
+++ b/ssl/s3_pkt.c
|
||||
@@ -657,9 +657,6 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
|
||||
SSL3_BUFFER *wb=&(s->s3->wbuf);
|
||||
SSL_SESSION *sess;
|
||||
|
||||
- if (wb->buf == NULL)
|
||||
- if (!ssl3_setup_write_buffer(s))
|
||||
- return -1;
|
||||
|
||||
/* first check if there is a SSL3_BUFFER still being written
|
||||
* out. This will happen with non blocking IO */
|
||||
@@ -675,6 +672,10 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
|
||||
/* if it went, fall through and send more stuff */
|
||||
}
|
||||
|
||||
+ if (wb->buf == NULL)
|
||||
+ if (!ssl3_setup_write_buffer(s))
|
||||
+ return -1;
|
||||
+
|
||||
if (len == 0 && !create_empty_fragment)
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
commit d30e582446b027868cdabd0994681643682045a4
|
||||
Author: Dr. Stephen Henson <steve@openssl.org>
|
||||
Date: Fri May 16 13:00:45 2014 +0100
|
||||
|
||||
Fix CVE-2014-0221
|
||||
|
||||
Unnecessary recursion when receiving a DTLS hello request can be used to
|
||||
crash a DTLS client. Fixed by handling DTLS hello request without recursion.
|
||||
|
||||
Thanks to Imre Rad (Search-Lab Ltd.) for discovering this issue.
|
||||
|
||||
Patch borrowed from Fedora
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
|
||||
index 07f67f8..4c2fd03 100644
|
||||
--- a/ssl/d1_both.c
|
||||
+++ b/ssl/d1_both.c
|
||||
@@ -793,6 +793,7 @@ dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok)
|
||||
int i,al;
|
||||
struct hm_header_st msg_hdr;
|
||||
|
||||
+ redo:
|
||||
/* see if we have the required fragment already */
|
||||
if ((frag_len = dtls1_retrieve_buffered_fragment(s,max,ok)) || *ok)
|
||||
{
|
||||
@@ -851,8 +852,7 @@ dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok)
|
||||
s->msg_callback_arg);
|
||||
|
||||
s->init_num = 0;
|
||||
- return dtls1_get_message_fragment(s, st1, stn,
|
||||
- max, ok);
|
||||
+ goto redo;
|
||||
}
|
||||
else /* Incorrectly formated Hello request */
|
||||
{
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
Fix for CVE-2014-0224
|
||||
|
||||
Only accept change cipher spec when it is expected instead of at any
|
||||
time. This prevents premature setting of session keys before the master
|
||||
secret is determined which an attacker could use as a MITM attack.
|
||||
|
||||
Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue
|
||||
and providing the initial fix this patch is based on.
|
||||
|
||||
|
||||
Patch borrowed from Fedora
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
|
||||
diff -up openssl-1.0.1e/ssl/ssl3.h.keying-mitm openssl-1.0.1e/ssl/ssl3.h
|
||||
--- openssl-1.0.1e/ssl/ssl3.h.keying-mitm 2014-06-02 19:48:04.518100562 +0200
|
||||
+++ openssl-1.0.1e/ssl/ssl3.h 2014-06-02 19:48:04.642103429 +0200
|
||||
@@ -388,6 +388,7 @@ typedef struct ssl3_buffer_st
|
||||
#define TLS1_FLAGS_TLS_PADDING_BUG 0x0008
|
||||
#define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010
|
||||
#define TLS1_FLAGS_KEEP_HANDSHAKE 0x0020
|
||||
+#define SSL3_FLAGS_CCS_OK 0x0080
|
||||
|
||||
/* SSL3_FLAGS_SGC_RESTART_DONE is set when we
|
||||
* restart a handshake because of MS SGC and so prevents us
|
||||
diff -up openssl-1.0.1e/ssl/s3_clnt.c.keying-mitm openssl-1.0.1e/ssl/s3_clnt.c
|
||||
--- openssl-1.0.1e/ssl/s3_clnt.c.keying-mitm 2013-02-11 16:26:04.000000000 +0100
|
||||
+++ openssl-1.0.1e/ssl/s3_clnt.c 2014-06-02 19:49:57.042701985 +0200
|
||||
@@ -559,6 +559,7 @@ int ssl3_connect(SSL *s)
|
||||
case SSL3_ST_CR_FINISHED_A:
|
||||
case SSL3_ST_CR_FINISHED_B:
|
||||
|
||||
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
|
||||
ret=ssl3_get_finished(s,SSL3_ST_CR_FINISHED_A,
|
||||
SSL3_ST_CR_FINISHED_B);
|
||||
if (ret <= 0) goto end;
|
||||
@@ -916,6 +917,7 @@ int ssl3_get_server_hello(SSL *s)
|
||||
SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT);
|
||||
goto f_err;
|
||||
}
|
||||
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
|
||||
s->hit=1;
|
||||
}
|
||||
else /* a miss or crap from the other end */
|
||||
diff -up openssl-1.0.1e/ssl/s3_pkt.c.keying-mitm openssl-1.0.1e/ssl/s3_pkt.c
|
||||
--- openssl-1.0.1e/ssl/s3_pkt.c.keying-mitm 2014-06-02 19:48:04.640103383 +0200
|
||||
+++ openssl-1.0.1e/ssl/s3_pkt.c 2014-06-02 19:48:04.643103452 +0200
|
||||
@@ -1298,6 +1298,15 @@ start:
|
||||
goto f_err;
|
||||
}
|
||||
|
||||
+ if (!(s->s3->flags & SSL3_FLAGS_CCS_OK))
|
||||
+ {
|
||||
+ al=SSL_AD_UNEXPECTED_MESSAGE;
|
||||
+ SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_CCS_RECEIVED_EARLY);
|
||||
+ goto f_err;
|
||||
+ }
|
||||
+
|
||||
+ s->s3->flags &= ~SSL3_FLAGS_CCS_OK;
|
||||
+
|
||||
rr->length=0;
|
||||
|
||||
if (s->msg_callback)
|
||||
@@ -1432,7 +1441,7 @@ int ssl3_do_change_cipher_spec(SSL *s)
|
||||
|
||||
if (s->s3->tmp.key_block == NULL)
|
||||
{
|
||||
- if (s->session == NULL)
|
||||
+ if (s->session == NULL || s->session->master_key_length == 0)
|
||||
{
|
||||
/* might happen if dtls1_read_bytes() calls this */
|
||||
SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC,SSL_R_CCS_RECEIVED_EARLY);
|
||||
diff -up openssl-1.0.1e/ssl/s3_srvr.c.keying-mitm openssl-1.0.1e/ssl/s3_srvr.c
|
||||
--- openssl-1.0.1e/ssl/s3_srvr.c.keying-mitm 2014-06-02 19:48:04.630103151 +0200
|
||||
+++ openssl-1.0.1e/ssl/s3_srvr.c 2014-06-02 19:48:04.643103452 +0200
|
||||
@@ -673,6 +673,7 @@ int ssl3_accept(SSL *s)
|
||||
case SSL3_ST_SR_CERT_VRFY_A:
|
||||
case SSL3_ST_SR_CERT_VRFY_B:
|
||||
|
||||
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
|
||||
/* we should decide if we expected this one */
|
||||
ret=ssl3_get_cert_verify(s);
|
||||
if (ret <= 0) goto end;
|
||||
@@ -700,6 +701,7 @@ int ssl3_accept(SSL *s)
|
||||
|
||||
case SSL3_ST_SR_FINISHED_A:
|
||||
case SSL3_ST_SR_FINISHED_B:
|
||||
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
|
||||
ret=ssl3_get_finished(s,SSL3_ST_SR_FINISHED_A,
|
||||
SSL3_ST_SR_FINISHED_B);
|
||||
if (ret <= 0) goto end;
|
||||
@@ -770,7 +772,10 @@ int ssl3_accept(SSL *s)
|
||||
s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A;
|
||||
#else
|
||||
if (s->s3->next_proto_neg_seen)
|
||||
+ {
|
||||
+ s->s3->flags |= SSL3_FLAGS_CCS_OK;
|
||||
s->s3->tmp.next_state=SSL3_ST_SR_NEXT_PROTO_A;
|
||||
+ }
|
||||
else
|
||||
s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A;
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
commit 4ad43d511f6cf064c66eb4bfd0fb0919b5dd8a86
|
||||
Author: Dr. Stephen Henson <steve@openssl.org>
|
||||
Date: Thu May 29 15:00:05 2014 +0100
|
||||
|
||||
Fix CVE-2014-3470
|
||||
|
||||
Check session_cert is not NULL before dereferencing it.
|
||||
|
||||
Patch borrowed from Fedora
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
|
||||
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
|
||||
index d35376d..4324f8d 100644
|
||||
--- a/ssl/s3_clnt.c
|
||||
+++ b/ssl/s3_clnt.c
|
||||
@@ -2511,6 +2511,13 @@ int ssl3_send_client_key_exchange(SSL *s)
|
||||
int ecdh_clnt_cert = 0;
|
||||
int field_size = 0;
|
||||
|
||||
+ if (s->session->sess_cert == NULL)
|
||||
+ {
|
||||
+ ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE);
|
||||
+ SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE);
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
/* Did we send out the client's
|
||||
* ECDH share for use in premaster
|
||||
* computation as part of client certificate?
|
||||
@@ -0,0 +1,24 @@
|
||||
openssl fix for CVE-2010-5298
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Race condition in the ssl3_read_bytes function in s3_pkt.c in OpenSSL
|
||||
through 1.0.1g, when SSL_MODE_RELEASE_BUFFERS is enabled, allows remote
|
||||
attackers to inject data across sessions or cause a denial of service
|
||||
(use-after-free and parsing error) via an SSL connection in a
|
||||
multithreaded environment.
|
||||
|
||||
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5298
|
||||
|
||||
Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
|
||||
--- a/ssl/s3_pkt.c
|
||||
+++ b/ssl/s3_pkt.c
|
||||
@@ -1013,7 +1013,7 @@ start:
|
||||
{
|
||||
s->rstate=SSL_ST_READ_HEADER;
|
||||
rr->off=0;
|
||||
- if (s->mode & SSL_MODE_RELEASE_BUFFERS)
|
||||
+ if (s->mode & SSL_MODE_RELEASE_BUFFERS && s->s3->rbuf.left == 0)
|
||||
ssl3_release_read_buffer(s);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
Upstream-Status: Backport
|
||||
|
||||
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1093837
|
||||
|
||||
CVE-2014-0198: An attacker can trigger generation of an SSL
|
||||
alert which could cause a null pointer dereference.
|
||||
|
||||
Signed-off-by: Maxin B. John <maxin.john@enea.com>
|
||||
---
|
||||
diff -Naur openssl-1.0.1g-orig/ssl/s3_pkt.c openssl-1.0.1g/ssl/s3_pkt.c
|
||||
--- openssl-1.0.1g-orig/ssl/s3_pkt.c 2014-03-17 17:14:20.000000000 +0100
|
||||
+++ openssl-1.0.1g/ssl/s3_pkt.c 2014-05-06 02:32:43.862587660 +0200
|
||||
@@ -657,6 +657,10 @@
|
||||
if (i <= 0)
|
||||
return(i);
|
||||
/* if it went, fall through and send more stuff */
|
||||
+ /* we may have released our buffer, so get it again */
|
||||
+ if (wb->buf == NULL)
|
||||
+ if (!ssl3_setup_write_buffer(s))
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
if (len == 0 && !create_empty_fragment)
|
||||
@@ -36,7 +36,12 @@ SRC_URI += "file://configure-targets.patch \
|
||||
file://0001-Fix-DTLS-retransmission-from-previous-session.patch \
|
||||
file://0001-Use-version-in-SSL_METHOD-not-SSL-structure.patch \
|
||||
file://CVE-2014-0160.patch \
|
||||
file://openssl-CVE-2014-0198-fix.patch \
|
||||
file://openssl-1.0.1e-cve-2014-0195.patch \
|
||||
file://openssl-1.0.1e-cve-2014-0198.patch \
|
||||
file://openssl-1.0.1e-cve-2014-0221.patch \
|
||||
file://openssl-1.0.1e-cve-2014-0224.patch \
|
||||
file://openssl-1.0.1e-cve-2014-3470.patch \
|
||||
file://openssl-CVE-2010-5298.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "66bf6f10f060d561929de96f9dfe5b8c"
|
||||
|
||||
@@ -29,6 +29,9 @@ SRC_URI = "\
|
||||
file://mips64-default-ld-emulation.patch \
|
||||
${BACKPORT} \
|
||||
file://binutils-fix-over-array-bounds-issue.patch \
|
||||
file://replace_macros_with_static_inline.patch \
|
||||
file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch \
|
||||
file://0001-write.c-chain_frchains_together_1-Reorder-assertion-.patch \
|
||||
"
|
||||
|
||||
BACKPORT = "\
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
Upstream-Status: Backport
|
||||
|
||||
From 0a09fb4a09e80c36fa3ef763ae276fd13d272a36 Mon Sep 17 00:00:00 2001
|
||||
From: Hans-Peter Nilsson <hp@bitrange.com>
|
||||
Date: Sat, 1 Feb 2014 01:11:28 +0100
|
||||
Subject: [PATCH] Fix MMIX build breakage from bfd_set_section_vma change.
|
||||
|
||||
* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Fix typo in
|
||||
call to bfd_set_section_vma exposed by recent bfd_set_section_vma
|
||||
change.
|
||||
---
|
||||
ld/ChangeLog | 6 ++++++
|
||||
ld/emultempl/mmix-elfnmmo.em | 2 +-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em
|
||||
index 0059792..5e9781a 100644
|
||||
--- a/ld/emultempl/mmix-elfnmmo.em
|
||||
+++ b/ld/emultempl/mmix-elfnmmo.em
|
||||
@@ -102,7 +102,7 @@ mmix_after_allocation (void)
|
||||
This section is only present when there are register symbols. */
|
||||
sec = bfd_get_section_by_name (link_info.output_bfd, MMIX_REG_SECTION_NAME);
|
||||
if (sec != NULL)
|
||||
- bfd_set_section_vma (abfd, sec, 0);
|
||||
+ bfd_set_section_vma (sec->owner, sec, 0);
|
||||
|
||||
if (!_bfd_mmix_after_linker_allocation (link_info.output_bfd, &link_info))
|
||||
{
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From c50d883cb61ff9917464cb695a0fd83fdb0f9c20 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@bigpond.net.au>
|
||||
Date: Mon, 21 Jan 2013 13:48:31 +0000
|
||||
Subject: [PATCH] write.c (chain_frchains_together_1): Reorder assertion to
|
||||
avoid uninit warning.
|
||||
|
||||
Upstream-Status: Backport from 2.23.2
|
||||
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||
---
|
||||
gas/write.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gas/write.c b/gas/write.c
|
||||
index a467147..56ebb6c 100644
|
||||
--- a/gas/write.c
|
||||
+++ b/gas/write.c
|
||||
@@ -406,8 +406,8 @@ chain_frchains_together_1 (segT section, struct frchain *frchp)
|
||||
prev_fix = frchp->fix_tail;
|
||||
}
|
||||
}
|
||||
- gas_assert (prev_frag->fr_type != 0);
|
||||
- gas_assert (prev_frag != &dummy);
|
||||
+ gas_assert (prev_frag != &dummy
|
||||
+ && prev_frag->fr_type != 0);
|
||||
prev_frag->fr_next = 0;
|
||||
return prev_frag;
|
||||
}
|
||||
--
|
||||
2.3.5
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
Upstream-Status: Backport
|
||||
|
||||
From 27b829ee701e29804216b3803fbaeb629be27491 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Wed, 29 Jan 2014 13:46:39 +0000
|
||||
Subject: [PATCH 1/1] Following up on Tom's suggestion I am checking in a patch to replace the various
|
||||
bfd_xxx_set macros with static inline functions, so that we can avoid compile time
|
||||
warnings about comma expressions with unused values.
|
||||
|
||||
* bfd-in.h (bfd_set_section_vma): Delete.
|
||||
(bfd_set_section_alignment): Delete.
|
||||
(bfd_set_section_userdata): Delete.
|
||||
(bfd_set_cacheable): Delete.
|
||||
* bfd.c (bfd_set_cacheable): New static inline function.
|
||||
* section.c (bfd_set_section_userdata): Likewise.
|
||||
(bfd_set_section_vma): Likewise.
|
||||
(bfd_set_section_alignment): Likewise.
|
||||
* bfd-in2.h: Regenerate.
|
||||
---
|
||||
bfd/ChangeLog | 12 ++++++++++++
|
||||
bfd/bfd-in.h | 5 -----
|
||||
bfd/bfd-in2.h | 41 +++++++++++++++++++++++++++++++++++------
|
||||
bfd/bfd.c | 8 ++++++++
|
||||
bfd/section.c | 26 ++++++++++++++++++++++++++
|
||||
5 files changed, 81 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
|
||||
index 3afd71b..c7c5a7d 100644
|
||||
--- a/bfd/bfd-in.h
|
||||
+++ b/bfd/bfd-in.h
|
||||
@@ -292,9 +292,6 @@ typedef struct bfd_section *sec_ptr;
|
||||
|
||||
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
|
||||
|
||||
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
|
||||
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
|
||||
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
|
||||
/* Find the address one past the end of SEC. */
|
||||
#define bfd_get_section_limit(bfd, sec) \
|
||||
(((bfd)->direction != write_direction && (sec)->rawsize != 0 \
|
||||
@@ -517,8 +514,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
|
||||
|
||||
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
|
||||
|
||||
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
|
||||
-
|
||||
extern bfd_boolean bfd_cache_close
|
||||
(bfd *abfd);
|
||||
/* NB: This declaration should match the autogenerated one in libbfd.h. */
|
||||
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
|
||||
index 71996db..b5aeb40 100644
|
||||
--- a/bfd/bfd-in2.h
|
||||
+++ b/bfd/bfd-in2.h
|
||||
@@ -299,9 +299,6 @@ typedef struct bfd_section *sec_ptr;
|
||||
|
||||
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
|
||||
|
||||
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
|
||||
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
|
||||
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
|
||||
/* Find the address one past the end of SEC. */
|
||||
#define bfd_get_section_limit(bfd, sec) \
|
||||
(((bfd)->direction != write_direction && (sec)->rawsize != 0 \
|
||||
@@ -524,8 +521,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
|
||||
|
||||
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
|
||||
|
||||
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
|
||||
-
|
||||
extern bfd_boolean bfd_cache_close
|
||||
(bfd *abfd);
|
||||
/* NB: This declaration should match the autogenerated one in libbfd.h. */
|
||||
@@ -1029,7 +1024,7 @@ bfd *bfd_openr (const char *filename, const char *target);
|
||||
|
||||
bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
|
||||
|
||||
-bfd *bfd_openstreamr (const char *, const char *, void *);
|
||||
+bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
|
||||
|
||||
bfd *bfd_openr_iovec (const char *filename, const char *target,
|
||||
void *(*open_func) (struct bfd *nbfd,
|
||||
@@ -1596,6 +1591,32 @@ struct relax_table {
|
||||
int size;
|
||||
};
|
||||
|
||||
+/* Note: the following are provided as inline functions rather than macros
|
||||
+ because not all callers use the return value. A macro implementation
|
||||
+ would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
|
||||
+ compilers will complain about comma expressions that have no effect. */
|
||||
+static inline bfd_boolean
|
||||
+bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
|
||||
+{
|
||||
+ ptr->userdata = val;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static inline bfd_boolean
|
||||
+bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
|
||||
+{
|
||||
+ ptr->vma = ptr->lma = val;
|
||||
+ ptr->user_set_vma = TRUE;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static inline bfd_boolean
|
||||
+bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
|
||||
+{
|
||||
+ ptr->alignment_power = val;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
/* These sections are global, and are managed by BFD. The application
|
||||
and target back end are not permitted to change the values in
|
||||
these sections. */
|
||||
@@ -6415,6 +6436,14 @@ struct bfd
|
||||
unsigned int selective_search : 1;
|
||||
};
|
||||
|
||||
+/* See note beside bfd_set_section_userdata. */
|
||||
+static inline bfd_boolean
|
||||
+bfd_set_cacheable (bfd * abfd, bfd_boolean val)
|
||||
+{
|
||||
+ abfd->cacheable = val;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
typedef enum bfd_error
|
||||
{
|
||||
bfd_error_no_error = 0,
|
||||
diff --git a/bfd/bfd.c b/bfd/bfd.c
|
||||
index 8d0580c..2d174f3 100644
|
||||
--- a/bfd/bfd.c
|
||||
+++ b/bfd/bfd.c
|
||||
@@ -311,6 +311,14 @@ CODE_FRAGMENT
|
||||
. unsigned int selective_search : 1;
|
||||
.};
|
||||
.
|
||||
+.{* See note beside bfd_set_section_userdata. *}
|
||||
+.static inline bfd_boolean
|
||||
+.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
|
||||
+.{
|
||||
+. abfd->cacheable = val;
|
||||
+. return TRUE;
|
||||
+.}
|
||||
+.
|
||||
*/
|
||||
|
||||
#include "sysdep.h"
|
||||
diff --git a/bfd/section.c b/bfd/section.c
|
||||
index fb19d8c..a661228 100644
|
||||
--- a/bfd/section.c
|
||||
+++ b/bfd/section.c
|
||||
@@ -542,6 +542,32 @@ CODE_FRAGMENT
|
||||
. int size;
|
||||
.};
|
||||
.
|
||||
+.{* Note: the following are provided as inline functions rather than macros
|
||||
+. because not all callers use the return value. A macro implementation
|
||||
+. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
|
||||
+. compilers will complain about comma expressions that have no effect. *}
|
||||
+.static inline bfd_boolean
|
||||
+.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
|
||||
+.{
|
||||
+. ptr->userdata = val;
|
||||
+. return TRUE;
|
||||
+.}
|
||||
+.
|
||||
+.static inline bfd_boolean
|
||||
+.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
|
||||
+.{
|
||||
+. ptr->vma = ptr->lma = val;
|
||||
+. ptr->user_set_vma = TRUE;
|
||||
+. return TRUE;
|
||||
+.}
|
||||
+.
|
||||
+.static inline bfd_boolean
|
||||
+.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
|
||||
+.{
|
||||
+. ptr->alignment_power = val;
|
||||
+. return TRUE;
|
||||
+.}
|
||||
+.
|
||||
.{* These sections are global, and are managed by BFD. The application
|
||||
. and target back end are not permitted to change the values in
|
||||
. these sections. *}
|
||||
--
|
||||
1.7.1
|
||||
|
||||
@@ -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,212 @@
|
||||
Fix for exported function namespace change
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Downloaded from: http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-050
|
||||
|
||||
Author: Chet Ramey <chet.ramey@case.edu>
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
|
||||
BASH PATCH REPORT
|
||||
=================
|
||||
|
||||
Bash-Release: 4.2
|
||||
Patch-ID: bash42-050
|
||||
|
||||
Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL:
|
||||
|
||||
Bug-Description:
|
||||
|
||||
This patch changes the encoding bash uses for exported functions to avoid
|
||||
clashes with shell variables and to avoid depending only on an environment
|
||||
variable's contents to determine whether or not to interpret it as a shell
|
||||
function.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../bash-4.2.49/variables.c 2014-09-16 19:35:45.000000000 -0400
|
||||
--- variables.c 2014-09-27 20:54:00.000000000 -0400
|
||||
***************
|
||||
*** 80,83 ****
|
||||
--- 80,88 ----
|
||||
#define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0')
|
||||
|
||||
+ #define BASHFUNC_PREFIX "BASH_FUNC_"
|
||||
+ #define BASHFUNC_PREFLEN 10 /* == strlen(BASHFUNC_PREFIX */
|
||||
+ #define BASHFUNC_SUFFIX "%%"
|
||||
+ #define BASHFUNC_SUFFLEN 2 /* == strlen(BASHFUNC_SUFFIX) */
|
||||
+
|
||||
extern char **environ;
|
||||
|
||||
***************
|
||||
*** 269,273 ****
|
||||
static void dispose_temporary_env __P((sh_free_func_t *));
|
||||
|
||||
! static inline char *mk_env_string __P((const char *, const char *));
|
||||
static char **make_env_array_from_var_list __P((SHELL_VAR **));
|
||||
static char **make_var_export_array __P((VAR_CONTEXT *));
|
||||
--- 274,278 ----
|
||||
static void dispose_temporary_env __P((sh_free_func_t *));
|
||||
|
||||
! static inline char *mk_env_string __P((const char *, const char *, int));
|
||||
static char **make_env_array_from_var_list __P((SHELL_VAR **));
|
||||
static char **make_var_export_array __P((VAR_CONTEXT *));
|
||||
***************
|
||||
*** 339,357 ****
|
||||
/* If exported function, define it now. Don't import functions from
|
||||
the environment in privileged mode. */
|
||||
! if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
|
||||
{
|
||||
string_length = strlen (string);
|
||||
! temp_string = (char *)xmalloc (3 + string_length + char_index);
|
||||
|
||||
! strcpy (temp_string, name);
|
||||
! temp_string[char_index] = ' ';
|
||||
! strcpy (temp_string + char_index + 1, string);
|
||||
|
||||
/* Don't import function names that are invalid identifiers from the
|
||||
environment. */
|
||||
! if (legal_identifier (name))
|
||||
! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
|
||||
|
||||
! if (temp_var = find_function (name))
|
||||
{
|
||||
VSETATTR (temp_var, (att_exported|att_imported));
|
||||
--- 344,373 ----
|
||||
/* If exported function, define it now. Don't import functions from
|
||||
the environment in privileged mode. */
|
||||
! if (privmode == 0 && read_but_dont_execute == 0 &&
|
||||
! STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) &&
|
||||
! STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) &&
|
||||
! STREQN ("() {", string, 4))
|
||||
{
|
||||
+ size_t namelen;
|
||||
+ char *tname; /* desired imported function name */
|
||||
+
|
||||
+ namelen = char_index - BASHFUNC_PREFLEN - BASHFUNC_SUFFLEN;
|
||||
+
|
||||
+ tname = name + BASHFUNC_PREFLEN; /* start of func name */
|
||||
+ tname[namelen] = '\0'; /* now tname == func name */
|
||||
+
|
||||
string_length = strlen (string);
|
||||
! temp_string = (char *)xmalloc (namelen + string_length + 2);
|
||||
|
||||
! memcpy (temp_string, tname, namelen);
|
||||
! temp_string[namelen] = ' ';
|
||||
! memcpy (temp_string + namelen + 1, string, string_length + 1);
|
||||
|
||||
/* Don't import function names that are invalid identifiers from the
|
||||
environment. */
|
||||
! if (absolute_program (tname) == 0 && (posixly_correct == 0 || legal_identifier (tname)))
|
||||
! parse_and_execute (temp_string, tname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
|
||||
|
||||
! if (temp_var = find_function (tname))
|
||||
{
|
||||
VSETATTR (temp_var, (att_exported|att_imported));
|
||||
***************
|
||||
*** 359,363 ****
|
||||
}
|
||||
else
|
||||
! report_error (_("error importing function definition for `%s'"), name);
|
||||
}
|
||||
#if defined (ARRAY_VARS)
|
||||
--- 375,382 ----
|
||||
}
|
||||
else
|
||||
! report_error (_("error importing function definition for `%s'"), tname);
|
||||
!
|
||||
! /* Restore original suffix */
|
||||
! tname[namelen] = BASHFUNC_SUFFIX[0];
|
||||
}
|
||||
#if defined (ARRAY_VARS)
|
||||
***************
|
||||
*** 2538,2542 ****
|
||||
|
||||
INVALIDATE_EXPORTSTR (var);
|
||||
! var->exportstr = mk_env_string (name, value);
|
||||
|
||||
array_needs_making = 1;
|
||||
--- 2557,2561 ----
|
||||
|
||||
INVALIDATE_EXPORTSTR (var);
|
||||
! var->exportstr = mk_env_string (name, value, 0);
|
||||
|
||||
array_needs_making = 1;
|
||||
***************
|
||||
*** 3390,3408 ****
|
||||
|
||||
static inline char *
|
||||
! mk_env_string (name, value)
|
||||
const char *name, *value;
|
||||
{
|
||||
! int name_len, value_len;
|
||||
! char *p;
|
||||
|
||||
name_len = strlen (name);
|
||||
value_len = STRLEN (value);
|
||||
! p = (char *)xmalloc (2 + name_len + value_len);
|
||||
! strcpy (p, name);
|
||||
! p[name_len] = '=';
|
||||
if (value && *value)
|
||||
! strcpy (p + name_len + 1, value);
|
||||
else
|
||||
! p[name_len + 1] = '\0';
|
||||
return (p);
|
||||
}
|
||||
--- 3409,3448 ----
|
||||
|
||||
static inline char *
|
||||
! mk_env_string (name, value, isfunc)
|
||||
const char *name, *value;
|
||||
+ int isfunc;
|
||||
{
|
||||
! size_t name_len, value_len;
|
||||
! char *p, *q;
|
||||
|
||||
name_len = strlen (name);
|
||||
value_len = STRLEN (value);
|
||||
!
|
||||
! /* If we are exporting a shell function, construct the encoded function
|
||||
! name. */
|
||||
! if (isfunc && value)
|
||||
! {
|
||||
! p = (char *)xmalloc (BASHFUNC_PREFLEN + name_len + BASHFUNC_SUFFLEN + value_len + 2);
|
||||
! q = p;
|
||||
! memcpy (q, BASHFUNC_PREFIX, BASHFUNC_PREFLEN);
|
||||
! q += BASHFUNC_PREFLEN;
|
||||
! memcpy (q, name, name_len);
|
||||
! q += name_len;
|
||||
! memcpy (q, BASHFUNC_SUFFIX, BASHFUNC_SUFFLEN);
|
||||
! q += BASHFUNC_SUFFLEN;
|
||||
! }
|
||||
! else
|
||||
! {
|
||||
! p = (char *)xmalloc (2 + name_len + value_len);
|
||||
! memcpy (p, name, name_len);
|
||||
! q = p + name_len;
|
||||
! }
|
||||
!
|
||||
! q[0] = '=';
|
||||
if (value && *value)
|
||||
! memcpy (q + 1, value, value_len + 1);
|
||||
else
|
||||
! q[1] = '\0';
|
||||
!
|
||||
return (p);
|
||||
}
|
||||
***************
|
||||
*** 3490,3494 ****
|
||||
using the cached exportstr... */
|
||||
list[list_index] = USE_EXPORTSTR ? savestring (value)
|
||||
! : mk_env_string (var->name, value);
|
||||
|
||||
if (USE_EXPORTSTR == 0)
|
||||
--- 3530,3534 ----
|
||||
using the cached exportstr... */
|
||||
list[list_index] = USE_EXPORTSTR ? savestring (value)
|
||||
! : mk_env_string (var->name, value, function_p (var));
|
||||
|
||||
if (USE_EXPORTSTR == 0)
|
||||
95
meta/recipes-extended/bash/bash-4.2/cve-2014-6271.patch
Normal file
95
meta/recipes-extended/bash/bash-4.2/cve-2014-6271.patch
Normal file
@@ -0,0 +1,95 @@
|
||||
Fix CVE-2014-6271, aka ShellShock. This is the upstream 4.2 patchlevel 48, minus the hunk to
|
||||
set the patch level.
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
BASH PATCH REPORT
|
||||
=================
|
||||
|
||||
Bash-Release: 4.2
|
||||
Patch-ID: bash42-048
|
||||
|
||||
Bug-Reported-by: Stephane Chazelas <stephane.chazelas@gmail.com>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL:
|
||||
|
||||
Bug-Description:
|
||||
|
||||
Under certain circumstances, bash will execute user code while processing the
|
||||
environment for exported function definitions.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../bash-4.2.47/builtins/common.h 2010-05-30 18:31:51.000000000 -0400
|
||||
--- builtins/common.h 2014-09-16 19:35:45.000000000 -0400
|
||||
***************
|
||||
*** 36,39 ****
|
||||
--- 36,41 ----
|
||||
|
||||
/* Flags for describe_command, shared between type.def and command.def */
|
||||
+ #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */
|
||||
+ #define SEVAL_ONECMD 0x100 /* only allow a single command */
|
||||
#define CDESC_ALL 0x001 /* type -a */
|
||||
#define CDESC_SHORTDESC 0x002 /* command -V */
|
||||
*** ../bash-4.2.47/builtins/evalstring.c 2010-11-23 08:22:15.000000000 -0500
|
||||
--- builtins/evalstring.c 2014-09-16 19:35:45.000000000 -0400
|
||||
***************
|
||||
*** 262,265 ****
|
||||
--- 262,273 ----
|
||||
struct fd_bitmap *bitmap;
|
||||
|
||||
+ if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
|
||||
+ {
|
||||
+ internal_warning ("%s: ignoring function definition attempt", from_file);
|
||||
+ should_jump_to_top_level = 0;
|
||||
+ last_result = last_command_exit_value = EX_BADUSAGE;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
bitmap = new_fd_bitmap (FD_BITMAP_SIZE);
|
||||
begin_unwind_frame ("pe_dispose");
|
||||
***************
|
||||
*** 322,325 ****
|
||||
--- 330,336 ----
|
||||
dispose_fd_bitmap (bitmap);
|
||||
discard_unwind_frame ("pe_dispose");
|
||||
+
|
||||
+ if (flags & SEVAL_ONECMD)
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
*** ../bash-4.2.47/variables.c 2011-03-01 16:15:20.000000000 -0500
|
||||
--- variables.c 2014-09-16 19:35:45.000000000 -0400
|
||||
***************
|
||||
*** 348,357 ****
|
||||
strcpy (temp_string + char_index + 1, string);
|
||||
|
||||
! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST);
|
||||
!
|
||||
! /* Ancient backwards compatibility. Old versions of bash exported
|
||||
! functions like name()=() {...} */
|
||||
! if (name[char_index - 1] == ')' && name[char_index - 2] == '(')
|
||||
! name[char_index - 2] = '\0';
|
||||
|
||||
if (temp_var = find_function (name))
|
||||
--- 348,355 ----
|
||||
strcpy (temp_string + char_index + 1, string);
|
||||
|
||||
! /* Don't import function names that are invalid identifiers from the
|
||||
! environment. */
|
||||
! if (legal_identifier (name))
|
||||
! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
|
||||
|
||||
if (temp_var = find_function (name))
|
||||
***************
|
||||
*** 362,369 ****
|
||||
else
|
||||
report_error (_("error importing function definition for `%s'"), name);
|
||||
-
|
||||
- /* ( */
|
||||
- if (name[char_index - 1] == ')' && name[char_index - 2] == '\0')
|
||||
- name[char_index - 2] = '('; /* ) */
|
||||
}
|
||||
#if defined (ARRAY_VARS)
|
||||
--- 360,363 ----
|
||||
44
meta/recipes-extended/bash/bash-4.2/cve-2014-6277.patch
Normal file
44
meta/recipes-extended/bash/bash-4.2/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:
|
||||
127
meta/recipes-extended/bash/bash-4.2/cve-2014-6278.patch
Normal file
127
meta/recipes-extended/bash/bash-4.2/cve-2014-6278.patch
Normal file
@@ -0,0 +1,127 @@
|
||||
bash: Fix CVE-2014-6278 (shellshock)
|
||||
|
||||
Upstream-status: backport
|
||||
|
||||
Downloaded from:
|
||||
http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-053
|
||||
|
||||
Author: Chet Ramey <chet.ramey@case.edu>
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
BASH PATCH REPORT
|
||||
=================
|
||||
|
||||
Bash-Release: 4.2
|
||||
Patch-ID: bash42-053
|
||||
|
||||
Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL:
|
||||
|
||||
Bug-Description:
|
||||
|
||||
A combination of nested command substitutions and function importing from
|
||||
the environment can cause bash to execute code appearing in the environment
|
||||
variable value following the function definition.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../bash-4.2.52/builtins/evalstring.c 2014-09-16 19:35:45.000000000 -0400
|
||||
--- builtins/evalstring.c 2014-10-04 15:00:26.000000000 -0400
|
||||
***************
|
||||
*** 262,271 ****
|
||||
struct fd_bitmap *bitmap;
|
||||
|
||||
! if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
|
||||
{
|
||||
! internal_warning ("%s: ignoring function definition attempt", from_file);
|
||||
! should_jump_to_top_level = 0;
|
||||
! last_result = last_command_exit_value = EX_BADUSAGE;
|
||||
! break;
|
||||
}
|
||||
|
||||
--- 262,284 ----
|
||||
struct fd_bitmap *bitmap;
|
||||
|
||||
! if (flags & SEVAL_FUNCDEF)
|
||||
{
|
||||
! char *x;
|
||||
!
|
||||
! /* If the command parses to something other than a straight
|
||||
! function definition, or if we have not consumed the entire
|
||||
! string, or if the parser has transformed the function
|
||||
! name (as parsing will if it begins or ends with shell
|
||||
! whitespace, for example), reject the attempt */
|
||||
! if (command->type != cm_function_def ||
|
||||
! ((x = parser_remaining_input ()) && *x) ||
|
||||
! (STREQ (from_file, command->value.Function_def->name->word) == 0))
|
||||
! {
|
||||
! internal_warning (_("%s: ignoring function definition attempt"), from_file);
|
||||
! should_jump_to_top_level = 0;
|
||||
! last_result = last_command_exit_value = EX_BADUSAGE;
|
||||
! reset_parser ();
|
||||
! break;
|
||||
! }
|
||||
}
|
||||
|
||||
***************
|
||||
*** 332,336 ****
|
||||
|
||||
if (flags & SEVAL_ONECMD)
|
||||
! break;
|
||||
}
|
||||
}
|
||||
--- 345,352 ----
|
||||
|
||||
if (flags & SEVAL_ONECMD)
|
||||
! {
|
||||
! reset_parser ();
|
||||
! break;
|
||||
! }
|
||||
}
|
||||
}
|
||||
*** ../bash-4.2.52/parse.y 2014-09-30 19:24:19.000000000 -0400
|
||||
--- parse.y 2014-10-04 15:00:26.000000000 -0400
|
||||
***************
|
||||
*** 2436,2439 ****
|
||||
--- 2436,2449 ----
|
||||
}
|
||||
|
||||
+ char *
|
||||
+ parser_remaining_input ()
|
||||
+ {
|
||||
+ if (shell_input_line == 0)
|
||||
+ return 0;
|
||||
+ if (shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len)
|
||||
+ return '\0'; /* XXX */
|
||||
+ return (shell_input_line + shell_input_line_index);
|
||||
+ }
|
||||
+
|
||||
#ifdef INCLUDE_UNUSED
|
||||
/* Back the input pointer up by one, effectively `ungetting' a character. */
|
||||
***************
|
||||
*** 3891,3896 ****
|
||||
/* reset_parser clears shell_input_line and associated variables */
|
||||
restore_input_line_state (&ls);
|
||||
! if (interactive)
|
||||
! token_to_read = 0;
|
||||
|
||||
/* Need to find how many characters parse_and_execute consumed, update
|
||||
--- 3901,3906 ----
|
||||
/* reset_parser clears shell_input_line and associated variables */
|
||||
restore_input_line_state (&ls);
|
||||
!
|
||||
! token_to_read = 0;
|
||||
|
||||
/* Need to find how many characters parse_and_execute consumed, update
|
||||
*** ../bash-4.2.52/shell.h 2011-11-21 18:03:32.000000000 -0500
|
||||
--- shell.h 2014-10-04 15:00:26.000000000 -0400
|
||||
***************
|
||||
*** 178,181 ****
|
||||
--- 178,183 ----
|
||||
|
||||
/* Let's try declaring these here. */
|
||||
+ extern char *parser_remaining_input __P((void));
|
||||
+
|
||||
extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *));
|
||||
extern void restore_parser_state __P((sh_parser_state_t *));
|
||||
16
meta/recipes-extended/bash/bash-4.2/cve-2014-7169.patch
Normal file
16
meta/recipes-extended/bash/bash-4.2/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';
|
||||
@@ -0,0 +1,167 @@
|
||||
bash: Fix for CVE-2014-7186 and CVE-2014-7187
|
||||
|
||||
Upstream-Status: Backport {GNU Patch-ID: bash42-051}
|
||||
|
||||
Downloaded from: http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-051
|
||||
|
||||
Author: Chet Ramey <chet.ramey@case.edu>
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
BASH PATCH REPORT
|
||||
=================
|
||||
|
||||
Bash-Release: 4.2
|
||||
Patch-ID: bash42-051
|
||||
|
||||
Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL:
|
||||
|
||||
Bug-Description:
|
||||
|
||||
There are two local buffer overflows in parse.y that can cause the shell
|
||||
to dump core when given many here-documents attached to a single command
|
||||
or many nested loops.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../bash-4.2.50/parse.y 2014-09-27 12:18:53.000000000 -0400
|
||||
--- parse.y 2014-09-30 19:24:19.000000000 -0400
|
||||
***************
|
||||
*** 168,171 ****
|
||||
--- 168,174 ----
|
||||
static int reserved_word_acceptable __P((int));
|
||||
static int yylex __P((void));
|
||||
+
|
||||
+ static void push_heredoc __P((REDIRECT *));
|
||||
+ static char *mk_alexpansion __P((char *));
|
||||
static int alias_expand_token __P((char *));
|
||||
static int time_command_acceptable __P((void));
|
||||
***************
|
||||
*** 265,269 ****
|
||||
/* Variables to manage the task of reading here documents, because we need to
|
||||
defer the reading until after a complete command has been collected. */
|
||||
! static REDIRECT *redir_stack[10];
|
||||
int need_here_doc;
|
||||
|
||||
--- 268,274 ----
|
||||
/* Variables to manage the task of reading here documents, because we need to
|
||||
defer the reading until after a complete command has been collected. */
|
||||
! #define HEREDOC_MAX 16
|
||||
!
|
||||
! static REDIRECT *redir_stack[HEREDOC_MAX];
|
||||
int need_here_doc;
|
||||
|
||||
***************
|
||||
*** 307,311 ****
|
||||
index is decremented after a case, select, or for command is parsed. */
|
||||
#define MAX_CASE_NEST 128
|
||||
! static int word_lineno[MAX_CASE_NEST];
|
||||
static int word_top = -1;
|
||||
|
||||
--- 312,316 ----
|
||||
index is decremented after a case, select, or for command is parsed. */
|
||||
#define MAX_CASE_NEST 128
|
||||
! static int word_lineno[MAX_CASE_NEST+1];
|
||||
static int word_top = -1;
|
||||
|
||||
***************
|
||||
*** 520,524 ****
|
||||
redir.filename = $2;
|
||||
$$ = make_redirection (source, r_reading_until, redir, 0);
|
||||
! redir_stack[need_here_doc++] = $$;
|
||||
}
|
||||
| NUMBER LESS_LESS WORD
|
||||
--- 525,529 ----
|
||||
redir.filename = $2;
|
||||
$$ = make_redirection (source, r_reading_until, redir, 0);
|
||||
! push_heredoc ($$);
|
||||
}
|
||||
| NUMBER LESS_LESS WORD
|
||||
***************
|
||||
*** 527,531 ****
|
||||
redir.filename = $3;
|
||||
$$ = make_redirection (source, r_reading_until, redir, 0);
|
||||
! redir_stack[need_here_doc++] = $$;
|
||||
}
|
||||
| REDIR_WORD LESS_LESS WORD
|
||||
--- 532,536 ----
|
||||
redir.filename = $3;
|
||||
$$ = make_redirection (source, r_reading_until, redir, 0);
|
||||
! push_heredoc ($$);
|
||||
}
|
||||
| REDIR_WORD LESS_LESS WORD
|
||||
***************
|
||||
*** 534,538 ****
|
||||
redir.filename = $3;
|
||||
$$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
|
||||
! redir_stack[need_here_doc++] = $$;
|
||||
}
|
||||
| LESS_LESS_MINUS WORD
|
||||
--- 539,543 ----
|
||||
redir.filename = $3;
|
||||
$$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
|
||||
! push_heredoc ($$);
|
||||
}
|
||||
| LESS_LESS_MINUS WORD
|
||||
***************
|
||||
*** 541,545 ****
|
||||
redir.filename = $2;
|
||||
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
|
||||
! redir_stack[need_here_doc++] = $$;
|
||||
}
|
||||
| NUMBER LESS_LESS_MINUS WORD
|
||||
--- 546,550 ----
|
||||
redir.filename = $2;
|
||||
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
|
||||
! push_heredoc ($$);
|
||||
}
|
||||
| NUMBER LESS_LESS_MINUS WORD
|
||||
***************
|
||||
*** 548,552 ****
|
||||
redir.filename = $3;
|
||||
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
|
||||
! redir_stack[need_here_doc++] = $$;
|
||||
}
|
||||
| REDIR_WORD LESS_LESS_MINUS WORD
|
||||
--- 553,557 ----
|
||||
redir.filename = $3;
|
||||
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
|
||||
! push_heredoc ($$);
|
||||
}
|
||||
| REDIR_WORD LESS_LESS_MINUS WORD
|
||||
***************
|
||||
*** 555,559 ****
|
||||
redir.filename = $3;
|
||||
$$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
|
||||
! redir_stack[need_here_doc++] = $$;
|
||||
}
|
||||
| LESS_LESS_LESS WORD
|
||||
--- 560,564 ----
|
||||
redir.filename = $3;
|
||||
$$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
|
||||
! push_heredoc ($$);
|
||||
}
|
||||
| LESS_LESS_LESS WORD
|
||||
***************
|
||||
*** 2534,2537 ****
|
||||
--- 2539,2557 ----
|
||||
static int esacs_needed_count;
|
||||
|
||||
+ static void
|
||||
+ push_heredoc (r)
|
||||
+ REDIRECT *r;
|
||||
+ {
|
||||
+ if (need_here_doc >= HEREDOC_MAX)
|
||||
+ {
|
||||
+ last_command_exit_value = EX_BADUSAGE;
|
||||
+ need_here_doc = 0;
|
||||
+ report_syntax_error (_("maximum here-document count exceeded"));
|
||||
+ reset_parser ();
|
||||
+ exit_shell (last_command_exit_value);
|
||||
+ }
|
||||
+ redir_stack[need_here_doc++] = r;
|
||||
+ }
|
||||
+
|
||||
void
|
||||
gather_here_documents ()
|
||||
@@ -10,6 +10,12 @@ SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
|
||||
${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch002 \
|
||||
${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch003 \
|
||||
file://mkbuiltins_have_stringize.patch \
|
||||
file://cve-2014-6271.patch;striplevel=0 \
|
||||
file://cve-2014-7169.patch \
|
||||
file://Fix-for-bash-exported-function-namespace-change.patch \
|
||||
file://cve-2014-7186_cve-2014-7187.patch \
|
||||
file://cve-2014-6277.patch \
|
||||
file://cve-2014-6278.patch \
|
||||
"
|
||||
|
||||
SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
|
||||
|
||||
@@ -19,8 +19,14 @@ SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
|
||||
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-010;apply=yes;striplevel=0;name=patch010 \
|
||||
file://execute_cmd.patch;striplevel=0 \
|
||||
file://mkbuiltins_have_stringize.patch \
|
||||
file://cve-2014-6271.patch;striplevel=0 \
|
||||
file://cve-2014-7169.patch \
|
||||
file://build-tests.patch \
|
||||
file://test-output.patch \
|
||||
file://Fix-for-bash-exported-function-namespace-change.patch;striplevel=0 \
|
||||
file://cve-2014-7186_cve-2014-7187.patch;striplevel=0 \
|
||||
file://cve-2014-6277.patch \
|
||||
file://cve-2014-6278.patch;striplevel=0 \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ DEPENDS = "flex-native bison-native"
|
||||
|
||||
inherit autotools
|
||||
|
||||
SRC_URI = "git://www.jdl.com/software/dtc.git;protocol=git \
|
||||
SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;protocol=git \
|
||||
file://make_install.patch \
|
||||
"
|
||||
|
||||
|
||||
30
meta/recipes-support/gnutls/gnutls/CVE-2014-3466.patch
Normal file
30
meta/recipes-support/gnutls/gnutls/CVE-2014-3466.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From fcf3745f1d03c4a97e87ef4341269c645fdda787 Mon Sep 17 00:00:00 2001
|
||||
From: Valentin Popa <valentin.popa@intel.com>
|
||||
Date: Thu, 5 Jun 2014 11:50:11 +0300
|
||||
Subject: [PATCH] CVE-2014-3466
|
||||
|
||||
Prevent memory corruption due to server hello parsing.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Valentin Popa <valentin.popa@intel.com>
|
||||
---
|
||||
lib/gnutls_handshake.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
|
||||
index e4a63e4..e652528 100644
|
||||
--- a/lib/gnutls_handshake.c
|
||||
+++ b/lib/gnutls_handshake.c
|
||||
@@ -1797,7 +1797,7 @@ _gnutls_read_server_hello (gnutls_session_t session,
|
||||
DECR_LEN (len, 1);
|
||||
session_id_len = data[pos++];
|
||||
|
||||
- if (len < session_id_len)
|
||||
+ if (len < session_id_len || session_id_len > TLS_MAX_SESSION_ID_SIZE)
|
||||
{
|
||||
gnutls_assert ();
|
||||
return GNUTLS_E_UNSUPPORTED_VERSION_PACKET;
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -8,6 +8,7 @@ SRC_URI += "file://gnutls-openssl.patch \
|
||||
file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
|
||||
file://CVE-2014-1959-rejection-of-v1-intermediate-cert.patch \
|
||||
file://CVE-2014-0092-corrected-return-codes.patch \
|
||||
file://CVE-2014-3466.patch \
|
||||
file://25_updatedgdocfrommaster.diff \
|
||||
${@['', 'file://fix-gettext-version.patch'][bb.data.inherits_class('native', d) or (not ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1))]} \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user