mirror of
https://git.yoctoproject.org/poky
synced 2026-03-17 12:49:40 +01:00
Compare commits
94 Commits
yocto-3.3.
...
hardknott
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cefabe0f0 | ||
|
|
eee9fba7b4 | ||
|
|
52645c8607 | ||
|
|
805c876a28 | ||
|
|
6c3f8d13fd | ||
|
|
48ad0bb977 | ||
|
|
8a3493d180 | ||
|
|
6422e878f5 | ||
|
|
a07b68e69b | ||
|
|
e5870b84fb | ||
|
|
32eb0d2eb1 | ||
|
|
9fc229578c | ||
|
|
6e1ca0e922 | ||
|
|
d4cc78784b | ||
|
|
8337e56c5e | ||
|
|
d23edb0163 | ||
|
|
71fd0323db | ||
|
|
242cd1c846 | ||
|
|
458fae7cb9 | ||
|
|
9d312d22be | ||
|
|
b64da2e711 | ||
|
|
c009c20ef2 | ||
|
|
e3d1922620 | ||
|
|
3f537fefb6 | ||
|
|
eb28aafdc9 | ||
|
|
d6dfaada89 | ||
|
|
e9a9e6f5b9 | ||
|
|
ad196b05e2 | ||
|
|
1adce7ef96 | ||
|
|
d5424469d7 | ||
|
|
f0c3b28257 | ||
|
|
b60e2e5a5d | ||
|
|
37a86b1958 | ||
|
|
02a3d2d460 | ||
|
|
677d20b0b8 | ||
|
|
0e4d5c08ec | ||
|
|
bae5f93d9c | ||
|
|
b3f1442221 | ||
|
|
256a978dd4 | ||
|
|
7f4dbf0a12 | ||
|
|
011c85aee8 | ||
|
|
a69995f869 | ||
|
|
89c98169ac | ||
|
|
867ba9d8d2 | ||
|
|
6c459acd07 | ||
|
|
5646ac07f7 | ||
|
|
16bf49b594 | ||
|
|
9af3064f01 | ||
|
|
8fc32ee149 | ||
|
|
f8d05252d1 | ||
|
|
b2bd31b9cc | ||
|
|
cec2ca666a | ||
|
|
4fbd09a292 | ||
|
|
53587ef75e | ||
|
|
3211e7a7bb | ||
|
|
9a053c2090 | ||
|
|
2489837fea | ||
|
|
cf93b828e7 | ||
|
|
31a5ff1430 | ||
|
|
ee5299bca1 | ||
|
|
d5b1566b2a | ||
|
|
cd6601d6b2 | ||
|
|
b1ce735cc5 | ||
|
|
36562d3019 | ||
|
|
cccf02e31d | ||
|
|
91aa50cdc1 | ||
|
|
87ee6c43ce | ||
|
|
cc553bc273 | ||
|
|
012a08a95c | ||
|
|
0ee5dc8a32 | ||
|
|
003f98be06 | ||
|
|
1a759394f0 | ||
|
|
9e94e790ce | ||
|
|
f0477de141 | ||
|
|
02b02e309b | ||
|
|
d81a8ff2bd | ||
|
|
1a38c0264c | ||
|
|
e9eee84a8a | ||
|
|
5dcf0b2635 | ||
|
|
034352bc2f | ||
|
|
2b7095bac0 | ||
|
|
270a56a254 | ||
|
|
d60b96504e | ||
|
|
a3f133e224 | ||
|
|
a8550732c6 | ||
|
|
396bb7d2da | ||
|
|
f6206ff851 | ||
|
|
27309ad078 | ||
|
|
db9b156d16 | ||
|
|
1b7d99729b | ||
|
|
1e1c0d60ac | ||
|
|
b94f4ca8ef | ||
|
|
73a75034b9 | ||
|
|
770c85a33a |
@@ -26,6 +26,7 @@ import errno
|
||||
import re
|
||||
import datetime
|
||||
import pickle
|
||||
import gc
|
||||
import bb.server.xmlrpcserver
|
||||
from bb import daemonize
|
||||
from multiprocessing import queues
|
||||
@@ -737,8 +738,10 @@ class ConnectionWriter(object):
|
||||
|
||||
def send(self, obj):
|
||||
obj = multiprocessing.reduction.ForkingPickler.dumps(obj)
|
||||
gc.disable()
|
||||
with self.wlock:
|
||||
self.writer.send_bytes(obj)
|
||||
gc.enable()
|
||||
|
||||
def fileno(self):
|
||||
return self.writer.fileno()
|
||||
|
||||
@@ -11,6 +11,7 @@ import hashlib
|
||||
import time
|
||||
import inspect
|
||||
from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
|
||||
import bb.server.xmlrpcclient
|
||||
|
||||
import bb
|
||||
|
||||
|
||||
@@ -1059,7 +1059,7 @@ class FetcherNetworkTest(FetcherTest):
|
||||
""" Prevent regression on deeply nested submodules not being checked out properly, even though they were fetched. """
|
||||
|
||||
# This repository also has submodules where the module (name), path and url do not align
|
||||
url = "gitsm://github.com/azure/iotedge.git;protocol=https;rev=d76e0316c6f324345d77c48a83ce836d09392699"
|
||||
url = "gitsm://github.com/azure/iotedge.git;protocol=https;rev=d76e0316c6f324345d77c48a83ce836d09392699;branch=main"
|
||||
fetcher = bb.fetch.Fetch([url], self.d)
|
||||
fetcher.download()
|
||||
# Previous cwd has been deleted
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<field type="CharField" name="branch">master</field>
|
||||
</object>
|
||||
<object model="orm.bitbakeversion" pk="4">
|
||||
<field type="CharField" name="name">gatesgarth</field>
|
||||
<field type="CharField" name="name">hardknott</field>
|
||||
<field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
|
||||
<field type="CharField" name="branch">1.48</field>
|
||||
<field type="CharField" name="branch">1.50</field>
|
||||
</object>
|
||||
|
||||
<!-- Releases available -->
|
||||
@@ -51,11 +51,11 @@
|
||||
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/\">OpenEmbedded master</a> branch.</field>
|
||||
</object>
|
||||
<object model="orm.release" pk="4">
|
||||
<field type="CharField" name="name">gatesgarth</field>
|
||||
<field type="CharField" name="description">Openembedded Gatesgarth</field>
|
||||
<field type="CharField" name="name">hardknott</field>
|
||||
<field type="CharField" name="description">Openembedded Hardknott</field>
|
||||
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field>
|
||||
<field type="CharField" name="branch_name">gatesgarth</field>
|
||||
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=gatesgarth\">OpenEmbedded Gatesgarth</a> branch.</field>
|
||||
<field type="CharField" name="branch_name">hardknott</field>
|
||||
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=hardknott\">OpenEmbedded Hardknott</a> branch.</field>
|
||||
</object>
|
||||
|
||||
<!-- Default layers for each release -->
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
<field type="CharField" name="dirpath">bitbake</field>
|
||||
</object>
|
||||
<object model="orm.bitbakeversion" pk="4">
|
||||
<field type="CharField" name="name">gatesgarth</field>
|
||||
<field type="CharField" name="name">hardknott</field>
|
||||
<field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
|
||||
<field type="CharField" name="branch">gatesgarth</field>
|
||||
<field type="CharField" name="branch">hardknott</field>
|
||||
<field type="CharField" name="dirpath">bitbake</field>
|
||||
</object>
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/">Yocto Project Master branch</a>.</field>
|
||||
</object>
|
||||
<object model="orm.release" pk="4">
|
||||
<field type="CharField" name="name">gatesgarth</field>
|
||||
<field type="CharField" name="description">Yocto Project 3.2 "Gatesgarth"</field>
|
||||
<field type="CharField" name="name">hardknott</field>
|
||||
<field type="CharField" name="description">Yocto Project 3.2 "Hardknott"</field>
|
||||
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field>
|
||||
<field type="CharField" name="branch_name">gatesgarth</field>
|
||||
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=gatesgarth">Yocto Project Gatesgarth branch</a>.</field>
|
||||
<field type="CharField" name="branch_name">hardknott</field>
|
||||
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=hardknott">Yocto Project Hardknott branch</a>.</field>
|
||||
</object>
|
||||
|
||||
<!-- Default project layers for each release -->
|
||||
@@ -152,7 +152,7 @@
|
||||
<field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
|
||||
<field type="IntegerField" name="layer_source">0</field>
|
||||
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
|
||||
<field type="CharField" name="branch">gatesgarth</field>
|
||||
<field type="CharField" name="branch">hardknott</field>
|
||||
<field type="CharField" name="dirpath">meta</field>
|
||||
</object>
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
|
||||
<field type="IntegerField" name="layer_source">0</field>
|
||||
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
|
||||
<field type="CharField" name="branch">gatesgarth</field>
|
||||
<field type="CharField" name="branch">hardknott</field>
|
||||
<field type="CharField" name="dirpath">meta-poky</field>
|
||||
</object>
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
<field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
|
||||
<field type="IntegerField" name="layer_source">0</field>
|
||||
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
|
||||
<field type="CharField" name="branch">gatesgarth</field>
|
||||
<field type="CharField" name="branch">hardknott</field>
|
||||
<field type="CharField" name="dirpath">meta-yocto-bsp</field>
|
||||
</object>
|
||||
</django-objects>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<field type="CharField" name="value">${TOPDIR}/../sstate-cache</field>
|
||||
</object>
|
||||
<object model="orm.toastersetting" pk="6">
|
||||
<field type="CharField" name="name">DEFCONF_IMAGE_INSTALL_append</field>
|
||||
<field type="CharField" name="name">DEFCONF_IMAGE_INSTALL:append</field>
|
||||
<field type="CharField" name="value"></field>
|
||||
</object>
|
||||
<object model="orm.toastersetting" pk="7">
|
||||
|
||||
@@ -1717,7 +1717,7 @@ class CustomImageRecipe(Recipe):
|
||||
|
||||
def generate_recipe_file_contents(self):
|
||||
"""Generate the contents for the recipe file."""
|
||||
# If we have no excluded packages we only need to _append
|
||||
# If we have no excluded packages we only need to :append
|
||||
if self.excludes_set.count() == 0:
|
||||
packages_conf = "IMAGE_INSTALL_append = \" "
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
{% if image_install_append_defined %}
|
||||
<dt>
|
||||
<span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL_append</span>
|
||||
<span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL:append</span>
|
||||
<span class="glyphicon glyphicon-question-sign get-help" title="Specifies additional packages to install into an image. If your build creates more than one image, the packages will be installed in all of them"></span>
|
||||
</dt>
|
||||
<dd class="variable-list">
|
||||
@@ -83,7 +83,7 @@
|
||||
<form id="change-image_install-form" class="form-inline" style="display:none;">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="help-block">To set IMAGE_INSTALL_append to more than one package, type the package names separated by a space.</span>
|
||||
<span class="help-block">To set IMAGE_INSTALL:append to more than one package, type the package names separated by a space.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -771,10 +771,10 @@ $(document).ready(function() {
|
||||
|
||||
{% if image_install_append_defined %}
|
||||
|
||||
// init IMAGE_INSTALL_append trash icon
|
||||
// init IMAGE_INSTALL:append trash icon
|
||||
setDeleteTooltip($('#delete-image_install-icon'));
|
||||
|
||||
// change IMAGE_INSTALL_append variable
|
||||
// change IMAGE_INSTALL:append variable
|
||||
$('#change-image_install-icon').click(function() {
|
||||
// preset the edit value
|
||||
var current_val = $("span#image_install").text().trim();
|
||||
@@ -814,7 +814,7 @@ $(document).ready(function() {
|
||||
$('#apply-change-image_install').click(function(){
|
||||
// insure these non-empty values have single space prefix
|
||||
var value = " " + $('#new-image_install').val().trim();
|
||||
postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+value});
|
||||
postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+value});
|
||||
$('#image_install').text(value);
|
||||
$('#image_install').removeClass('text-muted');
|
||||
$("#change-image_install-form").slideUp(function () {
|
||||
@@ -826,10 +826,10 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
// delete IMAGE_INSTALL_append variable value
|
||||
// delete IMAGE_INSTALL:append variable value
|
||||
$('#delete-image_install-icon').click(function(){
|
||||
$(this).tooltip('hide');
|
||||
postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+''});
|
||||
postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+''});
|
||||
$('#image_install').parent().fadeOut(1000, function(){
|
||||
$('#image_install').addClass('text-muted');
|
||||
$('#image_install').text('Not set');
|
||||
@@ -1011,7 +1011,7 @@ $(document).ready(function() {
|
||||
$(".save").attr("disabled","disabled");
|
||||
|
||||
// Reload page if admin-removed core managed value is manually added back in
|
||||
if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL_append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) {
|
||||
if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL:append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) {
|
||||
// delayed reload to avoid race condition with postEditAjaxRequest
|
||||
do_reload=true;
|
||||
}
|
||||
|
||||
@@ -166,8 +166,8 @@ section.
|
||||
#. *Determine the BSP Layer You Want:* The Yocto Project supports many
|
||||
BSPs, which are maintained in their own layers or in layers designed
|
||||
to contain several BSPs. To get an idea of machine support through
|
||||
BSP layers, you can look at the `index of
|
||||
machines <&YOCTO_RELEASE_DL_URL;/machines>`__ for the release.
|
||||
BSP layers, you can look at the :yocto_dl:`index of machines
|
||||
</releases/yocto/&DISTRO_REL_TAG;/machines>`
|
||||
|
||||
#. *Optionally Clone the meta-intel BSP Layer:* If your hardware is
|
||||
based on current Intel CPUs and devices, you can leverage this BSP
|
||||
@@ -879,7 +879,7 @@ Yocto Project:
|
||||
your BSP layer as listed in the ``recipes.txt`` file, which is found
|
||||
in ``poky/meta`` directory of the :term:`Source Directory`
|
||||
or in the OpenEmbedded-Core Layer (``openembedded-core``) at
|
||||
https://git.openembedded.org/openembedded-core/tree/meta.
|
||||
:oe_git:`/openembedded-core/tree/meta`.
|
||||
|
||||
You should place recipes (``*.bb`` files) and recipe modifications
|
||||
(``*.bbappend`` files) into ``recipes-*`` subdirectories by
|
||||
|
||||
@@ -15,9 +15,27 @@
|
||||
import os
|
||||
import sys
|
||||
import datetime
|
||||
try:
|
||||
import yaml
|
||||
except ImportError:
|
||||
sys.stderr.write("The Yocto Project Sphinx documentation requires PyYAML.\
|
||||
\nPlease make sure to install pyyaml python package.\n")
|
||||
sys.exit(1)
|
||||
|
||||
current_version = "3.3.4"
|
||||
bitbake_version = "1.50"
|
||||
# current_version = "dev"
|
||||
# bitbake_version = "" # Leave empty for development branch
|
||||
# Obtain versions from poky.yaml instead
|
||||
with open("poky.yaml") as data:
|
||||
buff = data.read()
|
||||
subst_vars = yaml.safe_load(buff)
|
||||
if "DOCCONF_VERSION" not in subst_vars:
|
||||
sys.stderr.write("Please set DOCCONF_VERSION in poky.yaml")
|
||||
sys.exit(1)
|
||||
current_version = subst_vars["DOCCONF_VERSION"]
|
||||
if "BITBAKE_SERIES" not in subst_vars:
|
||||
sys.stderr.write("Please set BITBAKE_SERIES in poky.yaml")
|
||||
sys.exit(1)
|
||||
bitbake_version = subst_vars["BITBAKE_SERIES"]
|
||||
|
||||
# String used in sidebar
|
||||
version = 'Version: ' + current_version
|
||||
|
||||
@@ -221,7 +221,7 @@ your Metadata, the easier it is to cope with future changes.
|
||||
possible.
|
||||
|
||||
- Familiarize yourself with the `Yocto Project curated layer
|
||||
index <https://www.yoctoproject.org/software-overview/layers/>`__
|
||||
index :yocto_home:`/software-overview/layers/`
|
||||
or the :oe_layerindex:`OpenEmbedded layer index <>`.
|
||||
The latter contains more layers but they are less universally
|
||||
validated.
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
DISTRO : "3.3.4"
|
||||
DISTRO : "3.3.6"
|
||||
DISTRO_NAME_NO_CAP : "hardknott"
|
||||
DISTRO_NAME : "Hardknott"
|
||||
DISTRO_NAME_NO_CAP_MINUS_ONE : "gatesgarth"
|
||||
DISTRO_NAME_NO_CAP_LTS : "gatesgarth"
|
||||
YOCTO_DOC_VERSION : "3.3.4"
|
||||
YOCTO_DOC_VERSION : "3.3.6"
|
||||
YOCTO_DOC_VERSION_MINUS_ONE : "3.2.4"
|
||||
DISTRO_REL_TAG : "yocto-3.3.4"
|
||||
POKYVERSION : "25.0.4"
|
||||
DISTRO_REL_TAG : "yocto-3.3.6"
|
||||
DOCCONF_VERSION : "3.3.6"
|
||||
BITBAKE_SERIES : "1.50"
|
||||
POKYVERSION : "25.0.6"
|
||||
YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
|
||||
YOCTO_DL_URL : "https://downloads.yoctoproject.org"
|
||||
YOCTO_AB_URL : "https://autobuilder.yoctoproject.org"
|
||||
|
||||
@@ -339,7 +339,7 @@ If you would prefer not to use the ``install-buildtools`` script, you can instea
|
||||
download and run a pre-built buildtools installer yourself with the following
|
||||
steps:
|
||||
|
||||
1. Locate and download the ``*.sh`` at &YOCTO_RELEASE_DL_URL;/buildtools/
|
||||
1. Locate and download the ``*.sh`` at :yocto_dl:`/releases/yocto/&DISTRO_REL_TAG;/buildtools/`
|
||||
|
||||
2. Execute the installation script. Here is an example for the
|
||||
traditional installer:
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
- :yocto_docs:`3.4 Documentation </3.4>`
|
||||
- :yocto_docs:`3.4.1 Documentation </3.4.1>`
|
||||
- :yocto_docs:`3.4.2 Documentation </3.4.2>`
|
||||
- :yocto_docs:`3.4.3 Documentation </3.4.3>`
|
||||
|
||||
*******************************
|
||||
3.3 'hardknott' Release Series
|
||||
@@ -20,6 +22,8 @@
|
||||
- :yocto_docs:`3.3.2 Documentation </3.3.2>`
|
||||
- :yocto_docs:`3.3.3 Documentation </3.3.3>`
|
||||
- :yocto_docs:`3.3.4 Documentation </3.3.4>`
|
||||
- :yocto_docs:`3.3.5 Documentation </3.3.5>`
|
||||
- :yocto_docs:`3.3.6 Documentation </3.3.6>`
|
||||
|
||||
****************************
|
||||
3.1 'dunfell' Release Series
|
||||
@@ -38,6 +42,9 @@
|
||||
- :yocto_docs:`3.1.10 Documentation </3.1.10>`
|
||||
- :yocto_docs:`3.1.11 Documentation </3.1.11>`
|
||||
- :yocto_docs:`3.1.12 Documentation </3.1.12>`
|
||||
- :yocto_docs:`3.1.13 Documentation </3.1.13>`
|
||||
- :yocto_docs:`3.1.14 Documentation </3.1.14>`
|
||||
- :yocto_docs:`3.1.15 Documentation </3.1.15>`
|
||||
|
||||
==========================
|
||||
Previous Release Manuals
|
||||
|
||||
@@ -16,6 +16,8 @@ LDFLAGS_SECTION_REMOVAL_pn-grub = ""
|
||||
# SDK packages with build problems using sections
|
||||
CFLAGS_SECTION_REMOVAL_pn-nativesdk-glibc = ""
|
||||
LDFLAGS_SECTION_REMOVAL_pn-nativesdk-glibc = ""
|
||||
CFLAGS_SECTION_REMOVAL_pn-nativesdk-cairo = ""
|
||||
LDFLAGS_SECTION_REMOVAL_pn-nativesdk-cairo = ""
|
||||
CFLAGS_SECTION_REMOVAL_pn-nativesdk-mingw-w64-runtime = ""
|
||||
LDFLAGS_SECTION_REMOVAL_pn-nativesdk-mingw-w64-runtime = ""
|
||||
CFLAGS_SECTION_REMOVAL_pn-nativesdk-perl = ""
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
DISTRO_VERSION = "3.3.5"
|
||||
DISTRO_VERSION = "3.3.6"
|
||||
DISTRO_CODENAME = "hardknott"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
||||
|
||||
16
meta-selftest/recipes-test/gitrepotest/gitrepotest.bb
Normal file
16
meta-selftest/recipes-test/gitrepotest/gitrepotest.bb
Normal file
@@ -0,0 +1,16 @@
|
||||
SUMMARY = "Test recipe for git repo initialization"
|
||||
HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2"
|
||||
LICENSE = "GPL-2.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
PATCHTOOL="git"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https \
|
||||
file://0001-testpatch.patch \
|
||||
"
|
||||
|
||||
SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
@@ -0,0 +1,9 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 432a9b4..bbf7c74 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -1,3 +1,4 @@
|
||||
+## This is useless comment to test if patch works
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = matchbox-panel applets data po
|
||||
@@ -7,8 +7,8 @@ KMACHINE_genericx86 ?= "common-pc"
|
||||
KMACHINE_genericx86-64 ?= "common-pc-64"
|
||||
KMACHINE_beaglebone-yocto ?= "beaglebone"
|
||||
|
||||
SRCREV_machine_genericx86 ?= "1bb9d730ac6630d3f41c2ef529fab09f12bcf07d"
|
||||
SRCREV_machine_genericx86-64 ?= "1bb9d730ac6630d3f41c2ef529fab09f12bcf07d"
|
||||
SRCREV_machine_genericx86 ?= "84f6a75f64961e59d61bf3d70ab17e8bb430386b"
|
||||
SRCREV_machine_genericx86-64 ?= "84f6a75f64961e59d61bf3d70ab17e8bb430386b"
|
||||
SRCREV_machine_edgerouter ?= "4ab94e777d8b41ee1ee4c279259e9733bc8049b1"
|
||||
SRCREV_machine_beaglebone-yocto ?= "941cc9c3849f96f7eaf109b1e35e05ba366aca56"
|
||||
|
||||
@@ -17,7 +17,7 @@ COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
|
||||
COMPATIBLE_MACHINE_edgerouter = "edgerouter"
|
||||
COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
|
||||
|
||||
LINUX_VERSION_genericx86 = "5.10.82"
|
||||
LINUX_VERSION_genericx86-64 = "5.10.82"
|
||||
LINUX_VERSION_genericx86 = "5.10.99"
|
||||
LINUX_VERSION_genericx86-64 = "5.10.99"
|
||||
LINUX_VERSION_edgerouter = "5.10.63"
|
||||
LINUX_VERSION_beaglebone-yocto = "5.10.63"
|
||||
|
||||
@@ -7,8 +7,8 @@ KMACHINE_genericx86 ?= "common-pc"
|
||||
KMACHINE_genericx86-64 ?= "common-pc-64"
|
||||
KMACHINE_beaglebone-yocto ?= "beaglebone"
|
||||
|
||||
SRCREV_machine_genericx86 ?= "76404f1ae59698b6a446dba29c885ca78c69c330"
|
||||
SRCREV_machine_genericx86-64 ?= "76404f1ae59698b6a446dba29c885ca78c69c330"
|
||||
SRCREV_machine_genericx86 ?= "e2020dbe2ccaef50d7e8f37a5bf08c68a006a064"
|
||||
SRCREV_machine_genericx86-64 ?= "e2020dbe2ccaef50d7e8f37a5bf08c68a006a064"
|
||||
SRCREV_machine_edgerouter ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd"
|
||||
SRCREV_machine_beaglebone-yocto ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd"
|
||||
|
||||
@@ -17,7 +17,7 @@ COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
|
||||
COMPATIBLE_MACHINE_edgerouter = "edgerouter"
|
||||
COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
|
||||
|
||||
LINUX_VERSION_genericx86 = "5.4.158"
|
||||
LINUX_VERSION_genericx86-64 = "5.4.158"
|
||||
LINUX_VERSION_genericx86 = "5.4.178"
|
||||
LINUX_VERSION_genericx86-64 = "5.4.178"
|
||||
LINUX_VERSION_edgerouter = "5.4.58"
|
||||
LINUX_VERSION_beaglebone-yocto = "5.4.58"
|
||||
|
||||
@@ -950,7 +950,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
|
||||
|
||||
localdata2 = bb.data.createCopy(localdata)
|
||||
srcuri = "file://" + sstatefile
|
||||
localdata.setVar('SRC_URI', srcuri)
|
||||
localdata2.setVar('SRC_URI', srcuri)
|
||||
bb.debug(2, "SState: Attempting to fetch %s" % srcuri)
|
||||
|
||||
try:
|
||||
|
||||
@@ -101,12 +101,12 @@ def _toaster_load_pkgdatafile(dirpath, filepath):
|
||||
for line in fin:
|
||||
try:
|
||||
kn, kv = line.strip().split(": ", 1)
|
||||
m = re.match(r"^PKG_([^A-Z:]*)", kn)
|
||||
m = re.match(r"^PKG:([^A-Z:]*)", kn)
|
||||
if m:
|
||||
pkgdata['OPKGN'] = m.group(1)
|
||||
kn = "_".join([x for x in kn.split("_") if x.isupper()])
|
||||
pkgdata[kn] = kv.strip()
|
||||
if kn == 'FILES_INFO':
|
||||
kn = kn.split(":")[0]
|
||||
pkgdata[kn] = kv
|
||||
if kn.startswith('FILES_INFO'):
|
||||
pkgdata[kn] = json.loads(kv)
|
||||
|
||||
except ValueError:
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
# to the distro running on the build machine.
|
||||
#
|
||||
|
||||
UNINATIVE_MAXGLIBCVERSION = "2.34"
|
||||
UNINATIVE_VERSION = "3.4"
|
||||
UNINATIVE_MAXGLIBCVERSION = "2.35"
|
||||
UNINATIVE_VERSION = "3.5"
|
||||
|
||||
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "3013cdda8f0dc6639ce1c80f33eabce66f06b890bd5b58739a6d7a92a0bb7100"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "abed500de584aad63ec237546db20cdd0c69d8870a6f8e94ac31721ace64b376"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "126f4f7f6f21084ee140dac3eb4c536b963837826b7c38599db0b512c3377ba2"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "6de0771bd21e0fcb5e80388e5b561a8023b24083bcbf46e056a089982aff75d7"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "8c8745becbfa1c341bae839c7eab56ddf17ce36c303bcd73d3b2f2f788b631c2"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "e8047a5748e6f266165da141eb6d08b23674f30e477b0e5505b6403d50fbc4b2"
|
||||
|
||||
@@ -304,14 +304,19 @@ class GitApplyTree(PatchTree):
|
||||
|
||||
def _isInitialized(self):
|
||||
cmd = "git rev-parse --show-toplevel"
|
||||
(status, output) = subprocess.getstatusoutput(cmd.split())
|
||||
try:
|
||||
output = runcmd(cmd.split(), self.dir).strip()
|
||||
except CmdError as err:
|
||||
## runcmd returned non-zero which most likely means 128
|
||||
## Not a git directory
|
||||
return False
|
||||
## Make sure repo is in builddir to not break top-level git repos
|
||||
return status == 0 and os.path.samedir(output, self.dir)
|
||||
return os.path.samefile(output, self.dir)
|
||||
|
||||
def _initRepo(self):
|
||||
runcmd("git init".split(), self.dir)
|
||||
runcmd("git add .".split(), self.dir)
|
||||
runcmd("git commit -a --allow-empty -m Patching_started".split(), self.dir)
|
||||
runcmd("git commit -a --allow-empty -m bitbake_patching_started".split(), self.dir)
|
||||
|
||||
@staticmethod
|
||||
def extractPatchHeader(patchfile):
|
||||
|
||||
@@ -115,6 +115,10 @@ def sdk_list_installed_packages(d, target, rootfs_dir=None):
|
||||
|
||||
rootfs_dir = [sdk_output, os.path.join(sdk_output, target_path)][target is True]
|
||||
|
||||
if target is False:
|
||||
ipkgconf_sdk_target = d.getVar("IPKGCONF_SDK")
|
||||
d.setVar("IPKGCONF_TARGET", ipkgconf_sdk_target)
|
||||
|
||||
img_type = d.getVar('IMAGE_PKGTYPE')
|
||||
import importlib
|
||||
cls = importlib.import_module('oe.package_manager.' + img_type)
|
||||
|
||||
@@ -310,8 +310,22 @@ INHERIT_remove = \"report-error\"
|
||||
src = get_bb_var("SRC_URI",test_recipe)
|
||||
gitscm = re.search("git://", src)
|
||||
self.assertFalse(gitscm, "test_git_patchtool pre-condition failed: {} test recipe contains git repo!".format(test_recipe))
|
||||
result = bitbake('man-db -c patch', ignore_status=False)
|
||||
result = bitbake('{} -c patch'.format(test_recipe), ignore_status=False)
|
||||
fatal = re.search("fatal: not a git repository (or any of the parent directories)", result.output)
|
||||
self.assertFalse(fatal, "Failed to patch using PATCHTOOL=\"git\"")
|
||||
self.delete_recipeinc(test_recipe)
|
||||
bitbake('-cclean man-db')
|
||||
bitbake('-cclean {}'.format(test_recipe))
|
||||
|
||||
def test_git_patchtool2(self):
|
||||
""" Test if PATCHTOOL=git works with git repo and doesn't reinitialize it
|
||||
"""
|
||||
test_recipe = "gitrepotest"
|
||||
src = get_bb_var("SRC_URI",test_recipe)
|
||||
gitscm = re.search("git://", src)
|
||||
self.assertTrue(gitscm, "test_git_patchtool pre-condition failed: {} test recipe doesn't contains git repo!".format(test_recipe))
|
||||
result = bitbake('{} -c patch'.format(test_recipe), ignore_status=False)
|
||||
srcdir = get_bb_var('S', test_recipe)
|
||||
result = runCmd("git log", cwd = srcdir)
|
||||
self.assertFalse("bitbake_patching_started" in result.output, msg = "Repository has been reinitialized. {}".format(srcdir))
|
||||
self.delete_recipeinc(test_recipe)
|
||||
bitbake('-cclean {}'.format(test_recipe))
|
||||
|
||||
@@ -375,7 +375,7 @@ class RecipetoolTests(RecipetoolBase):
|
||||
temprecipe = os.path.join(self.tempdir, 'recipe')
|
||||
os.makedirs(temprecipe)
|
||||
pv = '1.7.3.0'
|
||||
srcuri = 'http://www.dest-unreach.org/socat/download/socat-%s.tar.bz2' % pv
|
||||
srcuri = 'http://www.dest-unreach.org/socat/download/Archive/socat-%s.tar.bz2' % pv
|
||||
result = runCmd('recipetool create %s -o %s' % (srcuri, temprecipe))
|
||||
dirlist = os.listdir(temprecipe)
|
||||
if len(dirlist) > 1:
|
||||
|
||||
@@ -4,11 +4,12 @@ DESCRIPTION = "Mobile Broadband Service Provider Database stores service provide
|
||||
SECTION = "network"
|
||||
LICENSE = "PD"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04"
|
||||
SRCREV = "90f3fe28aa25135b7e4a54a7816388913bfd4a2a"
|
||||
PV = "20201225"
|
||||
|
||||
SRCREV = "4cbb44a9fe26aa6f0b28beb79f9488b37c097b5e"
|
||||
PV = "20220315"
|
||||
PE = "1"
|
||||
|
||||
SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=master"
|
||||
SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=main"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools
|
||||
|
||||
@@ -29,7 +29,7 @@ SRC_URI_append_riscv32 = " \
|
||||
file://0004-Fixup-support-for-io_pgetevents_time64-syscall.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1"
|
||||
SRC_URI[sha256sum] = "40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a"
|
||||
|
||||
inherit lib_package multilib_header multilib_script ptest
|
||||
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
|
||||
@@ -204,6 +204,7 @@ do_install_ptest () {
|
||||
install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps
|
||||
|
||||
install -d ${D}${PTEST_PATH}/engines
|
||||
install -m755 ${B}/engines/dasync.so ${D}${PTEST_PATH}/engines
|
||||
install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines
|
||||
|
||||
# seems to be needed with perl 5.32.1
|
||||
49
meta/recipes-core/expat/expat/CVE-2022-23990.patch
Normal file
49
meta/recipes-core/expat/expat/CVE-2022-23990.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
From ede41d1e186ed2aba88a06e84cac839b770af3a1 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Pipping <sebastian@pipping.org>
|
||||
Date: Wed, 26 Jan 2022 02:36:43 +0100
|
||||
Subject: [PATCH] lib: Prevent integer overflow in doProlog (CVE-2022-23990)
|
||||
|
||||
The change from "int nameLen" to "size_t nameLen"
|
||||
addresses the overflow on "nameLen++" in code
|
||||
"for (; name[nameLen++];)" right above the second
|
||||
change in the patch.
|
||||
|
||||
Upstream-Status: Backport:
|
||||
https://github.com/libexpat/libexpat/pull/551/commits/ede41d1e186ed2aba88a06e84cac839b770af3a1
|
||||
|
||||
CVE: CVE-2022-23990
|
||||
|
||||
Signed-off-by: Steve Sakoman <steve@sakoman.com>
|
||||
|
||||
---
|
||||
lib/xmlparse.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/xmlparse.c b/expat/lib/xmlparse.c
|
||||
index 5ce31402..d1d17005 100644
|
||||
--- a/lib/xmlparse.c
|
||||
+++ b/lib/xmlparse.c
|
||||
@@ -5372,7 +5372,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end,
|
||||
if (dtd->in_eldecl) {
|
||||
ELEMENT_TYPE *el;
|
||||
const XML_Char *name;
|
||||
- int nameLen;
|
||||
+ size_t nameLen;
|
||||
const char *nxt
|
||||
= (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
|
||||
int myindex = nextScaffoldPart(parser);
|
||||
@@ -5388,7 +5388,13 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end,
|
||||
nameLen = 0;
|
||||
for (; name[nameLen++];)
|
||||
;
|
||||
- dtd->contentStringLen += nameLen;
|
||||
+
|
||||
+ /* Detect and prevent integer overflow */
|
||||
+ if (nameLen > UINT_MAX - dtd->contentStringLen) {
|
||||
+ return XML_ERROR_NO_MEMORY;
|
||||
+ }
|
||||
+
|
||||
+ dtd->contentStringLen += (unsigned)nameLen;
|
||||
if (parser->m_elementDeclHandler)
|
||||
handleDefault = XML_FALSE;
|
||||
}
|
||||
261
meta/recipes-core/expat/expat/CVE-2022-25235.patch
Normal file
261
meta/recipes-core/expat/expat/CVE-2022-25235.patch
Normal file
@@ -0,0 +1,261 @@
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/commit/306b721]
|
||||
CVE: CVE-2022-25235
|
||||
|
||||
The commit is a merge commit, and this patch is created by:
|
||||
|
||||
$ git show -m -p --stat 306b72134f157bbfd1637b20a22cabf4acfa136a
|
||||
|
||||
Remove modification for expat/Changes which fails to be applied.
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
|
||||
commit 306b72134f157bbfd1637b20a22cabf4acfa136a (from 2cc97e875ef84da4bcf55156c83599116f7523b4)
|
||||
Merge: 2cc97e87 c16300f0
|
||||
Author: Sebastian Pipping <sebastian@pipping.org>
|
||||
Date: Fri Feb 18 20:12:32 2022 +0100
|
||||
|
||||
Merge pull request #562 from libexpat/utf8-security
|
||||
|
||||
[CVE-2022-25235] lib: Protect against malformed encoding (e.g. malformed UTF-8)
|
||||
---
|
||||
expat/Changes | 7 ++++
|
||||
expat/lib/xmltok.c | 5 ---
|
||||
expat/lib/xmltok_impl.c | 18 ++++----
|
||||
expat/tests/runtests.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 127 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/lib/xmltok.c b/lib/xmltok.c
|
||||
index a72200e8..3bddf125 100644
|
||||
--- a/lib/xmltok.c
|
||||
+++ b/lib/xmltok.c
|
||||
@@ -98,11 +98,6 @@
|
||||
+ ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)] \
|
||||
& (1u << (((byte)[2]) & 0x1F)))
|
||||
|
||||
-#define UTF8_GET_NAMING(pages, p, n) \
|
||||
- ((n) == 2 \
|
||||
- ? UTF8_GET_NAMING2(pages, (const unsigned char *)(p)) \
|
||||
- : ((n) == 3 ? UTF8_GET_NAMING3(pages, (const unsigned char *)(p)) : 0))
|
||||
-
|
||||
/* Detection of invalid UTF-8 sequences is based on Table 3.1B
|
||||
of Unicode 3.2: http://www.unicode.org/unicode/reports/tr28/
|
||||
with the additional restriction of not allowing the Unicode
|
||||
diff --git a/lib/xmltok_impl.c b/lib/xmltok_impl.c
|
||||
index 0430591b..84ff35f9 100644
|
||||
--- a/lib/xmltok_impl.c
|
||||
+++ b/lib/xmltok_impl.c
|
||||
@@ -69,7 +69,7 @@
|
||||
case BT_LEAD##n: \
|
||||
if (end - ptr < n) \
|
||||
return XML_TOK_PARTIAL_CHAR; \
|
||||
- if (! IS_NAME_CHAR(enc, ptr, n)) { \
|
||||
+ if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) { \
|
||||
*nextTokPtr = ptr; \
|
||||
return XML_TOK_INVALID; \
|
||||
} \
|
||||
@@ -98,7 +98,7 @@
|
||||
case BT_LEAD##n: \
|
||||
if (end - ptr < n) \
|
||||
return XML_TOK_PARTIAL_CHAR; \
|
||||
- if (! IS_NMSTRT_CHAR(enc, ptr, n)) { \
|
||||
+ if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) { \
|
||||
*nextTokPtr = ptr; \
|
||||
return XML_TOK_INVALID; \
|
||||
} \
|
||||
@@ -1142,6 +1142,10 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
case BT_LEAD##n: \
|
||||
if (end - ptr < n) \
|
||||
return XML_TOK_PARTIAL_CHAR; \
|
||||
+ if (IS_INVALID_CHAR(enc, ptr, n)) { \
|
||||
+ *nextTokPtr = ptr; \
|
||||
+ return XML_TOK_INVALID; \
|
||||
+ } \
|
||||
if (IS_NMSTRT_CHAR(enc, ptr, n)) { \
|
||||
ptr += n; \
|
||||
tok = XML_TOK_NAME; \
|
||||
@@ -1270,7 +1274,7 @@ PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
# define LEAD_CASE(n) \
|
||||
case BT_LEAD##n: \
|
||||
- ptr += n; \
|
||||
+ ptr += n; /* NOTE: The encoding has already been validated. */ \
|
||||
break;
|
||||
LEAD_CASE(2)
|
||||
LEAD_CASE(3)
|
||||
@@ -1339,7 +1343,7 @@ PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
# define LEAD_CASE(n) \
|
||||
case BT_LEAD##n: \
|
||||
- ptr += n; \
|
||||
+ ptr += n; /* NOTE: The encoding has already been validated. */ \
|
||||
break;
|
||||
LEAD_CASE(2)
|
||||
LEAD_CASE(3)
|
||||
@@ -1518,7 +1522,7 @@ PREFIX(getAtts)(const ENCODING *enc, const char *ptr, int attsMax,
|
||||
state = inName; \
|
||||
}
|
||||
# define LEAD_CASE(n) \
|
||||
- case BT_LEAD##n: \
|
||||
+ case BT_LEAD##n: /* NOTE: The encoding has already been validated. */ \
|
||||
START_NAME ptr += (n - MINBPC(enc)); \
|
||||
break;
|
||||
LEAD_CASE(2)
|
||||
@@ -1730,7 +1734,7 @@ PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
# define LEAD_CASE(n) \
|
||||
case BT_LEAD##n: \
|
||||
- ptr += n; \
|
||||
+ ptr += n; /* NOTE: The encoding has already been validated. */ \
|
||||
break;
|
||||
LEAD_CASE(2)
|
||||
LEAD_CASE(3)
|
||||
@@ -1775,7 +1779,7 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
# define LEAD_CASE(n) \
|
||||
case BT_LEAD##n: \
|
||||
- ptr += n; \
|
||||
+ ptr += n; /* NOTE: The encoding has already been validated. */ \
|
||||
pos->columnNumber++; \
|
||||
break;
|
||||
LEAD_CASE(2)
|
||||
diff --git a/tests/runtests.c b/tests/runtests.c
|
||||
index bc5344b1..9b155b82 100644
|
||||
--- a/tests/runtests.c
|
||||
+++ b/tests/runtests.c
|
||||
@@ -5998,6 +5998,105 @@ START_TEST(test_utf8_in_cdata_section_2) {
|
||||
}
|
||||
END_TEST
|
||||
|
||||
+START_TEST(test_utf8_in_start_tags) {
|
||||
+ struct test_case {
|
||||
+ bool goodName;
|
||||
+ bool goodNameStart;
|
||||
+ const char *tagName;
|
||||
+ };
|
||||
+
|
||||
+ // The idea with the tests below is this:
|
||||
+ // We want to cover 1-, 2- and 3-byte sequences, 4-byte sequences
|
||||
+ // go to isNever and are hence not a concern.
|
||||
+ //
|
||||
+ // We start with a character that is a valid name character
|
||||
+ // (or even name-start character, see XML 1.0r4 spec) and then we flip
|
||||
+ // single bits at places where (1) the result leaves the UTF-8 encoding space
|
||||
+ // and (2) we stay in the same n-byte sequence family.
|
||||
+ //
|
||||
+ // The flipped bits are highlighted in angle brackets in comments,
|
||||
+ // e.g. "[<1>011 1001]" means we had [0011 1001] but we now flipped
|
||||
+ // the most significant bit to 1 to leave UTF-8 encoding space.
|
||||
+ struct test_case cases[] = {
|
||||
+ // 1-byte UTF-8: [0xxx xxxx]
|
||||
+ {true, true, "\x3A"}, // [0011 1010] = ASCII colon ':'
|
||||
+ {false, false, "\xBA"}, // [<1>011 1010]
|
||||
+ {true, false, "\x39"}, // [0011 1001] = ASCII nine '9'
|
||||
+ {false, false, "\xB9"}, // [<1>011 1001]
|
||||
+
|
||||
+ // 2-byte UTF-8: [110x xxxx] [10xx xxxx]
|
||||
+ {true, true, "\xDB\xA5"}, // [1101 1011] [1010 0101] =
|
||||
+ // Arabic small waw U+06E5
|
||||
+ {false, false, "\x9B\xA5"}, // [1<0>01 1011] [1010 0101]
|
||||
+ {false, false, "\xDB\x25"}, // [1101 1011] [<0>010 0101]
|
||||
+ {false, false, "\xDB\xE5"}, // [1101 1011] [1<1>10 0101]
|
||||
+ {true, false, "\xCC\x81"}, // [1100 1100] [1000 0001] =
|
||||
+ // combining char U+0301
|
||||
+ {false, false, "\x8C\x81"}, // [1<0>00 1100] [1000 0001]
|
||||
+ {false, false, "\xCC\x01"}, // [1100 1100] [<0>000 0001]
|
||||
+ {false, false, "\xCC\xC1"}, // [1100 1100] [1<1>00 0001]
|
||||
+
|
||||
+ // 3-byte UTF-8: [1110 xxxx] [10xx xxxx] [10xxxxxx]
|
||||
+ {true, true, "\xE0\xA4\x85"}, // [1110 0000] [1010 0100] [1000 0101] =
|
||||
+ // Devanagari Letter A U+0905
|
||||
+ {false, false, "\xA0\xA4\x85"}, // [1<0>10 0000] [1010 0100] [1000 0101]
|
||||
+ {false, false, "\xE0\x24\x85"}, // [1110 0000] [<0>010 0100] [1000 0101]
|
||||
+ {false, false, "\xE0\xE4\x85"}, // [1110 0000] [1<1>10 0100] [1000 0101]
|
||||
+ {false, false, "\xE0\xA4\x05"}, // [1110 0000] [1010 0100] [<0>000 0101]
|
||||
+ {false, false, "\xE0\xA4\xC5"}, // [1110 0000] [1010 0100] [1<1>00 0101]
|
||||
+ {true, false, "\xE0\xA4\x81"}, // [1110 0000] [1010 0100] [1000 0001] =
|
||||
+ // combining char U+0901
|
||||
+ {false, false, "\xA0\xA4\x81"}, // [1<0>10 0000] [1010 0100] [1000 0001]
|
||||
+ {false, false, "\xE0\x24\x81"}, // [1110 0000] [<0>010 0100] [1000 0001]
|
||||
+ {false, false, "\xE0\xE4\x81"}, // [1110 0000] [1<1>10 0100] [1000 0001]
|
||||
+ {false, false, "\xE0\xA4\x01"}, // [1110 0000] [1010 0100] [<0>000 0001]
|
||||
+ {false, false, "\xE0\xA4\xC1"}, // [1110 0000] [1010 0100] [1<1>00 0001]
|
||||
+ };
|
||||
+ const bool atNameStart[] = {true, false};
|
||||
+
|
||||
+ size_t i = 0;
|
||||
+ char doc[1024];
|
||||
+ size_t failCount = 0;
|
||||
+
|
||||
+ for (; i < sizeof(cases) / sizeof(cases[0]); i++) {
|
||||
+ size_t j = 0;
|
||||
+ for (; j < sizeof(atNameStart) / sizeof(atNameStart[0]); j++) {
|
||||
+ const bool expectedSuccess
|
||||
+ = atNameStart[j] ? cases[i].goodNameStart : cases[i].goodName;
|
||||
+ sprintf(doc, "<%s%s><!--", atNameStart[j] ? "" : "a", cases[i].tagName);
|
||||
+ XML_Parser parser = XML_ParserCreate(NULL);
|
||||
+
|
||||
+ const enum XML_Status status
|
||||
+ = XML_Parse(parser, doc, (int)strlen(doc), /*isFinal=*/XML_FALSE);
|
||||
+
|
||||
+ bool success = true;
|
||||
+ if ((status == XML_STATUS_OK) != expectedSuccess) {
|
||||
+ success = false;
|
||||
+ }
|
||||
+ if ((status == XML_STATUS_ERROR)
|
||||
+ && (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN)) {
|
||||
+ success = false;
|
||||
+ }
|
||||
+
|
||||
+ if (! success) {
|
||||
+ fprintf(
|
||||
+ stderr,
|
||||
+ "FAIL case %2u (%sat name start, %u-byte sequence, error code %d)\n",
|
||||
+ (unsigned)i + 1u, atNameStart[j] ? " " : "not ",
|
||||
+ (unsigned)strlen(cases[i].tagName), XML_GetErrorCode(parser));
|
||||
+ failCount++;
|
||||
+ }
|
||||
+
|
||||
+ XML_ParserFree(parser);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (failCount > 0) {
|
||||
+ fail("UTF-8 regression detected");
|
||||
+ }
|
||||
+}
|
||||
+END_TEST
|
||||
+
|
||||
/* Test trailing spaces in elements are accepted */
|
||||
static void XMLCALL
|
||||
record_element_end_handler(void *userData, const XML_Char *name) {
|
||||
@@ -6175,6 +6274,14 @@ START_TEST(test_bad_doctype) {
|
||||
}
|
||||
END_TEST
|
||||
|
||||
+START_TEST(test_bad_doctype_utf8) {
|
||||
+ const char *text = "<!DOCTYPE \xDB\x25"
|
||||
+ "doc><doc/>"; // [1101 1011] [<0>010 0101]
|
||||
+ expect_failure(text, XML_ERROR_INVALID_TOKEN,
|
||||
+ "Invalid UTF-8 in DOCTYPE not faulted");
|
||||
+}
|
||||
+END_TEST
|
||||
+
|
||||
START_TEST(test_bad_doctype_utf16) {
|
||||
const char text[] =
|
||||
/* <!DOCTYPE doc [ \x06f2 ]><doc/>
|
||||
@@ -11870,6 +11977,7 @@ make_suite(void) {
|
||||
tcase_add_test(tc_basic, test_ext_entity_utf8_non_bom);
|
||||
tcase_add_test(tc_basic, test_utf8_in_cdata_section);
|
||||
tcase_add_test(tc_basic, test_utf8_in_cdata_section_2);
|
||||
+ tcase_add_test(tc_basic, test_utf8_in_start_tags);
|
||||
tcase_add_test(tc_basic, test_trailing_spaces_in_elements);
|
||||
tcase_add_test(tc_basic, test_utf16_attribute);
|
||||
tcase_add_test(tc_basic, test_utf16_second_attr);
|
||||
@@ -11878,6 +11986,7 @@ make_suite(void) {
|
||||
tcase_add_test(tc_basic, test_bad_attr_desc_keyword);
|
||||
tcase_add_test(tc_basic, test_bad_attr_desc_keyword_utf16);
|
||||
tcase_add_test(tc_basic, test_bad_doctype);
|
||||
+ tcase_add_test(tc_basic, test_bad_doctype_utf8);
|
||||
tcase_add_test(tc_basic, test_bad_doctype_utf16);
|
||||
tcase_add_test(tc_basic, test_bad_doctype_plus);
|
||||
tcase_add_test(tc_basic, test_bad_doctype_star);
|
||||
116
meta/recipes-core/expat/expat/CVE-2022-25236-1.patch
Normal file
116
meta/recipes-core/expat/expat/CVE-2022-25236-1.patch
Normal file
@@ -0,0 +1,116 @@
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/commit/2cc97e87]
|
||||
CVE: CVE-2022-25236
|
||||
|
||||
The commit is a merge commit, and this patch is created by:
|
||||
|
||||
$ git diff -p --stat 2cc97e87~ 2cc97e87
|
||||
|
||||
Remove modification for expat/Changes which fails to be applied.
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
|
||||
commit 2cc97e875ef84da4bcf55156c83599116f7523b4 (from d477fdd284468f2ab822024e75702f2c1b254f42)
|
||||
Merge: d477fdd2 e4d7e497
|
||||
Author: Sebastian Pipping <sebastian@pipping.org>
|
||||
Date: Fri Feb 18 18:01:27 2022 +0100
|
||||
|
||||
Merge pull request #561 from libexpat/namesep-security
|
||||
|
||||
[CVE-2022-25236] lib: Protect against insertion of namesep characters into namespace URIs
|
||||
|
||||
---
|
||||
expat/Changes | 16 ++++++++++++++++
|
||||
expat/lib/xmlparse.c | 17 +++++++++++++----
|
||||
expat/tests/runtests.c | 30 ++++++++++++++++++++++++++++++
|
||||
3 files changed, 59 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
|
||||
index 7376aab1..c98e2e9f 100644
|
||||
--- a/lib/xmlparse.c
|
||||
+++ b/lib/xmlparse.c
|
||||
@@ -718,8 +718,7 @@ XML_ParserCreate(const XML_Char *encodingName) {
|
||||
|
||||
XML_Parser XMLCALL
|
||||
XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep) {
|
||||
- XML_Char tmp[2];
|
||||
- *tmp = nsSep;
|
||||
+ XML_Char tmp[2] = {nsSep, 0};
|
||||
return XML_ParserCreate_MM(encodingName, NULL, tmp);
|
||||
}
|
||||
|
||||
@@ -1344,8 +1343,7 @@ XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context,
|
||||
would be otherwise.
|
||||
*/
|
||||
if (parser->m_ns) {
|
||||
- XML_Char tmp[2];
|
||||
- *tmp = parser->m_namespaceSeparator;
|
||||
+ XML_Char tmp[2] = {parser->m_namespaceSeparator, 0};
|
||||
parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd);
|
||||
} else {
|
||||
parser = parserCreate(encodingName, &parser->m_mem, NULL, newDtd);
|
||||
@@ -3761,6 +3759,17 @@ addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
|
||||
if (! mustBeXML && isXMLNS
|
||||
&& (len > xmlnsLen || uri[len] != xmlnsNamespace[len]))
|
||||
isXMLNS = XML_FALSE;
|
||||
+
|
||||
+ // NOTE: While Expat does not validate namespace URIs against RFC 3986,
|
||||
+ // we have to at least make sure that the XML processor on top of
|
||||
+ // Expat (that is splitting tag names by namespace separator into
|
||||
+ // 2- or 3-tuples (uri-local or uri-local-prefix)) cannot be confused
|
||||
+ // by an attacker putting additional namespace separator characters
|
||||
+ // into namespace declarations. That would be ambiguous and not to
|
||||
+ // be expected.
|
||||
+ if (parser->m_ns && (uri[len] == parser->m_namespaceSeparator)) {
|
||||
+ return XML_ERROR_SYNTAX;
|
||||
+ }
|
||||
}
|
||||
isXML = isXML && len == xmlLen;
|
||||
isXMLNS = isXMLNS && len == xmlnsLen;
|
||||
diff --git a/tests/runtests.c b/tests/runtests.c
|
||||
index d07203f2..bc5344b1 100644
|
||||
--- a/tests/runtests.c
|
||||
+++ b/tests/runtests.c
|
||||
@@ -7220,6 +7220,35 @@ START_TEST(test_ns_double_colon_doctype) {
|
||||
}
|
||||
END_TEST
|
||||
|
||||
+START_TEST(test_ns_separator_in_uri) {
|
||||
+ struct test_case {
|
||||
+ enum XML_Status expectedStatus;
|
||||
+ const char *doc;
|
||||
+ };
|
||||
+ struct test_case cases[] = {
|
||||
+ {XML_STATUS_OK, "<doc xmlns='one_two' />"},
|
||||
+ {XML_STATUS_ERROR, "<doc xmlns='one
two' />"},
|
||||
+ };
|
||||
+
|
||||
+ size_t i = 0;
|
||||
+ size_t failCount = 0;
|
||||
+ for (; i < sizeof(cases) / sizeof(cases[0]); i++) {
|
||||
+ XML_Parser parser = XML_ParserCreateNS(NULL, '\n');
|
||||
+ XML_SetElementHandler(parser, dummy_start_element, dummy_end_element);
|
||||
+ if (XML_Parse(parser, cases[i].doc, (int)strlen(cases[i].doc),
|
||||
+ /*isFinal*/ XML_TRUE)
|
||||
+ != cases[i].expectedStatus) {
|
||||
+ failCount++;
|
||||
+ }
|
||||
+ XML_ParserFree(parser);
|
||||
+ }
|
||||
+
|
||||
+ if (failCount) {
|
||||
+ fail("Namespace separator handling is broken");
|
||||
+ }
|
||||
+}
|
||||
+END_TEST
|
||||
+
|
||||
/* Control variable; the number of times duff_allocator() will successfully
|
||||
* allocate */
|
||||
#define ALLOC_ALWAYS_SUCCEED (-1)
|
||||
@@ -11905,6 +11934,7 @@ make_suite(void) {
|
||||
tcase_add_test(tc_namespace, test_ns_utf16_doctype);
|
||||
tcase_add_test(tc_namespace, test_ns_invalid_doctype);
|
||||
tcase_add_test(tc_namespace, test_ns_double_colon_doctype);
|
||||
+ tcase_add_test(tc_namespace, test_ns_separator_in_uri);
|
||||
|
||||
suite_add_tcase(s, tc_misc);
|
||||
tcase_add_checked_fixture(tc_misc, NULL, basic_teardown);
|
||||
232
meta/recipes-core/expat/expat/CVE-2022-25236-2.patch
Normal file
232
meta/recipes-core/expat/expat/CVE-2022-25236-2.patch
Normal file
@@ -0,0 +1,232 @@
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/commit/f178826b]
|
||||
CVE: CVE-2022-25236
|
||||
|
||||
The commit is a merge commit, and this patch is created by:
|
||||
|
||||
$ git show -m -p --stat f178826b
|
||||
|
||||
Remove changes for expat/Changes and reference.html which fail to be applied.
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
|
||||
commit f178826bb1e9c8ee23202f1be55ad4ac7b649e84 (from c99e0e7f2b15b48848038992ecbb4480f957cfe9)
|
||||
Merge: c99e0e7f 9579f7ea
|
||||
Author: Sebastian Pipping <sebastian@pipping.org>
|
||||
Date: Fri Mar 4 18:43:39 2022 +0100
|
||||
|
||||
Merge pull request #577 from libexpat/namesep
|
||||
|
||||
lib: Relax fix to CVE-2022-25236 with regard to RFC 3986 URI characters (fixes #572)
|
||||
---
|
||||
expat/Changes | 16 ++++++
|
||||
expat/doc/reference.html | 8 +++
|
||||
expat/lib/expat.h | 11 ++++
|
||||
expat/lib/xmlparse.c | 139 ++++++++++++++++++++++++++++++++++++++++++++---
|
||||
expat/tests/runtests.c | 8 ++-
|
||||
5 files changed, 171 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/lib/expat.h b/lib/expat.h
|
||||
index 5ab493f7..181fc960 100644
|
||||
--- a/lib/expat.h
|
||||
+++ b/lib/expat.h
|
||||
@@ -239,6 +239,17 @@ XML_ParserCreate(const XML_Char *encoding);
|
||||
and the local part will be concatenated without any separator.
|
||||
It is a programming error to use the separator '\0' with namespace
|
||||
triplets (see XML_SetReturnNSTriplet).
|
||||
+ If a namespace separator is chosen that can be part of a URI or
|
||||
+ part of an XML name, splitting an expanded name back into its
|
||||
+ 1, 2 or 3 original parts on application level in the element handler
|
||||
+ may end up vulnerable, so these are advised against; sane choices for
|
||||
+ a namespace separator are e.g. '\n' (line feed) and '|' (pipe).
|
||||
+
|
||||
+ Note that Expat does not validate namespace URIs (beyond encoding)
|
||||
+ against RFC 3986 today (and is not required to do so with regard to
|
||||
+ the XML 1.0 namespaces specification) but it may start doing that
|
||||
+ in future releases. Before that, an application using Expat must
|
||||
+ be ready to receive namespace URIs containing non-URI characters.
|
||||
*/
|
||||
XMLPARSEAPI(XML_Parser)
|
||||
XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
|
||||
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
|
||||
index 59da19c8..6fe2cf1e 100644
|
||||
--- a/lib/xmlparse.c
|
||||
+++ b/lib/xmlparse.c
|
||||
@@ -3705,6 +3705,117 @@ storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr,
|
||||
return XML_ERROR_NONE;
|
||||
}
|
||||
|
||||
+static XML_Bool
|
||||
+is_rfc3986_uri_char(XML_Char candidate) {
|
||||
+ // For the RFC 3986 ANBF grammar see
|
||||
+ // https://datatracker.ietf.org/doc/html/rfc3986#appendix-A
|
||||
+
|
||||
+ switch (candidate) {
|
||||
+ // From rule "ALPHA" (uppercase half)
|
||||
+ case 'A':
|
||||
+ case 'B':
|
||||
+ case 'C':
|
||||
+ case 'D':
|
||||
+ case 'E':
|
||||
+ case 'F':
|
||||
+ case 'G':
|
||||
+ case 'H':
|
||||
+ case 'I':
|
||||
+ case 'J':
|
||||
+ case 'K':
|
||||
+ case 'L':
|
||||
+ case 'M':
|
||||
+ case 'N':
|
||||
+ case 'O':
|
||||
+ case 'P':
|
||||
+ case 'Q':
|
||||
+ case 'R':
|
||||
+ case 'S':
|
||||
+ case 'T':
|
||||
+ case 'U':
|
||||
+ case 'V':
|
||||
+ case 'W':
|
||||
+ case 'X':
|
||||
+ case 'Y':
|
||||
+ case 'Z':
|
||||
+
|
||||
+ // From rule "ALPHA" (lowercase half)
|
||||
+ case 'a':
|
||||
+ case 'b':
|
||||
+ case 'c':
|
||||
+ case 'd':
|
||||
+ case 'e':
|
||||
+ case 'f':
|
||||
+ case 'g':
|
||||
+ case 'h':
|
||||
+ case 'i':
|
||||
+ case 'j':
|
||||
+ case 'k':
|
||||
+ case 'l':
|
||||
+ case 'm':
|
||||
+ case 'n':
|
||||
+ case 'o':
|
||||
+ case 'p':
|
||||
+ case 'q':
|
||||
+ case 'r':
|
||||
+ case 's':
|
||||
+ case 't':
|
||||
+ case 'u':
|
||||
+ case 'v':
|
||||
+ case 'w':
|
||||
+ case 'x':
|
||||
+ case 'y':
|
||||
+ case 'z':
|
||||
+
|
||||
+ // From rule "DIGIT"
|
||||
+ case '0':
|
||||
+ case '1':
|
||||
+ case '2':
|
||||
+ case '3':
|
||||
+ case '4':
|
||||
+ case '5':
|
||||
+ case '6':
|
||||
+ case '7':
|
||||
+ case '8':
|
||||
+ case '9':
|
||||
+
|
||||
+ // From rule "pct-encoded"
|
||||
+ case '%':
|
||||
+
|
||||
+ // From rule "unreserved"
|
||||
+ case '-':
|
||||
+ case '.':
|
||||
+ case '_':
|
||||
+ case '~':
|
||||
+
|
||||
+ // From rule "gen-delims"
|
||||
+ case ':':
|
||||
+ case '/':
|
||||
+ case '?':
|
||||
+ case '#':
|
||||
+ case '[':
|
||||
+ case ']':
|
||||
+ case '@':
|
||||
+
|
||||
+ // From rule "sub-delims"
|
||||
+ case '!':
|
||||
+ case '$':
|
||||
+ case '&':
|
||||
+ case '\'':
|
||||
+ case '(':
|
||||
+ case ')':
|
||||
+ case '*':
|
||||
+ case '+':
|
||||
+ case ',':
|
||||
+ case ';':
|
||||
+ case '=':
|
||||
+ return XML_TRUE;
|
||||
+
|
||||
+ default:
|
||||
+ return XML_FALSE;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* addBinding() overwrites the value of prefix->binding without checking.
|
||||
Therefore one must keep track of the old value outside of addBinding().
|
||||
*/
|
||||
@@ -3763,14 +3874,26 @@ addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
|
||||
&& (len > xmlnsLen || uri[len] != xmlnsNamespace[len]))
|
||||
isXMLNS = XML_FALSE;
|
||||
|
||||
- // NOTE: While Expat does not validate namespace URIs against RFC 3986,
|
||||
- // we have to at least make sure that the XML processor on top of
|
||||
- // Expat (that is splitting tag names by namespace separator into
|
||||
- // 2- or 3-tuples (uri-local or uri-local-prefix)) cannot be confused
|
||||
- // by an attacker putting additional namespace separator characters
|
||||
- // into namespace declarations. That would be ambiguous and not to
|
||||
- // be expected.
|
||||
- if (parser->m_ns && (uri[len] == parser->m_namespaceSeparator)) {
|
||||
+ // NOTE: While Expat does not validate namespace URIs against RFC 3986
|
||||
+ // today (and is not REQUIRED to do so with regard to the XML 1.0
|
||||
+ // namespaces specification) we have to at least make sure, that
|
||||
+ // the application on top of Expat (that is likely splitting expanded
|
||||
+ // element names ("qualified names") of form
|
||||
+ // "[uri sep] local [sep prefix] '\0'" back into 1, 2 or 3 pieces
|
||||
+ // in its element handler code) cannot be confused by an attacker
|
||||
+ // putting additional namespace separator characters into namespace
|
||||
+ // declarations. That would be ambiguous and not to be expected.
|
||||
+ //
|
||||
+ // While the HTML API docs of function XML_ParserCreateNS have been
|
||||
+ // advising against use of a namespace separator character that can
|
||||
+ // appear in a URI for >20 years now, some widespread applications
|
||||
+ // are using URI characters (':' (colon) in particular) for a
|
||||
+ // namespace separator, in practice. To keep these applications
|
||||
+ // functional, we only reject namespaces URIs containing the
|
||||
+ // application-chosen namespace separator if the chosen separator
|
||||
+ // is a non-URI character with regard to RFC 3986.
|
||||
+ if (parser->m_ns && (uri[len] == parser->m_namespaceSeparator)
|
||||
+ && ! is_rfc3986_uri_char(uri[len])) {
|
||||
return XML_ERROR_SYNTAX;
|
||||
}
|
||||
}
|
||||
diff --git a/tests/runtests.c b/tests/runtests.c
|
||||
index 60da868e..712706c4 100644
|
||||
--- a/tests/runtests.c
|
||||
+++ b/tests/runtests.c
|
||||
@@ -7406,16 +7406,18 @@ START_TEST(test_ns_separator_in_uri) {
|
||||
struct test_case {
|
||||
enum XML_Status expectedStatus;
|
||||
const char *doc;
|
||||
+ XML_Char namesep;
|
||||
};
|
||||
struct test_case cases[] = {
|
||||
- {XML_STATUS_OK, "<doc xmlns='one_two' />"},
|
||||
- {XML_STATUS_ERROR, "<doc xmlns='one
two' />"},
|
||||
+ {XML_STATUS_OK, "<doc xmlns='one_two' />", XCS('\n')},
|
||||
+ {XML_STATUS_ERROR, "<doc xmlns='one
two' />", XCS('\n')},
|
||||
+ {XML_STATUS_OK, "<doc xmlns='one:two' />", XCS(':')},
|
||||
};
|
||||
|
||||
size_t i = 0;
|
||||
size_t failCount = 0;
|
||||
for (; i < sizeof(cases) / sizeof(cases[0]); i++) {
|
||||
- XML_Parser parser = XML_ParserCreateNS(NULL, '\n');
|
||||
+ XML_Parser parser = XML_ParserCreateNS(NULL, cases[i].namesep);
|
||||
XML_SetElementHandler(parser, dummy_start_element, dummy_end_element);
|
||||
if (XML_Parse(parser, cases[i].doc, (int)strlen(cases[i].doc),
|
||||
/*isFinal*/ XML_TRUE)
|
||||
@@ -10,13 +10,17 @@ VERSION_TAG = "${@d.getVar('PV').replace('.', '_')}"
|
||||
|
||||
SRC_URI = "https://github.com/libexpat/libexpat/releases/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \
|
||||
file://libtool-tag.patch \
|
||||
file://run-ptest \
|
||||
file://0001-Add-output-of-tests-result.patch \
|
||||
file://run-ptest \
|
||||
file://0001-Add-output-of-tests-result.patch \
|
||||
file://CVE-2022-22822-27.patch \
|
||||
file://CVE-2021-45960.patch \
|
||||
file://CVE-2021-46143.patch \
|
||||
file://CVE-2022-23852.patch \
|
||||
"
|
||||
file://CVE-2022-23990.patch \
|
||||
file://CVE-2022-25235.patch \
|
||||
file://CVE-2022-25236-1.patch \
|
||||
file://CVE-2022-25236-2.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/libexpat/libexpat/releases/"
|
||||
|
||||
|
||||
@@ -12,6 +12,18 @@ finish_run() {
|
||||
fatal "ERROR: There's no '/dev' on rootfs."
|
||||
fi
|
||||
|
||||
# Unmount anything that was automounted by busybox via mdev-mount.sh.
|
||||
# We're about to switch_root, and leaving anything mounted will prevent
|
||||
# the next rootfs from modifying the block device. Ignore ROOT_DISK,
|
||||
# if it was set by setup-live, because it'll be mounted over loopback
|
||||
# to ROOTFS_DIR.
|
||||
local dev
|
||||
for dev in /run/media/*; do
|
||||
if mountpoint -q "${dev}" && [ "${dev##*/}" != "${ROOT_DISK}" ]; then
|
||||
umount -f "${dev}" || debug "Failed to unmount ${dev}"
|
||||
fi
|
||||
done
|
||||
|
||||
info "Switching root to '$ROOTFS_DIR'..."
|
||||
|
||||
debug "Moving /dev, /proc and /sys onto rootfs..."
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
From 646fe48d1c8a74310c409ddf81fe7df6700052af Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Tue, 22 Feb 2022 11:51:08 +0100
|
||||
Subject: [PATCH] Fix --without-valid build
|
||||
|
||||
Regressed in commit 652dd12a.
|
||||
---
|
||||
valid.c | 58 ++++++++++++++++++++++++++++-----------------------------
|
||||
1 file changed, 29 insertions(+), 29 deletions(-)
|
||||
---
|
||||
|
||||
From https://github.com/GNOME/libxml2.git
|
||||
commit 646fe48d1c8a74310c409ddf81fe7df6700052af
|
||||
|
||||
CVE: CVE-2022-23308
|
||||
Upstream-status: Backport
|
||||
|
||||
Signed-off-by: Joe Slater <joe.slater@windriver.com>
|
||||
|
||||
|
||||
diff --git a/valid.c b/valid.c
|
||||
index 8e596f1d..9684683a 100644
|
||||
--- a/valid.c
|
||||
+++ b/valid.c
|
||||
@@ -479,35 +479,6 @@ nodeVPop(xmlValidCtxtPtr ctxt)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
-/**
|
||||
- * xmlValidNormalizeString:
|
||||
- * @str: a string
|
||||
- *
|
||||
- * Normalize a string in-place.
|
||||
- */
|
||||
-static void
|
||||
-xmlValidNormalizeString(xmlChar *str) {
|
||||
- xmlChar *dst;
|
||||
- const xmlChar *src;
|
||||
-
|
||||
- if (str == NULL)
|
||||
- return;
|
||||
- src = str;
|
||||
- dst = str;
|
||||
-
|
||||
- while (*src == 0x20) src++;
|
||||
- while (*src != 0) {
|
||||
- if (*src == 0x20) {
|
||||
- while (*src == 0x20) src++;
|
||||
- if (*src != 0)
|
||||
- *dst++ = 0x20;
|
||||
- } else {
|
||||
- *dst++ = *src++;
|
||||
- }
|
||||
- }
|
||||
- *dst = 0;
|
||||
-}
|
||||
-
|
||||
#ifdef DEBUG_VALID_ALGO
|
||||
static void
|
||||
xmlValidPrintNode(xmlNodePtr cur) {
|
||||
@@ -2636,6 +2607,35 @@ xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
|
||||
(xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
|
||||
xmlFree((char *)(str));
|
||||
|
||||
+/**
|
||||
+ * xmlValidNormalizeString:
|
||||
+ * @str: a string
|
||||
+ *
|
||||
+ * Normalize a string in-place.
|
||||
+ */
|
||||
+static void
|
||||
+xmlValidNormalizeString(xmlChar *str) {
|
||||
+ xmlChar *dst;
|
||||
+ const xmlChar *src;
|
||||
+
|
||||
+ if (str == NULL)
|
||||
+ return;
|
||||
+ src = str;
|
||||
+ dst = str;
|
||||
+
|
||||
+ while (*src == 0x20) src++;
|
||||
+ while (*src != 0) {
|
||||
+ if (*src == 0x20) {
|
||||
+ while (*src == 0x20) src++;
|
||||
+ if (*src != 0)
|
||||
+ *dst++ = 0x20;
|
||||
+ } else {
|
||||
+ *dst++ = *src++;
|
||||
+ }
|
||||
+ }
|
||||
+ *dst = 0;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
xmlIsStreaming(xmlValidCtxtPtr ctxt) {
|
||||
xmlParserCtxtPtr pctxt;
|
||||
--
|
||||
2.35.1
|
||||
|
||||
209
meta/recipes-core/libxml/libxml2/CVE-2022-23308.patch
Normal file
209
meta/recipes-core/libxml/libxml2/CVE-2022-23308.patch
Normal file
@@ -0,0 +1,209 @@
|
||||
From 652dd12a858989b14eed4e84e453059cd3ba340e Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Tue, 8 Feb 2022 03:29:24 +0100
|
||||
Subject: [PATCH] [CVE-2022-23308] Use-after-free of ID and IDREF attributes
|
||||
|
||||
If a document is parsed with XML_PARSE_DTDVALID and without
|
||||
XML_PARSE_NOENT, the value of ID attributes has to be normalized after
|
||||
potentially expanding entities in xmlRemoveID. Otherwise, later calls
|
||||
to xmlGetID can return a pointer to previously freed memory.
|
||||
|
||||
ID attributes which are empty or contain only whitespace after
|
||||
entity expansion are affected in a similar way. This is fixed by
|
||||
not storing such attributes in the ID table.
|
||||
|
||||
The test to detect streaming mode when validating against a DTD was
|
||||
broken. In connection with the defects above, this could result in a
|
||||
use-after-free when using the xmlReader interface with validation.
|
||||
Fix detection of streaming mode to avoid similar issues. (This changes
|
||||
the expected result of a test case. But as far as I can tell, using the
|
||||
XML reader with XIncludes referencing the root document never worked
|
||||
properly, anyway.)
|
||||
|
||||
All of these issues can result in denial of service. Using xmlReader
|
||||
with validation could result in disclosure of memory via the error
|
||||
channel, typically stderr. The security impact of xmlGetID returning
|
||||
a pointer to freed memory depends on the application. The typical use
|
||||
case of calling xmlGetID on an unmodified document is not affected.
|
||||
---
|
||||
result/XInclude/ns1.xml.rdr | 2 +-
|
||||
valid.c | 88 +++++++++++++++++++++++--------------
|
||||
2 files changed, 56 insertions(+), 34 deletions(-)
|
||||
---
|
||||
|
||||
From https://github.com/GNOME/libxml2.git
|
||||
commit 652dd12a858989b14eed4e84e453059cd3ba340e
|
||||
|
||||
Remove patch to ns1.xml.rdr which does not exist in version 2.9.10.
|
||||
|
||||
CVE: CVE-2022-23308
|
||||
Upstream-status: Backport
|
||||
|
||||
Signed-off-by: Joe Slater <joe.slater@windriver.com>
|
||||
|
||||
|
||||
diff --git a/valid.c b/valid.c
|
||||
index 5ee391c0..8e596f1d 100644
|
||||
--- a/valid.c
|
||||
+++ b/valid.c
|
||||
@@ -479,6 +479,35 @@ nodeVPop(xmlValidCtxtPtr ctxt)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * xmlValidNormalizeString:
|
||||
+ * @str: a string
|
||||
+ *
|
||||
+ * Normalize a string in-place.
|
||||
+ */
|
||||
+static void
|
||||
+xmlValidNormalizeString(xmlChar *str) {
|
||||
+ xmlChar *dst;
|
||||
+ const xmlChar *src;
|
||||
+
|
||||
+ if (str == NULL)
|
||||
+ return;
|
||||
+ src = str;
|
||||
+ dst = str;
|
||||
+
|
||||
+ while (*src == 0x20) src++;
|
||||
+ while (*src != 0) {
|
||||
+ if (*src == 0x20) {
|
||||
+ while (*src == 0x20) src++;
|
||||
+ if (*src != 0)
|
||||
+ *dst++ = 0x20;
|
||||
+ } else {
|
||||
+ *dst++ = *src++;
|
||||
+ }
|
||||
+ }
|
||||
+ *dst = 0;
|
||||
+}
|
||||
+
|
||||
#ifdef DEBUG_VALID_ALGO
|
||||
static void
|
||||
xmlValidPrintNode(xmlNodePtr cur) {
|
||||
@@ -2607,6 +2636,24 @@ xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
|
||||
(xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
|
||||
xmlFree((char *)(str));
|
||||
|
||||
+static int
|
||||
+xmlIsStreaming(xmlValidCtxtPtr ctxt) {
|
||||
+ xmlParserCtxtPtr pctxt;
|
||||
+
|
||||
+ if (ctxt == NULL)
|
||||
+ return(0);
|
||||
+ /*
|
||||
+ * These magic values are also abused to detect whether we're validating
|
||||
+ * while parsing a document. In this case, userData points to the parser
|
||||
+ * context.
|
||||
+ */
|
||||
+ if ((ctxt->finishDtd != XML_CTXT_FINISH_DTD_0) &&
|
||||
+ (ctxt->finishDtd != XML_CTXT_FINISH_DTD_1))
|
||||
+ return(0);
|
||||
+ pctxt = ctxt->userData;
|
||||
+ return(pctxt->parseMode == XML_PARSE_READER);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* xmlFreeID:
|
||||
* @not: A id
|
||||
@@ -2650,7 +2697,7 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
|
||||
if (doc == NULL) {
|
||||
return(NULL);
|
||||
}
|
||||
- if (value == NULL) {
|
||||
+ if ((value == NULL) || (value[0] == 0)) {
|
||||
return(NULL);
|
||||
}
|
||||
if (attr == NULL) {
|
||||
@@ -2681,7 +2728,7 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
|
||||
*/
|
||||
ret->value = xmlStrdup(value);
|
||||
ret->doc = doc;
|
||||
- if ((ctxt != NULL) && (ctxt->vstateNr != 0)) {
|
||||
+ if (xmlIsStreaming(ctxt)) {
|
||||
/*
|
||||
* Operating in streaming mode, attr is gonna disappear
|
||||
*/
|
||||
@@ -2820,6 +2867,7 @@ xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
|
||||
ID = xmlNodeListGetString(doc, attr->children, 1);
|
||||
if (ID == NULL)
|
||||
return(-1);
|
||||
+ xmlValidNormalizeString(ID);
|
||||
|
||||
id = xmlHashLookup(table, ID);
|
||||
if (id == NULL || id->attr != attr) {
|
||||
@@ -3009,7 +3057,7 @@ xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
|
||||
* fill the structure.
|
||||
*/
|
||||
ret->value = xmlStrdup(value);
|
||||
- if ((ctxt != NULL) && (ctxt->vstateNr != 0)) {
|
||||
+ if (xmlIsStreaming(ctxt)) {
|
||||
/*
|
||||
* Operating in streaming mode, attr is gonna disappear
|
||||
*/
|
||||
@@ -4028,8 +4076,7 @@ xmlValidateAttributeValue2(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
||||
xmlChar *
|
||||
xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
||||
xmlNodePtr elem, const xmlChar *name, const xmlChar *value) {
|
||||
- xmlChar *ret, *dst;
|
||||
- const xmlChar *src;
|
||||
+ xmlChar *ret;
|
||||
xmlAttributePtr attrDecl = NULL;
|
||||
int extsubset = 0;
|
||||
|
||||
@@ -4070,19 +4117,7 @@ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
||||
ret = xmlStrdup(value);
|
||||
if (ret == NULL)
|
||||
return(NULL);
|
||||
- src = value;
|
||||
- dst = ret;
|
||||
- while (*src == 0x20) src++;
|
||||
- while (*src != 0) {
|
||||
- if (*src == 0x20) {
|
||||
- while (*src == 0x20) src++;
|
||||
- if (*src != 0)
|
||||
- *dst++ = 0x20;
|
||||
- } else {
|
||||
- *dst++ = *src++;
|
||||
- }
|
||||
- }
|
||||
- *dst = 0;
|
||||
+ xmlValidNormalizeString(ret);
|
||||
if ((doc->standalone) && (extsubset == 1) && (!xmlStrEqual(value, ret))) {
|
||||
xmlErrValidNode(ctxt, elem, XML_DTD_NOT_STANDALONE,
|
||||
"standalone: %s on %s value had to be normalized based on external subset declaration\n",
|
||||
@@ -4114,8 +4149,7 @@ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
||||
xmlChar *
|
||||
xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem,
|
||||
const xmlChar *name, const xmlChar *value) {
|
||||
- xmlChar *ret, *dst;
|
||||
- const xmlChar *src;
|
||||
+ xmlChar *ret;
|
||||
xmlAttributePtr attrDecl = NULL;
|
||||
|
||||
if (doc == NULL) return(NULL);
|
||||
@@ -4145,19 +4179,7 @@ xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem,
|
||||
ret = xmlStrdup(value);
|
||||
if (ret == NULL)
|
||||
return(NULL);
|
||||
- src = value;
|
||||
- dst = ret;
|
||||
- while (*src == 0x20) src++;
|
||||
- while (*src != 0) {
|
||||
- if (*src == 0x20) {
|
||||
- while (*src == 0x20) src++;
|
||||
- if (*src != 0)
|
||||
- *dst++ = 0x20;
|
||||
- } else {
|
||||
- *dst++ = *src++;
|
||||
- }
|
||||
- }
|
||||
- *dst = 0;
|
||||
+ xmlValidNormalizeString(ret);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -30,6 +30,8 @@ SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
|
||||
file://CVE-2021-3518-0002.patch \
|
||||
file://CVE-2021-3537.patch \
|
||||
file://CVE-2021-3541.patch \
|
||||
file://CVE-2022-23308.patch \
|
||||
file://CVE-2022-23308-fix-regression.patch \
|
||||
"
|
||||
|
||||
SRC_URI[libtar.md5sum] = "10942a1dc23137a8aa07f0639cbfece5"
|
||||
|
||||
347
meta/recipes-core/zlib/zlib/CVE-2018-25032.patch
Normal file
347
meta/recipes-core/zlib/zlib/CVE-2018-25032.patch
Normal file
@@ -0,0 +1,347 @@
|
||||
CVE: CVE-2018-25032
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
From 5c44459c3b28a9bd3283aaceab7c615f8020c531 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Adler <madler@alumni.caltech.edu>
|
||||
Date: Tue, 17 Apr 2018 22:09:22 -0700
|
||||
Subject: [PATCH] Fix a bug that can crash deflate on some input when using
|
||||
Z_FIXED.
|
||||
|
||||
This bug was reported by Danilo Ramos of Eideticom, Inc. It has
|
||||
lain in wait 13 years before being found! The bug was introduced
|
||||
in zlib 1.2.2.2, with the addition of the Z_FIXED option. That
|
||||
option forces the use of fixed Huffman codes. For rare inputs with
|
||||
a large number of distant matches, the pending buffer into which
|
||||
the compressed data is written can overwrite the distance symbol
|
||||
table which it overlays. That results in corrupted output due to
|
||||
invalid distances, and can result in out-of-bound accesses,
|
||||
crashing the application.
|
||||
|
||||
The fix here combines the distance buffer and literal/length
|
||||
buffers into a single symbol buffer. Now three bytes of pending
|
||||
buffer space are opened up for each literal or length/distance
|
||||
pair consumed, instead of the previous two bytes. This assures
|
||||
that the pending buffer cannot overwrite the symbol table, since
|
||||
the maximum fixed code compressed length/distance is 31 bits, and
|
||||
since there are four bytes of pending space for every three bytes
|
||||
of symbol space.
|
||||
---
|
||||
deflate.c | 74 ++++++++++++++++++++++++++++++++++++++++---------------
|
||||
deflate.h | 25 +++++++++----------
|
||||
trees.c | 50 +++++++++++--------------------------
|
||||
3 files changed, 79 insertions(+), 70 deletions(-)
|
||||
|
||||
diff --git a/deflate.c b/deflate.c
|
||||
index 425babc00..19cba873a 100644
|
||||
--- a/deflate.c
|
||||
+++ b/deflate.c
|
||||
@@ -255,11 +255,6 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
||||
int wrap = 1;
|
||||
static const char my_version[] = ZLIB_VERSION;
|
||||
|
||||
- ushf *overlay;
|
||||
- /* We overlay pending_buf and d_buf+l_buf. This works since the average
|
||||
- * output size for (length,distance) codes is <= 24 bits.
|
||||
- */
|
||||
-
|
||||
if (version == Z_NULL || version[0] != my_version[0] ||
|
||||
stream_size != sizeof(z_stream)) {
|
||||
return Z_VERSION_ERROR;
|
||||
@@ -329,9 +324,47 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
||||
|
||||
s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
|
||||
|
||||
- overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
|
||||
- s->pending_buf = (uchf *) overlay;
|
||||
- s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
|
||||
+ /* We overlay pending_buf and sym_buf. This works since the average size
|
||||
+ * for length/distance pairs over any compressed block is assured to be 31
|
||||
+ * bits or less.
|
||||
+ *
|
||||
+ * Analysis: The longest fixed codes are a length code of 8 bits plus 5
|
||||
+ * extra bits, for lengths 131 to 257. The longest fixed distance codes are
|
||||
+ * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest
|
||||
+ * possible fixed-codes length/distance pair is then 31 bits total.
|
||||
+ *
|
||||
+ * sym_buf starts one-fourth of the way into pending_buf. So there are
|
||||
+ * three bytes in sym_buf for every four bytes in pending_buf. Each symbol
|
||||
+ * in sym_buf is three bytes -- two for the distance and one for the
|
||||
+ * literal/length. As each symbol is consumed, the pointer to the next
|
||||
+ * sym_buf value to read moves forward three bytes. From that symbol, up to
|
||||
+ * 31 bits are written to pending_buf. The closest the written pending_buf
|
||||
+ * bits gets to the next sym_buf symbol to read is just before the last
|
||||
+ * code is written. At that time, 31*(n-2) bits have been written, just
|
||||
+ * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at
|
||||
+ * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1
|
||||
+ * symbols are written.) The closest the writing gets to what is unread is
|
||||
+ * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and
|
||||
+ * can range from 128 to 32768.
|
||||
+ *
|
||||
+ * Therefore, at a minimum, there are 142 bits of space between what is
|
||||
+ * written and what is read in the overlain buffers, so the symbols cannot
|
||||
+ * be overwritten by the compressed data. That space is actually 139 bits,
|
||||
+ * due to the three-bit fixed-code block header.
|
||||
+ *
|
||||
+ * That covers the case where either Z_FIXED is specified, forcing fixed
|
||||
+ * codes, or when the use of fixed codes is chosen, because that choice
|
||||
+ * results in a smaller compressed block than dynamic codes. That latter
|
||||
+ * condition then assures that the above analysis also covers all dynamic
|
||||
+ * blocks. A dynamic-code block will only be chosen to be emitted if it has
|
||||
+ * fewer bits than a fixed-code block would for the same set of symbols.
|
||||
+ * Therefore its average symbol length is assured to be less than 31. So
|
||||
+ * the compressed data for a dynamic block also cannot overwrite the
|
||||
+ * symbols from which it is being constructed.
|
||||
+ */
|
||||
+
|
||||
+ s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4);
|
||||
+ s->pending_buf_size = (ulg)s->lit_bufsize * 4;
|
||||
|
||||
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
|
||||
s->pending_buf == Z_NULL) {
|
||||
@@ -340,8 +373,12 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
||||
deflateEnd (strm);
|
||||
return Z_MEM_ERROR;
|
||||
}
|
||||
- s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
|
||||
- s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
|
||||
+ s->sym_buf = s->pending_buf + s->lit_bufsize;
|
||||
+ s->sym_end = (s->lit_bufsize - 1) * 3;
|
||||
+ /* We avoid equality with lit_bufsize*3 because of wraparound at 64K
|
||||
+ * on 16 bit machines and because stored blocks are restricted to
|
||||
+ * 64K-1 bytes.
|
||||
+ */
|
||||
|
||||
s->level = level;
|
||||
s->strategy = strategy;
|
||||
@@ -552,7 +589,7 @@ int ZEXPORT deflatePrime (strm, bits, value)
|
||||
|
||||
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
s = strm->state;
|
||||
- if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
|
||||
+ if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
||||
return Z_BUF_ERROR;
|
||||
do {
|
||||
put = Buf_size - s->bi_valid;
|
||||
@@ -1113,7 +1150,6 @@ int ZEXPORT deflateCopy (dest, source)
|
||||
#else
|
||||
deflate_state *ds;
|
||||
deflate_state *ss;
|
||||
- ushf *overlay;
|
||||
|
||||
|
||||
if (deflateStateCheck(source) || dest == Z_NULL) {
|
||||
@@ -1133,8 +1169,7 @@ int ZEXPORT deflateCopy (dest, source)
|
||||
ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
|
||||
ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
|
||||
ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
|
||||
- overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
|
||||
- ds->pending_buf = (uchf *) overlay;
|
||||
+ ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, 4);
|
||||
|
||||
if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
|
||||
ds->pending_buf == Z_NULL) {
|
||||
@@ -1148,8 +1183,7 @@ int ZEXPORT deflateCopy (dest, source)
|
||||
zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
|
||||
|
||||
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
|
||||
- ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
|
||||
- ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
|
||||
+ ds->sym_buf = ds->pending_buf + ds->lit_bufsize;
|
||||
|
||||
ds->l_desc.dyn_tree = ds->dyn_ltree;
|
||||
ds->d_desc.dyn_tree = ds->dyn_dtree;
|
||||
@@ -1925,7 +1959,7 @@ local block_state deflate_fast(s, flush)
|
||||
FLUSH_BLOCK(s, 1);
|
||||
return finish_done;
|
||||
}
|
||||
- if (s->last_lit)
|
||||
+ if (s->sym_next)
|
||||
FLUSH_BLOCK(s, 0);
|
||||
return block_done;
|
||||
}
|
||||
@@ -2056,7 +2090,7 @@ local block_state deflate_slow(s, flush)
|
||||
FLUSH_BLOCK(s, 1);
|
||||
return finish_done;
|
||||
}
|
||||
- if (s->last_lit)
|
||||
+ if (s->sym_next)
|
||||
FLUSH_BLOCK(s, 0);
|
||||
return block_done;
|
||||
}
|
||||
@@ -2131,7 +2165,7 @@ local block_state deflate_rle(s, flush)
|
||||
FLUSH_BLOCK(s, 1);
|
||||
return finish_done;
|
||||
}
|
||||
- if (s->last_lit)
|
||||
+ if (s->sym_next)
|
||||
FLUSH_BLOCK(s, 0);
|
||||
return block_done;
|
||||
}
|
||||
@@ -2170,7 +2204,7 @@ local block_state deflate_huff(s, flush)
|
||||
FLUSH_BLOCK(s, 1);
|
||||
return finish_done;
|
||||
}
|
||||
- if (s->last_lit)
|
||||
+ if (s->sym_next)
|
||||
FLUSH_BLOCK(s, 0);
|
||||
return block_done;
|
||||
}
|
||||
diff --git a/deflate.h b/deflate.h
|
||||
index 23ecdd312..d4cf1a98b 100644
|
||||
--- a/deflate.h
|
||||
+++ b/deflate.h
|
||||
@@ -217,7 +217,7 @@ typedef struct internal_state {
|
||||
/* Depth of each subtree used as tie breaker for trees of equal frequency
|
||||
*/
|
||||
|
||||
- uchf *l_buf; /* buffer for literals or lengths */
|
||||
+ uchf *sym_buf; /* buffer for distances and literals/lengths */
|
||||
|
||||
uInt lit_bufsize;
|
||||
/* Size of match buffer for literals/lengths. There are 4 reasons for
|
||||
@@ -239,13 +239,8 @@ typedef struct internal_state {
|
||||
* - I can't count above 4
|
||||
*/
|
||||
|
||||
- uInt last_lit; /* running index in l_buf */
|
||||
-
|
||||
- ushf *d_buf;
|
||||
- /* Buffer for distances. To simplify the code, d_buf and l_buf have
|
||||
- * the same number of elements. To use different lengths, an extra flag
|
||||
- * array would be necessary.
|
||||
- */
|
||||
+ uInt sym_next; /* running index in sym_buf */
|
||||
+ uInt sym_end; /* symbol table full when sym_next reaches this */
|
||||
|
||||
ulg opt_len; /* bit length of current block with optimal trees */
|
||||
ulg static_len; /* bit length of current block with static trees */
|
||||
@@ -325,20 +320,22 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
|
||||
|
||||
# define _tr_tally_lit(s, c, flush) \
|
||||
{ uch cc = (c); \
|
||||
- s->d_buf[s->last_lit] = 0; \
|
||||
- s->l_buf[s->last_lit++] = cc; \
|
||||
+ s->sym_buf[s->sym_next++] = 0; \
|
||||
+ s->sym_buf[s->sym_next++] = 0; \
|
||||
+ s->sym_buf[s->sym_next++] = cc; \
|
||||
s->dyn_ltree[cc].Freq++; \
|
||||
- flush = (s->last_lit == s->lit_bufsize-1); \
|
||||
+ flush = (s->sym_next == s->sym_end); \
|
||||
}
|
||||
# define _tr_tally_dist(s, distance, length, flush) \
|
||||
{ uch len = (uch)(length); \
|
||||
ush dist = (ush)(distance); \
|
||||
- s->d_buf[s->last_lit] = dist; \
|
||||
- s->l_buf[s->last_lit++] = len; \
|
||||
+ s->sym_buf[s->sym_next++] = dist; \
|
||||
+ s->sym_buf[s->sym_next++] = dist >> 8; \
|
||||
+ s->sym_buf[s->sym_next++] = len; \
|
||||
dist--; \
|
||||
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
|
||||
s->dyn_dtree[d_code(dist)].Freq++; \
|
||||
- flush = (s->last_lit == s->lit_bufsize-1); \
|
||||
+ flush = (s->sym_next == s->sym_end); \
|
||||
}
|
||||
#else
|
||||
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
|
||||
diff --git a/trees.c b/trees.c
|
||||
index 4f4a65011..decaeb7c3 100644
|
||||
--- a/trees.c
|
||||
+++ b/trees.c
|
||||
@@ -416,7 +416,7 @@ local void init_block(s)
|
||||
|
||||
s->dyn_ltree[END_BLOCK].Freq = 1;
|
||||
s->opt_len = s->static_len = 0L;
|
||||
- s->last_lit = s->matches = 0;
|
||||
+ s->sym_next = s->matches = 0;
|
||||
}
|
||||
|
||||
#define SMALLEST 1
|
||||
@@ -948,7 +948,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
|
||||
|
||||
Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
|
||||
opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
|
||||
- s->last_lit));
|
||||
+ s->sym_next / 3));
|
||||
|
||||
if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
|
||||
|
||||
@@ -1017,8 +1017,9 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
|
||||
unsigned dist; /* distance of matched string */
|
||||
unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
|
||||
{
|
||||
- s->d_buf[s->last_lit] = (ush)dist;
|
||||
- s->l_buf[s->last_lit++] = (uch)lc;
|
||||
+ s->sym_buf[s->sym_next++] = dist;
|
||||
+ s->sym_buf[s->sym_next++] = dist >> 8;
|
||||
+ s->sym_buf[s->sym_next++] = lc;
|
||||
if (dist == 0) {
|
||||
/* lc is the unmatched char */
|
||||
s->dyn_ltree[lc].Freq++;
|
||||
@@ -1033,30 +1034,7 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
|
||||
s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
|
||||
s->dyn_dtree[d_code(dist)].Freq++;
|
||||
}
|
||||
-
|
||||
-#ifdef TRUNCATE_BLOCK
|
||||
- /* Try to guess if it is profitable to stop the current block here */
|
||||
- if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
|
||||
- /* Compute an upper bound for the compressed length */
|
||||
- ulg out_length = (ulg)s->last_lit*8L;
|
||||
- ulg in_length = (ulg)((long)s->strstart - s->block_start);
|
||||
- int dcode;
|
||||
- for (dcode = 0; dcode < D_CODES; dcode++) {
|
||||
- out_length += (ulg)s->dyn_dtree[dcode].Freq *
|
||||
- (5L+extra_dbits[dcode]);
|
||||
- }
|
||||
- out_length >>= 3;
|
||||
- Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
|
||||
- s->last_lit, in_length, out_length,
|
||||
- 100L - out_length*100L/in_length));
|
||||
- if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
|
||||
- }
|
||||
-#endif
|
||||
- return (s->last_lit == s->lit_bufsize-1);
|
||||
- /* We avoid equality with lit_bufsize because of wraparound at 64K
|
||||
- * on 16 bit machines and because stored blocks are restricted to
|
||||
- * 64K-1 bytes.
|
||||
- */
|
||||
+ return (s->sym_next == s->sym_end);
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
@@ -1069,13 +1047,14 @@ local void compress_block(s, ltree, dtree)
|
||||
{
|
||||
unsigned dist; /* distance of matched string */
|
||||
int lc; /* match length or unmatched char (if dist == 0) */
|
||||
- unsigned lx = 0; /* running index in l_buf */
|
||||
+ unsigned sx = 0; /* running index in sym_buf */
|
||||
unsigned code; /* the code to send */
|
||||
int extra; /* number of extra bits to send */
|
||||
|
||||
- if (s->last_lit != 0) do {
|
||||
- dist = s->d_buf[lx];
|
||||
- lc = s->l_buf[lx++];
|
||||
+ if (s->sym_next != 0) do {
|
||||
+ dist = s->sym_buf[sx++] & 0xff;
|
||||
+ dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
|
||||
+ lc = s->sym_buf[sx++];
|
||||
if (dist == 0) {
|
||||
send_code(s, lc, ltree); /* send a literal byte */
|
||||
Tracecv(isgraph(lc), (stderr," '%c' ", lc));
|
||||
@@ -1100,11 +1079,10 @@ local void compress_block(s, ltree, dtree)
|
||||
}
|
||||
} /* literal or match pair ? */
|
||||
|
||||
- /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
|
||||
- Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
|
||||
- "pendingBuf overflow");
|
||||
+ /* Check that the overlay between pending_buf and sym_buf is ok: */
|
||||
+ Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
|
||||
|
||||
- } while (lx < s->last_lit);
|
||||
+ } while (sx < s->sym_next);
|
||||
|
||||
send_code(s, END_BLOCK, ltree);
|
||||
}
|
||||
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://zlib.h;beginline=6;endline=23;md5=5377232268e952e9ef6
|
||||
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
|
||||
file://ldflags-tests.patch \
|
||||
file://CVE-2018-25032.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
UPSTREAM_CHECK_URI = "http://zlib.net/"
|
||||
|
||||
@@ -7,14 +7,14 @@ HOMEPAGE = "http://ccache.samba.org"
|
||||
SECTION = "devel"
|
||||
|
||||
LICENSE = "GPLv3+"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=28afb89f649f309e7ac1aab554564637"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=698a26b57e513d678e1e7727bf56395b"
|
||||
|
||||
DEPENDS = "zstd"
|
||||
|
||||
SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
|
||||
SRC_URI += "file://0001-CMake-make-build-of-documentation-optional-842.patch"
|
||||
|
||||
SRC_URI[sha256sum] = "dbf139ff32031b54cb47f2d7983269f328df14b5a427882f89f7721e5c411b7e"
|
||||
SRC_URI[sha256sum] = "320d2b17d2f76393e5d4bb28c8dee5ca783248e9cd23dff0654694d60f8a4b62"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
|
||||
|
||||
@@ -19,7 +19,8 @@ LIC_FILES_CHKSUM = "file://NOTICE;md5=d50be0580c0b0a7fbc7a4830bbe6c12b \
|
||||
SECTION = "base"
|
||||
DEPENDS = "util-linux attr autoconf-archive"
|
||||
|
||||
SRC_URI = "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git;branch=master"
|
||||
SRC_URI = "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git;branch=master \
|
||||
file://0001-e2fsck-fix-last-mount-write-time-when-e2fsck-is-forc.patch"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools gettext texinfo pkgconfig multilib_header update-alternatives ptest
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
From 2c69c94217b6db083d601d4fd62d6ab6c1628fee Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Czerner <lczerner@redhat.com>
|
||||
Date: Mon, 14 Jun 2021 15:27:25 +0200
|
||||
Subject: [PATCH] e2fsck: fix last mount/write time when e2fsck is forced
|
||||
|
||||
With commit c52d930f e2fsck is no longer able to fix bad last
|
||||
mount/write time by default because it is conditioned on s_checkinterval
|
||||
not being zero, which it is by default.
|
||||
|
||||
One place where it matters is when other e2fsprogs tools require to run
|
||||
full file system check before a certain operation. If the last mount
|
||||
time is for any reason in future, it will not allow it to run even if
|
||||
full e2fsck is ran.
|
||||
|
||||
Fix it by checking the last mount/write time when the e2fsck is forced,
|
||||
except for the case where we know the system clock is broken.
|
||||
|
||||
[ Reworked the conditionals so error messages claiming that the last
|
||||
write/mount time were corrupted wouldn't be always printed when the
|
||||
e2fsck was run with the -f option, thus causing 299 out of 372
|
||||
regression tests to fail. -- TYT ]
|
||||
|
||||
Fixes: c52d930f ("e2fsck: don't check for future superblock times if checkinterval == 0")
|
||||
Reported-by: Dusty Mabe <dustymabe@redhat.com>
|
||||
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/tytso/e2fsprogs/commit/2c69c94217b6db083d601d4fd62d6ab6c1628fee]
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
---
|
||||
e2fsck/super.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/e2fsck/super.c b/e2fsck/super.c
|
||||
index e1c3f935..31e2ffb2 100644
|
||||
--- a/e2fsck/super.c
|
||||
+++ b/e2fsck/super.c
|
||||
@@ -1038,9 +1038,9 @@ void check_super_block(e2fsck_t ctx)
|
||||
* Check to see if the superblock last mount time or last
|
||||
* write time is in the future.
|
||||
*/
|
||||
- if (!broken_system_clock && fs->super->s_checkinterval &&
|
||||
- !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
|
||||
- fs->super->s_mtime > (__u32) ctx->now) {
|
||||
+ if (((ctx->options & E2F_OPT_FORCE) || fs->super->s_checkinterval) &&
|
||||
+ !broken_system_clock && !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
|
||||
+ (fs->super->s_mtime > (__u32) ctx->now)) {
|
||||
pctx.num = fs->super->s_mtime;
|
||||
problem = PR_0_FUTURE_SB_LAST_MOUNT;
|
||||
if (fs->super->s_mtime <= (__u32) ctx->now + ctx->time_fudge)
|
||||
@@ -1050,9 +1050,9 @@ void check_super_block(e2fsck_t ctx)
|
||||
fs->flags |= EXT2_FLAG_DIRTY;
|
||||
}
|
||||
}
|
||||
- if (!broken_system_clock && fs->super->s_checkinterval &&
|
||||
- !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
|
||||
- fs->super->s_wtime > (__u32) ctx->now) {
|
||||
+ if (((ctx->options & E2F_OPT_FORCE) || fs->super->s_checkinterval) &&
|
||||
+ !broken_system_clock && !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
|
||||
+ (fs->super->s_wtime > (__u32) ctx->now)) {
|
||||
pctx.num = fs->super->s_wtime;
|
||||
problem = PR_0_FUTURE_SB_LAST_WRITE;
|
||||
if (fs->super->s_wtime <= (__u32) ctx->now + ctx->time_fudge)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -12,7 +12,7 @@ INHIBIT_DEFAULT_DEPS = "1"
|
||||
SRCREV = "6faca61810d335c7837f320733fe8e15a1431fc2"
|
||||
PV = "20210125+git${SRCPV}"
|
||||
|
||||
SRC_URI = "git://git.savannah.gnu.org/config.git;branch=master \
|
||||
SRC_URI = "git://git.savannah.gnu.org/git/config.git;protocol=https;branch=master \
|
||||
file://gnu-configize.in"
|
||||
S = "${WORKDIR}/git"
|
||||
UPSTREAM_CHECK_COMMITS = "1"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require go-common.inc
|
||||
|
||||
GO_BASEVERSION = "1.16"
|
||||
PV = "1.16.13"
|
||||
PV = "1.16.15"
|
||||
FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
|
||||
@@ -18,7 +18,7 @@ SRC_URI += "\
|
||||
file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \
|
||||
file://0001-encoding-xml-handle-leading-trailing-or-double-colon.patch \
|
||||
"
|
||||
SRC_URI[main.sha256sum] = "b0926654eaeb01ef43816638f42d7b1681f2d3f41b9559f07735522b7afad41a"
|
||||
SRC_URI[main.sha256sum] = "90a08c689279e35f3865ba510998c33a63255c36089b3ec206c912fc0568c3d3"
|
||||
|
||||
# Upstream don't believe it is a signifiant real world issue and will only
|
||||
# fix in 1.17 onwards where we can drop this.
|
||||
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
|
||||
PROVIDES = "go-native"
|
||||
|
||||
SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
|
||||
SRC_URI[go_linux_amd64.sha256sum] = "275fc03c90c13b0bbff13125a43f1f7a9f9c00a0d5a9f2d5b16dbc2fa2c6e12a"
|
||||
SRC_URI[go_linux_arm64.sha256sum] = "3dd8e14837105cbfedf7124c7f8c524ce492748c370036c7316ef99e18d116d7"
|
||||
SRC_URI[go_linux_amd64.sha256sum] = "77c782a633186d78c384f972fb113a43c24be0234c42fef22c2d8c4c4c8e7475"
|
||||
SRC_URI[go_linux_arm64.sha256sum] = "c2f27f0ce5620a9bc2ff3446165d1974ef94e9b885ec12dbfa3c07e0e198b7ce"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://golang.org/dl/"
|
||||
UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
|
||||
@@ -0,0 +1,64 @@
|
||||
From 86d81322c5c0ab67f89d64f56f6e77d4fe185910 Mon Sep 17 00:00:00 2001
|
||||
From: Warren Weckesser <warren.weckesser@gmail.com>
|
||||
Date: Tue, 29 Mar 2022 15:58:00 +0800
|
||||
Subject: [PATCH] BUG: f2py: Simplify creation of an exception message. Closes
|
||||
gh-19000.
|
||||
|
||||
CVE: CVE-2021-41496
|
||||
|
||||
Upstream-Status: Backport [https://github.com/numpy/numpy/commit/271010f1037150e95017f803f4214b8861e528f2]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
numpy/f2py/src/fortranobject.c | 26 ++++++++++++--------------
|
||||
1 file changed, 12 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c
|
||||
index 3275f90..85c9c7f 100644
|
||||
--- a/numpy/f2py/src/fortranobject.c
|
||||
+++ b/numpy/f2py/src/fortranobject.c
|
||||
@@ -637,14 +637,14 @@ static int check_and_fix_dimensions(const PyArrayObject* arr,
|
||||
npy_intp *dims);
|
||||
|
||||
static int
|
||||
-count_negative_dimensions(const int rank,
|
||||
+find_first_negative_dimension(const int rank,
|
||||
const npy_intp *dims) {
|
||||
- int i=0,r=0;
|
||||
- while (i<rank) {
|
||||
- if (dims[i] < 0) ++r;
|
||||
- ++i;
|
||||
+ for (int i = 0; i < rank; ++i) {
|
||||
+ if (dims[i] < 0) {
|
||||
+ return i;
|
||||
+ }
|
||||
}
|
||||
- return r;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_COPY_ND_ARRAY
|
||||
@@ -721,14 +721,12 @@ PyArrayObject* array_from_pyobj(const int type_num,
|
||||
|| ((intent & F2PY_OPTIONAL) && (obj==Py_None))
|
||||
) {
|
||||
/* intent(cache), optional, intent(hide) */
|
||||
- if (count_negative_dimensions(rank,dims) > 0) {
|
||||
- int i;
|
||||
- strcpy(mess, "failed to create intent(cache|hide)|optional array"
|
||||
- "-- must have defined dimensions but got (");
|
||||
- for(i=0;i<rank;++i)
|
||||
- sprintf(mess+strlen(mess),"%" NPY_INTP_FMT ",",dims[i]);
|
||||
- strcat(mess, ")");
|
||||
- PyErr_SetString(PyExc_ValueError,mess);
|
||||
+ int i = find_first_negative_dimension(rank, dims);
|
||||
+ if (i >= 0) {
|
||||
+ PyErr_Format(PyExc_ValueError,
|
||||
+ "failed to create intent(cache|hide)|optional array"
|
||||
+ " -- must have defined dimensions, but dims[%d] = %"
|
||||
+ NPY_INTP_FMT, i, dims[i]);
|
||||
return NULL;
|
||||
}
|
||||
arr = (PyArrayObject *)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -10,6 +10,7 @@ SRCNAME = "numpy"
|
||||
SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
|
||||
file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
|
||||
file://0001-numpy-core-Define-RISCV-32-support.patch \
|
||||
file://CVE-2021-41496.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
SRC_URI[sha256sum] = "9bf51d69ebb4ca9239e55bedc2185fe2c0ec222da0adee7ece4125414676846d"
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
From b1c73f239fe9af97de837331849f55d67c27561e Mon Sep 17 00:00:00 2001
|
||||
From: aycabta <aycabta@gmail.com>
|
||||
Date: Sun, 2 May 2021 20:52:23 +0900
|
||||
Subject: [PATCH] [ruby/rdoc] Use File.open to fix the OS Command Injection
|
||||
vulnerability in CVE-2021-31799
|
||||
|
||||
https://github.com/ruby/rdoc/commit/a7f5d6ab88
|
||||
|
||||
CVE: CVE-2021-31799
|
||||
|
||||
Upstream-Status: Backport[https://github.com/ruby/ruby/commit/b1c73f239fe9af97de837331849f55d67c27561e]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
lib/rdoc/rdoc.rb | 2 +-
|
||||
test/rdoc/test_rdoc_rdoc.rb | 12 ++++++++++++
|
||||
2 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
|
||||
index 680a8612f7..904625f105 100644
|
||||
--- a/lib/rdoc/rdoc.rb
|
||||
+++ b/lib/rdoc/rdoc.rb
|
||||
@@ -444,7 +444,7 @@ def remove_unparseable files
|
||||
files.reject do |file, *|
|
||||
file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or
|
||||
(file =~ /tags$/i and
|
||||
- open(file, 'rb') { |io|
|
||||
+ File.open(file, 'rb') { |io|
|
||||
io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/
|
||||
})
|
||||
end
|
||||
diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb
|
||||
index 3910dd4656..a83d5a1b88 100644
|
||||
--- a/test/rdoc/test_rdoc_rdoc.rb
|
||||
+++ b/test/rdoc/test_rdoc_rdoc.rb
|
||||
@@ -456,6 +456,18 @@ def test_remove_unparseable_tags_vim
|
||||
end
|
||||
end
|
||||
|
||||
+ def test_remove_unparseable_CVE_2021_31799
|
||||
+ temp_dir do
|
||||
+ file_list = ['| touch evil.txt && echo tags']
|
||||
+ file_list.each do |f|
|
||||
+ FileUtils.touch f
|
||||
+ end
|
||||
+
|
||||
+ assert_equal file_list, @rdoc.remove_unparseable(file_list)
|
||||
+ assert_equal file_list, Dir.children('.')
|
||||
+ end
|
||||
+ end
|
||||
+
|
||||
def test_setup_output_dir
|
||||
Dir.mktmpdir {|d|
|
||||
path = File.join d, 'testdir'
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
From 8cebc092cd18f4cfb669f66018ea8ffc6f408584 Mon Sep 17 00:00:00 2001
|
||||
From: Yusuke Endoh <mame@ruby-lang.org>
|
||||
Date: Wed, 7 Jul 2021 11:57:15 +0900
|
||||
Subject: [PATCH] Ignore IP addresses in PASV responses by default, and add new
|
||||
option use_pasv_ip
|
||||
|
||||
This fixes CVE-2021-31810.
|
||||
Reported by Alexandr Savca.
|
||||
|
||||
Co-authored-by: Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
CVE: CVE-2021-31810
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/ruby/ruby/commit/bf4d05173c7cf04d8892e4b64508ecf7902717cd]
|
||||
|
||||
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
||||
---
|
||||
lib/net/ftp.rb | 15 +++-
|
||||
test/net/ftp/test_ftp.rb | 159 ++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 170 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
|
||||
index 88e8655..d6f5cc3 100644
|
||||
--- a/lib/net/ftp.rb
|
||||
+++ b/lib/net/ftp.rb
|
||||
@@ -98,6 +98,10 @@ module Net
|
||||
# When +true+, the connection is in passive mode. Default: +true+.
|
||||
attr_accessor :passive
|
||||
|
||||
+ # When +true+, use the IP address in PASV responses. Otherwise, it uses
|
||||
+ # the same IP address for the control connection. Default: +false+.
|
||||
+ attr_accessor :use_pasv_ip
|
||||
+
|
||||
# When +true+, all traffic to and from the server is written
|
||||
# to +$stdout+. Default: +false+.
|
||||
attr_accessor :debug_mode
|
||||
@@ -206,6 +210,9 @@ module Net
|
||||
# handshake.
|
||||
# See Net::FTP#ssl_handshake_timeout for
|
||||
# details. Default: +nil+.
|
||||
+ # use_pasv_ip:: When +true+, use the IP address in PASV responses.
|
||||
+ # Otherwise, it uses the same IP address for the control
|
||||
+ # connection. Default: +false+.
|
||||
# debug_mode:: When +true+, all traffic to and from the server is
|
||||
# written to +$stdout+. Default: +false+.
|
||||
#
|
||||
@@ -266,6 +273,7 @@ module Net
|
||||
@open_timeout = options[:open_timeout]
|
||||
@ssl_handshake_timeout = options[:ssl_handshake_timeout]
|
||||
@read_timeout = options[:read_timeout] || 60
|
||||
+ @use_pasv_ip = options[:use_pasv_ip] || false
|
||||
if host
|
||||
connect(host, options[:port] || FTP_PORT)
|
||||
if options[:username]
|
||||
@@ -1371,7 +1379,12 @@ module Net
|
||||
raise FTPReplyError, resp
|
||||
end
|
||||
if m = /\((?<host>\d+(?:,\d+){3}),(?<port>\d+,\d+)\)/.match(resp)
|
||||
- return parse_pasv_ipv4_host(m["host"]), parse_pasv_port(m["port"])
|
||||
+ if @use_pasv_ip
|
||||
+ host = parse_pasv_ipv4_host(m["host"])
|
||||
+ else
|
||||
+ host = @bare_sock.remote_address.ip_address
|
||||
+ end
|
||||
+ return host, parse_pasv_port(m["port"])
|
||||
else
|
||||
raise FTPProtoError, resp
|
||||
end
|
||||
diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb
|
||||
index 023e794..243d4ad 100644
|
||||
--- a/test/net/ftp/test_ftp.rb
|
||||
+++ b/test/net/ftp/test_ftp.rb
|
||||
@@ -61,7 +61,7 @@ class FTPTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_parse227
|
||||
- ftp = Net::FTP.new
|
||||
+ ftp = Net::FTP.new(nil, use_pasv_ip: true)
|
||||
host, port = ftp.send(:parse227, "227 Entering Passive Mode (192,168,0,1,12,34)")
|
||||
assert_equal("192.168.0.1", host)
|
||||
assert_equal(3106, port)
|
||||
@@ -80,6 +80,14 @@ class FTPTest < Test::Unit::TestCase
|
||||
assert_raise(Net::FTPProtoError) do
|
||||
ftp.send(:parse227, "227 ) foo bar (")
|
||||
end
|
||||
+
|
||||
+ ftp = Net::FTP.new
|
||||
+ sock = OpenStruct.new
|
||||
+ sock.remote_address = OpenStruct.new
|
||||
+ sock.remote_address.ip_address = "10.0.0.1"
|
||||
+ ftp.instance_variable_set(:@bare_sock, sock)
|
||||
+ host, port = ftp.send(:parse227, "227 Entering Passive Mode (192,168,0,1,12,34)")
|
||||
+ assert_equal("10.0.0.1", host)
|
||||
end
|
||||
|
||||
def test_parse228
|
||||
@@ -2474,10 +2482,155 @@ EOF
|
||||
end
|
||||
end
|
||||
|
||||
+ def test_ignore_pasv_ip
|
||||
+ commands = []
|
||||
+ binary_data = (0..0xff).map {|i| i.chr}.join * 4 * 3
|
||||
+ server = create_ftp_server(nil, "127.0.0.1") { |sock|
|
||||
+ sock.print("220 (test_ftp).\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("331 Please specify the password.\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("230 Login successful.\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("200 Switching to Binary mode.\r\n")
|
||||
+ line = sock.gets
|
||||
+ commands.push(line)
|
||||
+ data_server = TCPServer.new("127.0.0.1", 0)
|
||||
+ port = data_server.local_address.ip_port
|
||||
+ sock.printf("227 Entering Passive Mode (999,0,0,1,%s).\r\n",
|
||||
+ port.divmod(256).join(","))
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("150 Opening BINARY mode data connection for foo (#{binary_data.size} bytes)\r\n")
|
||||
+ conn = data_server.accept
|
||||
+ binary_data.scan(/.{1,1024}/nm) do |s|
|
||||
+ conn.print(s)
|
||||
+ end
|
||||
+ conn.shutdown(Socket::SHUT_WR)
|
||||
+ conn.read
|
||||
+ conn.close
|
||||
+ data_server.close
|
||||
+ sock.print("226 Transfer complete.\r\n")
|
||||
+ }
|
||||
+ begin
|
||||
+ begin
|
||||
+ ftp = Net::FTP.new
|
||||
+ ftp.passive = true
|
||||
+ ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
|
||||
+ ftp.connect("127.0.0.1", server.port)
|
||||
+ ftp.login
|
||||
+ assert_match(/\AUSER /, commands.shift)
|
||||
+ assert_match(/\APASS /, commands.shift)
|
||||
+ assert_equal("TYPE I\r\n", commands.shift)
|
||||
+ buf = ftp.getbinaryfile("foo", nil)
|
||||
+ assert_equal(binary_data, buf)
|
||||
+ assert_equal(Encoding::ASCII_8BIT, buf.encoding)
|
||||
+ assert_equal("PASV\r\n", commands.shift)
|
||||
+ assert_equal("RETR foo\r\n", commands.shift)
|
||||
+ assert_equal(nil, commands.shift)
|
||||
+ ensure
|
||||
+ ftp.close if ftp
|
||||
+ end
|
||||
+ ensure
|
||||
+ server.close
|
||||
+ end
|
||||
+ end
|
||||
+
|
||||
+ def test_use_pasv_ip
|
||||
+ commands = []
|
||||
+ binary_data = (0..0xff).map {|i| i.chr}.join * 4 * 3
|
||||
+ server = create_ftp_server(nil, "127.0.0.1") { |sock|
|
||||
+ sock.print("220 (test_ftp).\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("331 Please specify the password.\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("230 Login successful.\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("200 Switching to Binary mode.\r\n")
|
||||
+ line = sock.gets
|
||||
+ commands.push(line)
|
||||
+ data_server = TCPServer.new("127.0.0.1", 0)
|
||||
+ port = data_server.local_address.ip_port
|
||||
+ sock.printf("227 Entering Passive Mode (127,0,0,1,%s).\r\n",
|
||||
+ port.divmod(256).join(","))
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("150 Opening BINARY mode data connection for foo (#{binary_data.size} bytes)\r\n")
|
||||
+ conn = data_server.accept
|
||||
+ binary_data.scan(/.{1,1024}/nm) do |s|
|
||||
+ conn.print(s)
|
||||
+ end
|
||||
+ conn.shutdown(Socket::SHUT_WR)
|
||||
+ conn.read
|
||||
+ conn.close
|
||||
+ data_server.close
|
||||
+ sock.print("226 Transfer complete.\r\n")
|
||||
+ }
|
||||
+ begin
|
||||
+ begin
|
||||
+ ftp = Net::FTP.new
|
||||
+ ftp.passive = true
|
||||
+ ftp.use_pasv_ip = true
|
||||
+ ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
|
||||
+ ftp.connect("127.0.0.1", server.port)
|
||||
+ ftp.login
|
||||
+ assert_match(/\AUSER /, commands.shift)
|
||||
+ assert_match(/\APASS /, commands.shift)
|
||||
+ assert_equal("TYPE I\r\n", commands.shift)
|
||||
+ buf = ftp.getbinaryfile("foo", nil)
|
||||
+ assert_equal(binary_data, buf)
|
||||
+ assert_equal(Encoding::ASCII_8BIT, buf.encoding)
|
||||
+ assert_equal("PASV\r\n", commands.shift)
|
||||
+ assert_equal("RETR foo\r\n", commands.shift)
|
||||
+ assert_equal(nil, commands.shift)
|
||||
+ ensure
|
||||
+ ftp.close if ftp
|
||||
+ end
|
||||
+ ensure
|
||||
+ server.close
|
||||
+ end
|
||||
+ end
|
||||
+
|
||||
+ def test_use_pasv_invalid_ip
|
||||
+ commands = []
|
||||
+ binary_data = (0..0xff).map {|i| i.chr}.join * 4 * 3
|
||||
+ server = create_ftp_server(nil, "127.0.0.1") { |sock|
|
||||
+ sock.print("220 (test_ftp).\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("331 Please specify the password.\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("230 Login successful.\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ sock.print("200 Switching to Binary mode.\r\n")
|
||||
+ line = sock.gets
|
||||
+ commands.push(line)
|
||||
+ sock.print("227 Entering Passive Mode (999,0,0,1,48,57).\r\n")
|
||||
+ commands.push(sock.gets)
|
||||
+ }
|
||||
+ begin
|
||||
+ begin
|
||||
+ ftp = Net::FTP.new
|
||||
+ ftp.passive = true
|
||||
+ ftp.use_pasv_ip = true
|
||||
+ ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
|
||||
+ ftp.connect("127.0.0.1", server.port)
|
||||
+ ftp.login
|
||||
+ assert_match(/\AUSER /, commands.shift)
|
||||
+ assert_match(/\APASS /, commands.shift)
|
||||
+ assert_equal("TYPE I\r\n", commands.shift)
|
||||
+ assert_raise(SocketError) do
|
||||
+ ftp.getbinaryfile("foo", nil)
|
||||
+ end
|
||||
+ ensure
|
||||
+ ftp.close if ftp
|
||||
+ end
|
||||
+ ensure
|
||||
+ server.close
|
||||
+ end
|
||||
+ end
|
||||
+
|
||||
private
|
||||
|
||||
- def create_ftp_server(sleep_time = nil)
|
||||
- server = TCPServer.new(SERVER_ADDR, 0)
|
||||
+ def create_ftp_server(sleep_time = nil, addr = SERVER_ADDR)
|
||||
+ server = TCPServer.new(addr, 0)
|
||||
@thread = Thread.start do
|
||||
if sleep_time
|
||||
sleep(sleep_time)
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
From e2ac25d0eb66de99f098d6669cf4f06796aa6256 Mon Sep 17 00:00:00 2001
|
||||
From: Shugo Maeda <shugo@ruby-lang.org>
|
||||
Date: Tue, 11 May 2021 10:31:27 +0900
|
||||
Subject: [PATCH] Fix StartTLS stripping vulnerability
|
||||
|
||||
This fixes CVE-2021-32066.
|
||||
Reported by Alexandr Savca in <https://hackerone.com/reports/1178562>.
|
||||
|
||||
CVE: CVE-2021-32066
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/ruby/ruby/commit/e2ac25d0eb66de99f098d6669cf4f06796aa6256]
|
||||
|
||||
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
||||
---
|
||||
lib/net/imap.rb | 8 +++++++-
|
||||
test/net/imap/test_imap.rb | 31 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 38 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
|
||||
index 505b4c8950..d45304f289 100644
|
||||
--- a/lib/net/imap.rb
|
||||
+++ b/lib/net/imap.rb
|
||||
@@ -1218,12 +1218,14 @@ def get_tagged_response(tag, cmd)
|
||||
end
|
||||
resp = @tagged_responses.delete(tag)
|
||||
case resp.name
|
||||
+ when /\A(?:OK)\z/ni
|
||||
+ return resp
|
||||
when /\A(?:NO)\z/ni
|
||||
raise NoResponseError, resp
|
||||
when /\A(?:BAD)\z/ni
|
||||
raise BadResponseError, resp
|
||||
else
|
||||
- return resp
|
||||
+ raise UnknownResponseError, resp
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3719,6 +3721,10 @@ class BadResponseError < ResponseError
|
||||
class ByeResponseError < ResponseError
|
||||
end
|
||||
|
||||
+ # Error raised upon an unknown response from the server.
|
||||
+ class UnknownResponseError < ResponseError
|
||||
+ end
|
||||
+
|
||||
RESPONSE_ERRORS = Hash.new(ResponseError)
|
||||
RESPONSE_ERRORS["NO"] = NoResponseError
|
||||
RESPONSE_ERRORS["BAD"] = BadResponseError
|
||||
diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb
|
||||
index 8b924b524e..85fb71d440 100644
|
||||
--- a/test/net/imap/test_imap.rb
|
||||
+++ b/test/net/imap/test_imap.rb
|
||||
@@ -127,6 +127,16 @@ def test_starttls
|
||||
imap.disconnect
|
||||
end
|
||||
end
|
||||
+
|
||||
+ def test_starttls_stripping
|
||||
+ starttls_stripping_test do |port|
|
||||
+ imap = Net::IMAP.new("localhost", :port => port)
|
||||
+ assert_raise(Net::IMAP::UnknownResponseError) do
|
||||
+ imap.starttls(:ca_file => CA_FILE)
|
||||
+ end
|
||||
+ imap
|
||||
+ end
|
||||
+ end
|
||||
end
|
||||
|
||||
def start_server
|
||||
@@ -834,6 +844,27 @@ def starttls_test
|
||||
end
|
||||
end
|
||||
|
||||
+ def starttls_stripping_test
|
||||
+ server = create_tcp_server
|
||||
+ port = server.addr[1]
|
||||
+ start_server do
|
||||
+ sock = server.accept
|
||||
+ begin
|
||||
+ sock.print("* OK test server\r\n")
|
||||
+ sock.gets
|
||||
+ sock.print("RUBY0001 BUG unhandled command\r\n")
|
||||
+ ensure
|
||||
+ sock.close
|
||||
+ server.close
|
||||
+ end
|
||||
+ end
|
||||
+ begin
|
||||
+ imap = yield(port)
|
||||
+ ensure
|
||||
+ imap.disconnect if imap && !imap.disconnected?
|
||||
+ end
|
||||
+ end
|
||||
+
|
||||
def create_tcp_server
|
||||
return TCPServer.new(server_addr, 0)
|
||||
end
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -6,16 +6,13 @@ SRC_URI += " \
|
||||
file://remove_has_include_macros.patch \
|
||||
file://run-ptest \
|
||||
file://0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch \
|
||||
file://CVE-2021-31810.patch \
|
||||
file://CVE-2021-32066.patch \
|
||||
file://CVE-2021-31799.patch \
|
||||
file://0003-rdoc-build-reproducible-documentation.patch \
|
||||
file://0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch \
|
||||
file://0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch \
|
||||
file://0006-Make-gemspecs-reproducible.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "369825db2199f6aeef16b408df6a04ebaddb664fb9af0ec8c686b0ce7ab77727"
|
||||
SRC_URI[sha256sum] = "3586861cb2df56970287f0fd83f274bd92058872d830d15570b36def7f1a92ac"
|
||||
|
||||
PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
|
||||
@@ -81,8 +78,6 @@ do_install_ptest () {
|
||||
-i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb
|
||||
|
||||
cp -r ${S}/include ${D}/${libdir}/ruby/
|
||||
test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list`
|
||||
sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
|
||||
@@ -37,7 +37,7 @@ BBCLASSEXTEND = "native nativesdk"
|
||||
inherit autotools
|
||||
EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
|
||||
CFLAGS_append = " -I${STAGING_INCDIR}/tirpc"
|
||||
LDFLAGS_append = " -ltirpc"
|
||||
EXTRA_OECONF_append = " LIBS=-ltirpc"
|
||||
|
||||
# Turn off these header detects else the inode search
|
||||
# will walk entire file systems and this is a real problem
|
||||
|
||||
@@ -8,7 +8,7 @@ LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=4e5d1baf6f20559e3bec172226a47e4e \
|
||||
file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 "
|
||||
|
||||
SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https;branch=9.x"
|
||||
SRC_URI = "git://github.com/asciidoc/asciidoc-py;protocol=https;branch=9.x"
|
||||
SRCREV = "9705d428439530104ce55d0ba12e8ef9d1b57ad1"
|
||||
|
||||
DEPENDS = "libxml2-native libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
From 6643ff0cb837db3eade489ffff21e3e92eee2ae0 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Liddell <chris.liddell@artifex.com>
|
||||
Date: Fri, 28 Jan 2022 08:21:19 +0000
|
||||
Subject: [PATCH] [PATCH] Bug 703902: Fix op stack management in
|
||||
sampled_data_continue()
|
||||
|
||||
Replace pop() (which does no checking, and doesn't handle stack extension
|
||||
blocks) with ref_stack_pop() which does do all that.
|
||||
|
||||
We still use pop() in one case (it's faster), but we have to later use
|
||||
ref_stack_pop() before calling sampled_data_sample() which also accesses the
|
||||
op stack.
|
||||
|
||||
Fixes:
|
||||
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34675
|
||||
|
||||
Upstream-Status: Backported [https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=2a3129365d3bc0d4a41f107ef175920d1505d1f7]
|
||||
CVE: CVE-2021-45949
|
||||
Signed-off-by: Minjae Kim <flowergom@gmail.com>
|
||||
---
|
||||
psi/zfsample.c | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/psi/zfsample.c b/psi/zfsample.c
|
||||
index 0023fa4..f84671f 100644
|
||||
--- a/psi/zfsample.c
|
||||
+++ b/psi/zfsample.c
|
||||
@@ -534,14 +534,17 @@ sampled_data_continue(i_ctx_t *i_ctx_p)
|
||||
data_ptr[bps * i + j] = (byte)(cv >> ((bps - 1 - j) * 8)); /* MSB first */
|
||||
}
|
||||
pop(num_out); /* Move op to base of result values */
|
||||
-
|
||||
+ /* From here on, we have to use ref_stack_pop() rather than pop()
|
||||
+ so that it handles stack extension blocks properly, before calling
|
||||
+ sampled_data_sample() which also uses the op stack.
|
||||
+ */
|
||||
/* Check if we are done collecting data. */
|
||||
|
||||
if (increment_cube_indexes(params, penum->indexes)) {
|
||||
if (stack_depth_adjust == 0)
|
||||
- pop(O_STACK_PAD); /* Remove spare stack space */
|
||||
+ ref_stack_pop(&o_stack, O_STACK_PAD); /* Remove spare stack space */
|
||||
else
|
||||
- pop(stack_depth_adjust - num_out);
|
||||
+ ref_stack_pop(&o_stack, stack_depth_adjust - num_out);
|
||||
/* Execute the closing procedure, if given */
|
||||
code = 0;
|
||||
if (esp_finish_proc != 0)
|
||||
@@ -554,11 +557,11 @@ sampled_data_continue(i_ctx_t *i_ctx_p)
|
||||
if ((O_STACK_PAD - stack_depth_adjust) < 0) {
|
||||
stack_depth_adjust = -(O_STACK_PAD - stack_depth_adjust);
|
||||
check_op(stack_depth_adjust);
|
||||
- pop(stack_depth_adjust);
|
||||
+ ref_stack_pop(&o_stack, stack_depth_adjust);
|
||||
}
|
||||
else {
|
||||
check_ostack(O_STACK_PAD - stack_depth_adjust);
|
||||
- push(O_STACK_PAD - stack_depth_adjust);
|
||||
+ ref_stack_push(&o_stack, O_STACK_PAD - stack_depth_adjust);
|
||||
for (i=0;i<O_STACK_PAD - stack_depth_adjust;i++)
|
||||
make_null(op - i);
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 7861fcad13c497728189feafb41cd57b5b50ea25 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Liddell <chris.liddell@artifex.com>
|
||||
Date: Fri, 12 Feb 2021 10:34:23 +0000
|
||||
Subject: [PATCH] oss-fuzz 30715: Check stack limits after function evaluation.
|
||||
|
||||
During function result sampling, after the callout to the Postscript
|
||||
interpreter, make sure there is enough stack space available before pushing
|
||||
or popping entries.
|
||||
|
||||
In thise case, the Postscript procedure for the "function" is totally invalid
|
||||
(as a function), and leaves the op stack in an unrecoverable state (as far as
|
||||
function evaluation is concerned). We end up popping more entries off the
|
||||
stack than are available.
|
||||
|
||||
To cope, add in stack limit checking to throw an appropriate error when this
|
||||
happens.
|
||||
|
||||
Upstream-Status: Backported [https://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=7861fcad13c497728189feafb41cd57b5b50ea25]
|
||||
Signed-off-by: Minjae Kim <flowergom@gmail.com>
|
||||
---
|
||||
psi/zfsample.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/psi/zfsample.c b/psi/zfsample.c
|
||||
index 290809405..652ae02c6 100644
|
||||
--- a/psi/zfsample.c
|
||||
+++ b/psi/zfsample.c
|
||||
@@ -551,9 +551,17 @@ sampled_data_continue(i_ctx_t *i_ctx_p)
|
||||
} else {
|
||||
if (stack_depth_adjust) {
|
||||
stack_depth_adjust -= num_out;
|
||||
- push(O_STACK_PAD - stack_depth_adjust);
|
||||
- for (i=0;i<O_STACK_PAD - stack_depth_adjust;i++)
|
||||
- make_null(op - i);
|
||||
+ if ((O_STACK_PAD - stack_depth_adjust) < 0) {
|
||||
+ stack_depth_adjust = -(O_STACK_PAD - stack_depth_adjust);
|
||||
+ check_op(stack_depth_adjust);
|
||||
+ pop(stack_depth_adjust);
|
||||
+ }
|
||||
+ else {
|
||||
+ check_ostack(O_STACK_PAD - stack_depth_adjust);
|
||||
+ push(O_STACK_PAD - stack_depth_adjust);
|
||||
+ for (i=0;i<O_STACK_PAD - stack_depth_adjust;i++)
|
||||
+ make_null(op - i);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -34,6 +34,8 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
|
||||
file://avoid-host-contamination.patch \
|
||||
file://mkdir-p.patch \
|
||||
file://0001-Bug-704342-Include-device-specifier-strings-in-acces.patch \
|
||||
file://check-stack-limits-after-function-evalution.patch \
|
||||
file://CVE-2021-45949.patch \
|
||||
"
|
||||
|
||||
SRC_URI = "${SRC_URI_BASE} \
|
||||
|
||||
@@ -34,7 +34,7 @@ EXTRA_OECONF += "--enable-largefile"
|
||||
|
||||
SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[sha256sum] = "9015d109ec00bb9ae1a384b172bf2fc1dff41e2c66e5a9eeddf933af9db37f5a"
|
||||
SRC_URI[sha256sum] = "72788e5f58d16febddfa262a5215e05fc9c79f2670f641ac039e6df44330ef51"
|
||||
|
||||
inherit autotools update-alternatives pkgconfig
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From e7bbf72544ab62db9c92bfe7bd1155227e78c621 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Borodin <aborodin@vmail.ru>
|
||||
Date: Sat, 28 Aug 2021 11:46:53 +0300
|
||||
Subject: [PATCH] Ticket #4200: fix FTBFS with ncurses build with
|
||||
--disable-widec.
|
||||
|
||||
Upstream-Status: Accepted [https://github.com/MidnightCommander/mc/commit/e7bbf72544]
|
||||
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
|
||||
---
|
||||
lib/tty/tty-ncurses.c | 8 ++++++++
|
||||
lib/tty/tty-ncurses.h | 5 +++++
|
||||
lib/tty/tty-slang.h | 2 ++
|
||||
src/filemanager/boxes.c | 2 ++
|
||||
4 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
|
||||
index f619c0a7bf31..13058a624208 100644
|
||||
--- a/lib/tty/tty-ncurses.c
|
||||
+++ b/lib/tty/tty-ncurses.c
|
||||
@@ -560,6 +560,7 @@ tty_fill_region (int y, int x, int rows, int cols, unsigned char ch)
|
||||
void
|
||||
tty_colorize_area (int y, int x, int rows, int cols, int color)
|
||||
{
|
||||
+#ifdef ENABLE_SHADOWS
|
||||
cchar_t *ctext;
|
||||
wchar_t wch[10]; /* TODO not sure if the length is correct */
|
||||
attr_t attrs;
|
||||
@@ -585,6 +586,13 @@ tty_colorize_area (int y, int x, int rows, int cols, int color)
|
||||
}
|
||||
|
||||
g_free (ctext);
|
||||
+#else
|
||||
+ (void) y;
|
||||
+ (void) x;
|
||||
+ (void) rows;
|
||||
+ (void) cols;
|
||||
+ (void) color;
|
||||
+#endif /* ENABLE_SHADOWS */
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
diff --git a/lib/tty/tty-ncurses.h b/lib/tty/tty-ncurses.h
|
||||
index d75df9533ab9..8feb17ccd045 100644
|
||||
--- a/lib/tty/tty-ncurses.h
|
||||
+++ b/lib/tty/tty-ncurses.h
|
||||
@@ -30,6 +30,11 @@
|
||||
#define NCURSES_CONST const
|
||||
#endif
|
||||
|
||||
+/* do not draw shadows if NCurses is built with --disable-widec */
|
||||
+#if defined(NCURSES_WIDECHAR) && NCURSES_WIDECHAR
|
||||
+#define ENABLE_SHADOWS 1
|
||||
+#endif
|
||||
+
|
||||
/*** typedefs(not structures) and defined constants **********************************************/
|
||||
|
||||
/*** enums ***************************************************************************************/
|
||||
diff --git a/lib/tty/tty-slang.h b/lib/tty/tty-slang.h
|
||||
index 5b12c6512853..eeaade388af4 100644
|
||||
--- a/lib/tty/tty-slang.h
|
||||
+++ b/lib/tty/tty-slang.h
|
||||
@@ -23,6 +23,8 @@
|
||||
#define COLS SLtt_Screen_Cols
|
||||
#define LINES SLtt_Screen_Rows
|
||||
|
||||
+#define ENABLE_SHADOWS 1
|
||||
+
|
||||
/*** enums ***************************************************************************************/
|
||||
|
||||
enum
|
||||
diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
|
||||
index 3eb525be4a9b..98df5ff2ed9a 100644
|
||||
--- a/src/filemanager/boxes.c
|
||||
+++ b/src/filemanager/boxes.c
|
||||
@@ -280,7 +280,9 @@ appearance_box_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm
|
||||
switch (msg)
|
||||
{
|
||||
case MSG_INIT:
|
||||
+#ifdef ENABLE_SHADOWS
|
||||
if (!tty_use_colors ())
|
||||
+#endif
|
||||
{
|
||||
Widget *shadow;
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -12,6 +12,7 @@ SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
|
||||
file://0001-mc-replace-perl-w-with-use-warnings.patch \
|
||||
file://nomandate.patch \
|
||||
file://CVE-2021-36370.patch \
|
||||
file://0001-Ticket-4200-fix-FTBFS-with-ncurses-build-with-disabl.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "9d6358d0a351a455a1410aab57f33b6b48b0fcf31344b9a10b0ff497595979d1"
|
||||
|
||||
@@ -24,7 +25,9 @@ PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
|
||||
PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
|
||||
|
||||
CFLAGS_append_libc-musl = ' -DNCURSES_WIDECHAR=1 '
|
||||
# enable NCURSES_WIDECHAR=1 only if ENABLE_WIDEC has not been explicitly disabled (e.g. by the distro config).
|
||||
# When compiling against the ncurses library, NCURSES_WIDECHAR needs to explicitly set to 0 in this case.
|
||||
CFLAGS_append_libc-musl = "${@' -DNCURSES_WIDECHAR=1' if bb.utils.to_boolean((d.getVar('ENABLE_WIDEC') or 'True')) else ' -DNCURSES_WIDECHAR=0'}"
|
||||
EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --disable-configure-args"
|
||||
|
||||
CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 7a2729ee7f5d9b9d4a0d9b83fe641a2ab03c4ee0 Mon Sep 17 00:00:00 2001
|
||||
From: Joe Slater <joe.slater@windriver.com>
|
||||
Date: Thu, 24 Feb 2022 17:36:59 -0800
|
||||
Subject: [PATCH 1/2] configure: use correct CPP
|
||||
|
||||
configure uses CPP to test that two assembler routines
|
||||
can be built. Unfortunately, it will use /usr/bin/cpp
|
||||
if it exists, invalidating the tests. We use the $CC
|
||||
passed to configure.
|
||||
|
||||
Upstream-Status: Inappropriate [openembedded specific]
|
||||
|
||||
Signed-off-by: Joe Slater <joe.slater@windriver.com>
|
||||
---
|
||||
unix/configure | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/unix/configure b/unix/configure
|
||||
index 73ba803..7e21070 100644
|
||||
--- a/unix/configure
|
||||
+++ b/unix/configure
|
||||
@@ -220,13 +220,16 @@ fi
|
||||
echo Check for the C preprocessor
|
||||
# on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
|
||||
CPP="${CC} -E"
|
||||
+
|
||||
+# We should not change CPP for yocto builds.
|
||||
+#
|
||||
# solaris as(1) needs -P, maybe others as well ?
|
||||
-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
|
||||
-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
|
||||
-[ -f /lib/cpp ] && CPP=/lib/cpp
|
||||
-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
|
||||
-[ -f /xenix ] && CPP="${CC} -E"
|
||||
-[ -f /lynx.os ] && CPP="${CC} -E"
|
||||
+# [ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
|
||||
+# [ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
|
||||
+# [ -f /lib/cpp ] && CPP=/lib/cpp
|
||||
+# [ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
|
||||
+# [ -f /xenix ] && CPP="${CC} -E"
|
||||
+# [ -f /lynx.os ] && CPP="${CC} -E"
|
||||
|
||||
echo "#include <stdio.h>" > conftest.c
|
||||
$CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From b0492506d2c28581193906e9d260d4f0451e2c39 Mon Sep 17 00:00:00 2001
|
||||
From: Joe Slater <joe.slater@windriver.com>
|
||||
Date: Thu, 24 Feb 2022 17:46:03 -0800
|
||||
Subject: [PATCH 2/2] configure: support PIC code build
|
||||
|
||||
Disable building match.S. The code requires
|
||||
relocation in .text.
|
||||
|
||||
Upstream-Status: Inappropriate [openembedded specific]
|
||||
|
||||
Signed-off-by: Joe Slater <joe.slater@windriver.com>
|
||||
---
|
||||
unix/configure | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/unix/configure b/unix/configure
|
||||
index 7e21070..1bc698b 100644
|
||||
--- a/unix/configure
|
||||
+++ b/unix/configure
|
||||
@@ -242,8 +242,9 @@ if eval "$CPP match.S > _match.s 2>/dev/null"; then
|
||||
if test ! -s _match.s || grep error < _match.s > /dev/null; then
|
||||
:
|
||||
elif eval "$CC -c _match.s >/dev/null 2>/dev/null" && [ -f _match.o ]; then
|
||||
- CFLAGS="${CFLAGS} -DASMV"
|
||||
- OBJA="match.o"
|
||||
+ # disable match.S for PIC code
|
||||
+ # CFLAGS="${CFLAGS} -DASMV"
|
||||
+ # OBJA="match.o"
|
||||
echo "int foo() { return 0;}" > conftest.c
|
||||
$CC -c conftest.c >/dev/null 2>/dev/null
|
||||
echo Check if compiler generates underlines
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -14,6 +14,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.
|
||||
file://fix-security-format.patch \
|
||||
file://10-remove-build-date.patch \
|
||||
file://zipnote-crashes-with-segfault.patch \
|
||||
file://0001-configure-use-correct-CPP.patch \
|
||||
file://0002-configure-support-PIC-code-build.patch \
|
||||
"
|
||||
UPSTREAM_VERSION_UNKNOWN = "1"
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}
|
||||
file://0002-help-meson.build-disable-the-use-of-yelp.patch \
|
||||
file://migrator.patch \
|
||||
file://distributor.patch \
|
||||
file://encode-untrusted-data.patch \
|
||||
"
|
||||
SRC_URI[archive.sha256sum] = "8b05f2bcc1e80ecf4a10f6f01b3285087eb4cbdf5741dffb8c0355715ef5116d"
|
||||
|
||||
|
||||
707
meta/recipes-gnome/epiphany/files/encode-untrusted-data.patch
Normal file
707
meta/recipes-gnome/epiphany/files/encode-untrusted-data.patch
Normal file
@@ -0,0 +1,707 @@
|
||||
From: Michael Catanzaro <mcatanzaro@redhat.com>
|
||||
Subject: Properly encode untrusted data when injecting into trusted pages
|
||||
|
||||
CVE: CVE-2021-45085 CVE-2021-45086 CVE-2021-45087 CVE-2021-45088
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/epiphany/-/compare/c27a8180e12e6ec92292dcf53b9243815ad9aa2e...abac58c5191b7d653fbefa8d44e5c2bd4d002825?from_project_id=1906]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
Index: epiphany-browser/embed/ephy-about-handler.c
|
||||
===================================================================
|
||||
--- epiphany-browser.orig/embed/ephy-about-handler.c
|
||||
+++ epiphany-browser/embed/ephy-about-handler.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "ephy-file-helpers.h"
|
||||
#include "ephy-flatpak-utils.h"
|
||||
#include "ephy-history-service.h"
|
||||
+#include "ephy-output-encoding.h"
|
||||
#include "ephy-prefs.h"
|
||||
#include "ephy-settings.h"
|
||||
#include "ephy-smaps.h"
|
||||
@@ -263,16 +264,34 @@ handle_applications_finished_cb (EphyAbo
|
||||
|
||||
for (p = applications; p; p = p->next) {
|
||||
EphyWebApplication *app = (EphyWebApplication *)p->data;
|
||||
-
|
||||
+ g_autofree char *html_encoded_id = NULL;
|
||||
+ g_autofree char *encoded_icon_url = NULL;
|
||||
+ g_autofree char *encoded_name = NULL;
|
||||
+ g_autofree char *encoded_url = NULL;
|
||||
+ g_autofree char *js_encoded_id = NULL;
|
||||
+ g_autofree char *encoded_install_date = NULL;
|
||||
+
|
||||
+ /* Most of these fields are untrusted. The web app suggests its own title,
|
||||
+ * which gets used in the app ID and icon URL. The main URL could contain
|
||||
+ * anything. Install date is the only trusted field here in that it's
|
||||
+ * constructed by Epiphany, but it's a freeform string and we're encoding
|
||||
+ * everything else here anyway, so might as well encode this too.
|
||||
+ */
|
||||
+ html_encoded_id = ephy_encode_for_html_attribute (app->id);
|
||||
+ encoded_icon_url = ephy_encode_for_html_attribute (app->icon_url);
|
||||
+ encoded_name = ephy_encode_for_html_entity (app->name);
|
||||
+ encoded_url = ephy_encode_for_html_entity (app->url);
|
||||
+ js_encoded_id = ephy_encode_for_javascript (app->id);
|
||||
+ encoded_install_date = ephy_encode_for_html_entity (app->install_date);
|
||||
g_string_append_printf (data_str,
|
||||
"<tbody><tr id =\"%s\">"
|
||||
"<td class=\"icon\"><img width=64 height=64 src=\"file://%s\"></img></td>"
|
||||
"<td class=\"data\"><div class=\"appname\">%s</div><div class=\"appurl\">%s</div></td>"
|
||||
"<td class=\"input\"><input type=\"button\" value=\"%s\" onclick=\"deleteWebApp('%s');\"></td>"
|
||||
"<td class=\"date\">%s <br /> %s</td></tr></tbody>",
|
||||
- app->id, app->icon_url, app->name, app->url, _("Delete"), app->id,
|
||||
+ html_encoded_id, encoded_icon_url, encoded_name, encoded_url, _("Delete"), js_encoded_id,
|
||||
/* Note for translators: this refers to the installation date. */
|
||||
- _("Installed on:"), app->install_date);
|
||||
+ _("Installed on:"), encoded_install_date);
|
||||
}
|
||||
|
||||
g_string_append (data_str, "</table></div></body></html>");
|
||||
@@ -407,7 +426,9 @@ history_service_query_urls_cb (EphyHisto
|
||||
EphyHistoryURL *url = (EphyHistoryURL *)l->data;
|
||||
const char *snapshot;
|
||||
g_autofree char *thumbnail_style = NULL;
|
||||
- g_autofree char *markup = NULL;
|
||||
+ g_autofree char *entity_encoded_title = NULL;
|
||||
+ g_autofree char *attribute_encoded_title = NULL;
|
||||
+ g_autofree char *encoded_url = NULL;
|
||||
|
||||
snapshot = ephy_snapshot_service_lookup_cached_snapshot_path (snapshot_service, url->url);
|
||||
if (snapshot)
|
||||
@@ -415,15 +436,19 @@ history_service_query_urls_cb (EphyHisto
|
||||
else
|
||||
ephy_embed_shell_schedule_thumbnail_update (shell, url);
|
||||
|
||||
- markup = g_markup_escape_text (url->title, -1);
|
||||
+ /* Title and URL are controlled by web content and could be malicious. */
|
||||
+ entity_encoded_title = ephy_encode_for_html_entity (url->title);
|
||||
+ attribute_encoded_title = ephy_encode_for_html_attribute (url->title);
|
||||
+ encoded_url = ephy_encode_for_html_attribute (url->url);
|
||||
g_string_append_printf (data_str,
|
||||
"<a class=\"overview-item\" title=\"%s\" href=\"%s\">"
|
||||
" <div class=\"overview-close-button\" title=\"%s\"></div>"
|
||||
" <span class=\"overview-thumbnail\"%s></span>"
|
||||
" <span class=\"overview-title\">%s</span>"
|
||||
"</a>",
|
||||
- markup, url->url, _("Remove from overview"),
|
||||
- thumbnail_style ? thumbnail_style : "", url->title);
|
||||
+ attribute_encoded_title, encoded_url, _("Remove from overview"),
|
||||
+ thumbnail_style ? thumbnail_style : "",
|
||||
+ entity_encoded_title);
|
||||
}
|
||||
|
||||
data_str = g_string_append (data_str,
|
||||
Index: epiphany-browser/embed/ephy-pdf-handler.c
|
||||
===================================================================
|
||||
--- epiphany-browser.orig/embed/ephy-pdf-handler.c
|
||||
+++ epiphany-browser/embed/ephy-pdf-handler.c
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "ephy-embed-container.h"
|
||||
#include "ephy-embed-shell.h"
|
||||
+#include "ephy-output-encoding.h"
|
||||
#include "ephy-web-view.h"
|
||||
|
||||
#include <gio/gio.h>
|
||||
@@ -124,8 +125,9 @@ pdf_file_loaded (GObject *source,
|
||||
GBytes *html_file;
|
||||
g_autoptr (GError) error = NULL;
|
||||
g_autoptr (GString) html = NULL;
|
||||
- g_autofree gchar *b64 = NULL;
|
||||
g_autofree char *file_data = NULL;
|
||||
+ g_autofree char *encoded_file_data = NULL;
|
||||
+ g_autofree char *encoded_filename = NULL;
|
||||
gsize len = 0;
|
||||
|
||||
if (!g_file_load_contents_finish (G_FILE (source), res, &file_data, &len, NULL, &error)) {
|
||||
@@ -134,13 +136,13 @@ pdf_file_loaded (GObject *source,
|
||||
return;
|
||||
}
|
||||
|
||||
- html_file = g_resources_lookup_data ("/org/gnome/epiphany/pdfjs/web/viewer.html", 0, NULL);
|
||||
-
|
||||
- b64 = g_base64_encode ((const guchar *)file_data, len);
|
||||
g_file_delete_async (G_FILE (source), G_PRIORITY_DEFAULT, NULL, pdf_file_deleted, NULL);
|
||||
|
||||
- html = g_string_new ("");
|
||||
- g_string_printf (html, g_bytes_get_data (html_file, NULL), b64, self->file_name ? self->file_name : "");
|
||||
+ html = g_string_new (NULL);
|
||||
+ html_file = g_resources_lookup_data ("/org/gnome/epiphany/pdfjs/web/viewer.html", 0, NULL);
|
||||
+ encoded_file_data = g_base64_encode ((const guchar *)file_data, len);
|
||||
+ encoded_filename = self->file_name ? ephy_encode_for_html_attribute (self->file_name) : g_strdup ("");
|
||||
+ g_string_printf (html, g_bytes_get_data (html_file, NULL), encoded_file_data, encoded_filename);
|
||||
|
||||
finish_uri_scheme_request (self, g_strdup (html->str), NULL);
|
||||
}
|
||||
Index: epiphany-browser/embed/ephy-reader-handler.c
|
||||
===================================================================
|
||||
--- epiphany-browser.orig/embed/ephy-reader-handler.c
|
||||
+++ epiphany-browser/embed/ephy-reader-handler.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "ephy-embed-container.h"
|
||||
#include "ephy-embed-shell.h"
|
||||
#include "ephy-lib-type-builtins.h"
|
||||
+#include "ephy-output-encoding.h"
|
||||
#include "ephy-settings.h"
|
||||
#include "ephy-web-view.h"
|
||||
|
||||
@@ -156,7 +157,9 @@ readability_js_finish_cb (GObject *
|
||||
g_autoptr (WebKitJavascriptResult) js_result = NULL;
|
||||
g_autoptr (GError) error = NULL;
|
||||
g_autofree gchar *byline = NULL;
|
||||
+ g_autofree gchar *encoded_byline = NULL;
|
||||
g_autofree gchar *content = NULL;
|
||||
+ g_autofree gchar *encoded_title = NULL;
|
||||
g_autoptr (GString) html = NULL;
|
||||
g_autoptr (GBytes) style_css = NULL;
|
||||
const gchar *title;
|
||||
@@ -173,10 +176,14 @@ readability_js_finish_cb (GObject *
|
||||
|
||||
byline = readability_get_property_string (js_result, "byline");
|
||||
content = readability_get_property_string (js_result, "content");
|
||||
+ title = webkit_web_view_get_title (web_view);
|
||||
+
|
||||
+ encoded_byline = byline ? ephy_encode_for_html_entity (byline) : g_strdup ("");
|
||||
+ encoded_title = ephy_encode_for_html_entity (title);
|
||||
|
||||
- html = g_string_new ("");
|
||||
+ html = g_string_new (NULL);
|
||||
style_css = g_resources_lookup_data ("/org/gnome/epiphany/readability/reader.css", G_RESOURCE_LOOKUP_FLAGS_NONE, NULL);
|
||||
- title = webkit_web_view_get_title (web_view);
|
||||
+
|
||||
font_style = enum_nick (EPHY_TYPE_PREFS_READER_FONT_STYLE,
|
||||
g_settings_get_enum (EPHY_SETTINGS_READER,
|
||||
EPHY_PREFS_READER_FONT_STYLE));
|
||||
@@ -186,7 +193,8 @@ readability_js_finish_cb (GObject *
|
||||
|
||||
g_string_append_printf (html, "<style>%s</style>"
|
||||
"<title>%s</title>"
|
||||
- "<meta http-equiv=\"Content-Type\" content=\"text/html;\" charset=\"UTF-8\">" \
|
||||
+ "<meta http-equiv='Content-Type' content='text/html;' charset='UTF-8'>" \
|
||||
+ "<meta http-equiv='Content-Security-Policy' content=\"script-src 'none'\">" \
|
||||
"<body class='%s %s'>"
|
||||
"<article>"
|
||||
"<h2>"
|
||||
@@ -197,13 +205,27 @@ readability_js_finish_cb (GObject *
|
||||
"</i>"
|
||||
"<hr>",
|
||||
(gchar *)g_bytes_get_data (style_css, NULL),
|
||||
- title,
|
||||
+ encoded_title,
|
||||
font_style,
|
||||
color_scheme,
|
||||
- title,
|
||||
- byline != NULL ? byline : "");
|
||||
+ encoded_title,
|
||||
+ encoded_byline);
|
||||
+
|
||||
+ /* We cannot encode the page content because it contains HTML tags inserted by
|
||||
+ * Readability.js. Upstream recommends that we use an XSS sanitizer like
|
||||
+ * DOMPurify plus Content-Security-Policy, but I'm not keen on adding more
|
||||
+ * bundled JS dependencies, and we have an advantage over Firefox in that we
|
||||
+ * don't need scripts to work at this point. So instead the above CSP
|
||||
+ * completely blocks all scripts, which should hopefully obviate the need for
|
||||
+ * a DOM purifier.
|
||||
+ *
|
||||
+ * Note the encoding for page title and byline is still required, as they're
|
||||
+ * not supposed to contain markup, and Readability.js unescapes them before
|
||||
+ * returning them to us.
|
||||
+ */
|
||||
g_string_append (html, content);
|
||||
g_string_append (html, "</article>");
|
||||
+ g_string_append (html, "</body>");
|
||||
|
||||
finish_uri_scheme_request (request, g_strdup (html->str), NULL);
|
||||
}
|
||||
Index: epiphany-browser/embed/ephy-view-source-handler.c
|
||||
===================================================================
|
||||
--- epiphany-browser.orig/embed/ephy-view-source-handler.c
|
||||
+++ epiphany-browser/embed/ephy-view-source-handler.c
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "ephy-embed-container.h"
|
||||
#include "ephy-embed-shell.h"
|
||||
+#include "ephy-output-encoding.h"
|
||||
#include "ephy-web-view.h"
|
||||
|
||||
#include <gio/gio.h>
|
||||
@@ -109,7 +110,9 @@ web_resource_data_cb (WebKitWebResource
|
||||
EphyViewSourceRequest *request)
|
||||
{
|
||||
g_autofree guchar *data = NULL;
|
||||
- g_autofree char *escaped_str = NULL;
|
||||
+ g_autofree char *data_str = NULL;
|
||||
+ g_autofree char *encoded_str = NULL;
|
||||
+ g_autofree char *encoded_uri = NULL;
|
||||
g_autoptr (GError) error = NULL;
|
||||
g_autofree char *html = NULL;
|
||||
gsize length;
|
||||
@@ -120,8 +123,13 @@ web_resource_data_cb (WebKitWebResource
|
||||
return;
|
||||
}
|
||||
|
||||
- /* Warning: data is not a string, so we pass length here because it's not NUL-terminated. */
|
||||
- escaped_str = g_markup_escape_text ((const char *)data, length);
|
||||
+ /* Convert data to a string */
|
||||
+ data_str = g_malloc (length + 1);
|
||||
+ memcpy (data_str, data, length);
|
||||
+ data_str[length] = '\0';
|
||||
+
|
||||
+ encoded_str = ephy_encode_for_html_entity (data_str);
|
||||
+ encoded_uri = ephy_encode_for_html_entity (webkit_web_resource_get_uri (resource));
|
||||
|
||||
html = g_strdup_printf ("<head>"
|
||||
" <link rel='stylesheet' href='ephy-resource:///org/gnome/epiphany/highlightjs/nnfx.css' media='(prefers-color-scheme: no-preference), (prefers-color-scheme: light)'>"
|
||||
@@ -136,8 +144,8 @@ web_resource_data_cb (WebKitWebResource
|
||||
" hljs.initLineNumbersOnLoad();</script>"
|
||||
" <pre><code class='html'>%s</code></pre>"
|
||||
"</body>",
|
||||
- webkit_web_resource_get_uri (resource),
|
||||
- escaped_str);
|
||||
+ encoded_uri,
|
||||
+ encoded_str);
|
||||
|
||||
finish_uri_scheme_request (request, g_steal_pointer (&html), NULL);
|
||||
}
|
||||
Index: epiphany-browser/embed/ephy-web-view.c
|
||||
===================================================================
|
||||
--- epiphany-browser.orig/embed/ephy-web-view.c
|
||||
+++ epiphany-browser/embed/ephy-web-view.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "ephy-gsb-utils.h"
|
||||
#include "ephy-history-service.h"
|
||||
#include "ephy-lib-type-builtins.h"
|
||||
+#include "ephy-output-encoding.h"
|
||||
#include "ephy-permissions-manager.h"
|
||||
#include "ephy-prefs.h"
|
||||
#include "ephy-reader-handler.h"
|
||||
@@ -1772,9 +1773,11 @@ format_network_error_page (const char *
|
||||
const char **icon_name,
|
||||
const char **style)
|
||||
{
|
||||
- char *formatted_origin;
|
||||
- char *formatted_reason;
|
||||
- char *first_paragraph;
|
||||
+ g_autofree char *encoded_uri = NULL;
|
||||
+ g_autofree char *encoded_origin = NULL;
|
||||
+ g_autofree char *formatted_origin = NULL;
|
||||
+ g_autofree char *formatted_reason = NULL;
|
||||
+ g_autofree char *first_paragraph = NULL;
|
||||
const char *second_paragraph;
|
||||
|
||||
/* Page title when a site cannot be loaded due to a network error. */
|
||||
@@ -1783,7 +1786,8 @@ format_network_error_page (const char *
|
||||
/* Message title when a site cannot be loaded due to a network error. */
|
||||
*message_title = g_strdup (_("Unable to display this website"));
|
||||
|
||||
- formatted_origin = g_strdup_printf ("<strong>%s</strong>", origin);
|
||||
+ encoded_origin = ephy_encode_for_html_entity (origin);
|
||||
+ formatted_origin = g_strdup_printf ("<strong>%s</strong>", encoded_origin);
|
||||
/* Error details when a site cannot be loaded due to a network error. */
|
||||
first_paragraph = g_strdup_printf (_("The site at %s seems to be "
|
||||
"unavailable."),
|
||||
@@ -1805,16 +1809,13 @@ format_network_error_page (const char *
|
||||
|
||||
/* The button on the network error page. DO NOT ADD MNEMONICS HERE. */
|
||||
*button_label = g_strdup (_("Reload"));
|
||||
- *button_action = g_strdup_printf ("window.location = '%s';", uri);
|
||||
+ encoded_uri = ephy_encode_for_javascript (uri);
|
||||
+ *button_action = g_strdup_printf ("window.location = '%s';", encoded_uri);
|
||||
/* Mnemonic for the Reload button on browser error pages. */
|
||||
*button_accesskey = C_("reload-access-key", "R");
|
||||
|
||||
*icon_name = "network-error-symbolic.svg";
|
||||
*style = "default";
|
||||
-
|
||||
- g_free (formatted_origin);
|
||||
- g_free (formatted_reason);
|
||||
- g_free (first_paragraph);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1828,10 +1829,12 @@ format_crash_error_page (const char *ur
|
||||
const char **icon_name,
|
||||
const char **style)
|
||||
{
|
||||
- char *formatted_uri;
|
||||
- char *formatted_distributor;
|
||||
- char *first_paragraph;
|
||||
- char *second_paragraph;
|
||||
+ g_autofree char *html_encoded_uri = NULL;
|
||||
+ g_autofree char *js_encoded_uri = NULL;
|
||||
+ g_autofree char *formatted_uri = NULL;
|
||||
+ g_autofree char *formatted_distributor = NULL;
|
||||
+ g_autofree char *first_paragraph = NULL;
|
||||
+ g_autofree char *second_paragraph = NULL;
|
||||
|
||||
/* Page title when a site cannot be loaded due to a page crash error. */
|
||||
*page_title = g_strdup_printf (_("Problem Loading Page"));
|
||||
@@ -1839,7 +1842,8 @@ format_crash_error_page (const char *ur
|
||||
/* Message title when a site cannot be loaded due to a page crash error. */
|
||||
*message_title = g_strdup (_("Oops! There may be a problem"));
|
||||
|
||||
- formatted_uri = g_strdup_printf ("<strong>%s</strong>", uri);
|
||||
+ html_encoded_uri = ephy_encode_for_html_entity (uri);
|
||||
+ formatted_uri = g_strdup_printf ("<strong>%s</strong>", html_encoded_uri);
|
||||
/* Error details when a site cannot be loaded due to a page crash error. */
|
||||
first_paragraph = g_strdup_printf (_("The page %s may have caused Web to "
|
||||
"close unexpectedly."),
|
||||
@@ -1858,17 +1862,13 @@ format_crash_error_page (const char *ur
|
||||
|
||||
/* The button on the page crash error page. DO NOT ADD MNEMONICS HERE. */
|
||||
*button_label = g_strdup (_("Reload"));
|
||||
- *button_action = g_strdup_printf ("window.location = '%s';", uri);
|
||||
+ js_encoded_uri = ephy_encode_for_javascript (uri);
|
||||
+ *button_action = g_strdup_printf ("window.location = '%s';", js_encoded_uri);
|
||||
/* Mnemonic for the Reload button on browser error pages. */
|
||||
*button_accesskey = C_("reload-access-key", "R");
|
||||
|
||||
*icon_name = "computer-fail-symbolic.svg";
|
||||
*style = "default";
|
||||
-
|
||||
- g_free (formatted_uri);
|
||||
- g_free (formatted_distributor);
|
||||
- g_free (first_paragraph);
|
||||
- g_free (second_paragraph);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1882,6 +1882,7 @@ format_process_crash_error_page (const c
|
||||
const char **icon_name,
|
||||
const char **style)
|
||||
{
|
||||
+ g_autofree char *encoded_uri = NULL;
|
||||
const char *first_paragraph;
|
||||
|
||||
/* Page title when a site cannot be loaded due to a process crash error. */
|
||||
@@ -1897,7 +1898,8 @@ format_process_crash_error_page (const c
|
||||
|
||||
/* The button on the process crash error page. DO NOT ADD MNEMONICS HERE. */
|
||||
*button_label = g_strdup (_("Reload"));
|
||||
- *button_action = g_strdup_printf ("window.location = '%s';", uri);
|
||||
+ encoded_uri = ephy_encode_for_javascript (uri);
|
||||
+ *button_action = g_strdup_printf ("window.location = '%s';", encoded_uri);
|
||||
/* Mnemonic for the Reload button on browser error pages. */
|
||||
*button_accesskey = C_("reload-access-key", "R");
|
||||
|
||||
@@ -1921,8 +1923,9 @@ format_tls_error_page (EphyWebView *vie
|
||||
const char **icon_name,
|
||||
const char **style)
|
||||
{
|
||||
- char *formatted_origin;
|
||||
- char *first_paragraph;
|
||||
+ g_autofree char *encoded_origin = NULL;
|
||||
+ g_autofree char *formatted_origin = NULL;
|
||||
+ g_autofree char *first_paragraph = NULL;
|
||||
|
||||
/* Page title when a site is not loaded due to an invalid TLS certificate. */
|
||||
*page_title = g_strdup_printf (_("Security Violation"));
|
||||
@@ -1930,7 +1933,8 @@ format_tls_error_page (EphyWebView *vie
|
||||
/* Message title when a site is not loaded due to an invalid TLS certificate. */
|
||||
*message_title = g_strdup (_("This Connection is Not Secure"));
|
||||
|
||||
- formatted_origin = g_strdup_printf ("<strong>%s</strong>", origin);
|
||||
+ encoded_origin = ephy_encode_for_html_entity (origin);
|
||||
+ formatted_origin = g_strdup_printf ("<strong>%s</strong>", encoded_origin);
|
||||
/* Error details when a site is not loaded due to an invalid TLS certificate. */
|
||||
first_paragraph = g_strdup_printf (_("This does not look like the real %s. "
|
||||
"Attackers might be trying to steal or "
|
||||
@@ -1956,9 +1960,6 @@ format_tls_error_page (EphyWebView *vie
|
||||
|
||||
*icon_name = "channel-insecure-symbolic.svg";
|
||||
*style = "danger";
|
||||
-
|
||||
- g_free (formatted_origin);
|
||||
- g_free (first_paragraph);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1978,8 +1979,9 @@ format_unsafe_browsing_error_page (EphyW
|
||||
const char **icon_name,
|
||||
const char **style)
|
||||
{
|
||||
- char *formatted_origin;
|
||||
- char *first_paragraph;
|
||||
+ g_autofree char *encoded_origin = NULL;
|
||||
+ g_autofree char *formatted_origin = NULL;
|
||||
+ g_autofree char *first_paragraph = NULL;
|
||||
|
||||
/* Page title when a site is flagged by Google Safe Browsing verification. */
|
||||
*page_title = g_strdup_printf (_("Security Warning"));
|
||||
@@ -1987,7 +1989,8 @@ format_unsafe_browsing_error_page (EphyW
|
||||
/* Message title on the unsafe browsing error page. */
|
||||
*message_title = g_strdup (_("Unsafe website detected!"));
|
||||
|
||||
- formatted_origin = g_strdup_printf ("<strong>%s</strong>", origin);
|
||||
+ encoded_origin = ephy_encode_for_html_entity (origin);
|
||||
+ formatted_origin = g_strdup_printf ("<strong>%s</strong>", encoded_origin);
|
||||
/* Error details on the unsafe browsing error page.
|
||||
* https://developers.google.com/safe-browsing/v4/usage-limits#UserWarnings
|
||||
*/
|
||||
@@ -2045,9 +2048,6 @@ format_unsafe_browsing_error_page (EphyW
|
||||
|
||||
*icon_name = "security-high-symbolic.svg";
|
||||
*style = "danger";
|
||||
-
|
||||
- g_free (formatted_origin);
|
||||
- g_free (first_paragraph);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2061,7 +2061,8 @@ format_no_such_file_error_page (EphyWebV
|
||||
const char **icon_name,
|
||||
const char **style)
|
||||
{
|
||||
- g_autofree gchar *formatted_origin = NULL;
|
||||
+ g_autofree gchar *encoded_address = NULL;
|
||||
+ g_autofree gchar *formatted_address = NULL;
|
||||
g_autofree gchar *first_paragraph = NULL;
|
||||
g_autofree gchar *second_paragraph = NULL;
|
||||
|
||||
@@ -2071,10 +2072,11 @@ format_no_such_file_error_page (EphyWebV
|
||||
/* Message title on the no such file error page. */
|
||||
*message_title = g_strdup (_("File not found"));
|
||||
|
||||
- formatted_origin = g_strdup_printf ("<strong>%s</strong>", view->address);
|
||||
+ encoded_address = ephy_encode_for_html_entity (view->address);
|
||||
+ formatted_address = g_strdup_printf ("<strong>%s</strong>", encoded_address);
|
||||
|
||||
first_paragraph = g_strdup_printf (_("%s could not be found."),
|
||||
- formatted_origin);
|
||||
+ formatted_address);
|
||||
second_paragraph = g_strdup_printf (_("Please check the file name for "
|
||||
"capitalization or other typing errors. Also check if "
|
||||
"it has been moved, renamed, or deleted."));
|
||||
@@ -2109,19 +2111,19 @@ ephy_web_view_load_error_page (EphyWebVi
|
||||
GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
- GBytes *html_file;
|
||||
- GString *html = g_string_new ("");
|
||||
- char *origin = NULL;
|
||||
- char *lang = NULL;
|
||||
- char *page_title = NULL;
|
||||
- char *msg_title = NULL;
|
||||
- char *msg_body = NULL;
|
||||
- char *msg_details = NULL;
|
||||
- char *button_label = NULL;
|
||||
- char *hidden_button_label = NULL;
|
||||
- char *button_action = NULL;
|
||||
- char *hidden_button_action = NULL;
|
||||
- char *style_sheet = NULL;
|
||||
+ g_autoptr (GBytes) html_file = NULL;
|
||||
+ g_autoptr (GString) html = g_string_new (NULL);
|
||||
+ g_autofree char *origin = NULL;
|
||||
+ g_autofree char *lang = NULL;
|
||||
+ g_autofree char *page_title = NULL;
|
||||
+ g_autofree char *msg_title = NULL;
|
||||
+ g_autofree char *msg_body = NULL;
|
||||
+ g_autofree char *msg_details = NULL;
|
||||
+ g_autofree char *button_label = NULL;
|
||||
+ g_autofree char *hidden_button_label = NULL;
|
||||
+ g_autofree char *button_action = NULL;
|
||||
+ g_autofree char *hidden_button_action = NULL;
|
||||
+ g_autofree char *style_sheet = NULL;
|
||||
const char *button_accesskey = NULL;
|
||||
const char *hidden_button_accesskey = NULL;
|
||||
const char *icon_name = NULL;
|
||||
@@ -2261,23 +2263,9 @@ ephy_web_view_load_error_page (EphyWebVi
|
||||
button_accesskey, button_label);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
- g_bytes_unref (html_file);
|
||||
- g_free (origin);
|
||||
- g_free (lang);
|
||||
- g_free (page_title);
|
||||
- g_free (msg_title);
|
||||
- g_free (msg_body);
|
||||
- g_free (msg_details);
|
||||
- g_free (button_label);
|
||||
- g_free (button_action);
|
||||
- g_free (hidden_button_label);
|
||||
- g_free (hidden_button_action);
|
||||
- g_free (style_sheet);
|
||||
-
|
||||
/* Make our history backend ignore the next page load, since it will be an error page. */
|
||||
ephy_web_view_freeze_history (view);
|
||||
webkit_web_view_load_alternate_html (WEBKIT_WEB_VIEW (view), html->str, uri, 0);
|
||||
- g_string_free (html, TRUE);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
Index: epiphany-browser/lib/ephy-output-encoding.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ epiphany-browser/lib/ephy-output-encoding.c
|
||||
@@ -0,0 +1,117 @@
|
||||
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
+/*
|
||||
+ * Copyright © Red Hat Inc.
|
||||
+ *
|
||||
+ * This file is part of Epiphany.
|
||||
+ *
|
||||
+ * Epiphany is free software: you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation, either version 3 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * Epiphany is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with Epiphany. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include "ephy-output-encoding.h"
|
||||
+
|
||||
+#include <glib.h>
|
||||
+
|
||||
+#if !GLIB_CHECK_VERSION(2, 68, 0)
|
||||
+static guint
|
||||
+g_string_replace (GString *string,
|
||||
+ const gchar *find,
|
||||
+ const gchar *replace,
|
||||
+ guint limit)
|
||||
+{
|
||||
+ gsize f_len, r_len, pos;
|
||||
+ gchar *cur, *next;
|
||||
+ guint n = 0;
|
||||
+
|
||||
+ g_return_val_if_fail (string != NULL, 0);
|
||||
+ g_return_val_if_fail (find != NULL, 0);
|
||||
+ g_return_val_if_fail (replace != NULL, 0);
|
||||
+
|
||||
+ f_len = strlen (find);
|
||||
+ r_len = strlen (replace);
|
||||
+ cur = string->str;
|
||||
+
|
||||
+ while ((next = strstr (cur, find)) != NULL)
|
||||
+ {
|
||||
+ pos = next - string->str;
|
||||
+ g_string_erase (string, pos, f_len);
|
||||
+ g_string_insert (string, pos, replace);
|
||||
+ cur = string->str + pos + r_len;
|
||||
+ n++;
|
||||
+ /* Only match the empty string once at any given position, to
|
||||
+ * avoid infinite loops */
|
||||
+ if (f_len == 0)
|
||||
+ {
|
||||
+ if (cur[0] == '\0')
|
||||
+ break;
|
||||
+ else
|
||||
+ cur++;
|
||||
+ }
|
||||
+ if (n == limit)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return n;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+char *
|
||||
+ephy_encode_for_html_entity (const char *input)
|
||||
+{
|
||||
+ GString *str = g_string_new (input);
|
||||
+
|
||||
+ g_string_replace (str, "&", "&", 0);
|
||||
+ g_string_replace (str, "<", "<", 0);
|
||||
+ g_string_replace (str, ">", ">", 0);
|
||||
+ g_string_replace (str, "\"", """, 0);
|
||||
+ g_string_replace (str, "'", "'", 0);
|
||||
+ g_string_replace (str, "/", "/", 0);
|
||||
+
|
||||
+ return g_string_free (str, FALSE);
|
||||
+}
|
||||
+
|
||||
+static char *
|
||||
+encode_all_except_alnum (const char *input,
|
||||
+ const char *format)
|
||||
+{
|
||||
+ GString *str;
|
||||
+ const char *c = input;
|
||||
+
|
||||
+ if (!g_utf8_validate (input, -1, NULL))
|
||||
+ return g_strdup ("");
|
||||
+
|
||||
+ str = g_string_new (NULL);
|
||||
+ do {
|
||||
+ gunichar u = g_utf8_get_char (c);
|
||||
+ if (g_unichar_isalnum (u))
|
||||
+ g_string_append_unichar (str, u);
|
||||
+ else
|
||||
+ g_string_append_printf (str, format, u);
|
||||
+ c = g_utf8_next_char (c);
|
||||
+ } while (*c);
|
||||
+
|
||||
+ return g_string_free (str, FALSE);
|
||||
+}
|
||||
+
|
||||
+char *
|
||||
+ephy_encode_for_html_attribute (const char *input)
|
||||
+{
|
||||
+ return encode_all_except_alnum (input, "&#x%02x;");
|
||||
+}
|
||||
+
|
||||
+char *
|
||||
+ephy_encode_for_javascript (const char *input)
|
||||
+{
|
||||
+ return encode_all_except_alnum (input, "\\u%04u;");
|
||||
+}
|
||||
Index: epiphany-browser/lib/ephy-output-encoding.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ epiphany-browser/lib/ephy-output-encoding.h
|
||||
@@ -0,0 +1,38 @@
|
||||
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
+/*
|
||||
+ * Copyright © 2021 Red Hat Inc.
|
||||
+ *
|
||||
+ * This file is part of Epiphany.
|
||||
+ *
|
||||
+ * Epiphany is free software: you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation, either version 3 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * Epiphany is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with Epiphany. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#pragma once
|
||||
+
|
||||
+#include <glib.h>
|
||||
+
|
||||
+G_BEGIN_DECLS
|
||||
+
|
||||
+/* These functions implement the OWASP XSS prevention output encoding rules:
|
||||
+ * https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html#output-encoding-rules-summary
|
||||
+ *
|
||||
+ * You must *carefully* read that document to safely inject untrusted data into
|
||||
+ * web content. Here be dragons.
|
||||
+ */
|
||||
+
|
||||
+char *ephy_encode_for_html_entity (const char *input);
|
||||
+char *ephy_encode_for_html_attribute (const char *input);
|
||||
+char *ephy_encode_for_javascript (const char *input);
|
||||
+
|
||||
+G_END_DECLS
|
||||
Index: epiphany-browser/lib/meson.build
|
||||
===================================================================
|
||||
--- epiphany-browser.orig/lib/meson.build
|
||||
+++ epiphany-browser/lib/meson.build
|
||||
@@ -21,6 +21,7 @@ libephymisc_sources = [
|
||||
'ephy-langs.c',
|
||||
'ephy-notification.c',
|
||||
'ephy-notification-container.c',
|
||||
+ 'ephy-output-encoding.c',
|
||||
'ephy-permissions-manager.c',
|
||||
'ephy-profile-utils.c',
|
||||
'ephy-search-engine-manager.c',
|
||||
@@ -0,0 +1,117 @@
|
||||
From 63aee871365f9c9e7fa9125672302a0fb250d34d Mon Sep 17 00:00:00 2001
|
||||
From: Gert Wollny <gert.wollny@collabora.com>
|
||||
Date: Tue, 30 Nov 2021 09:16:24 +0100
|
||||
Subject: [PATCH 2/2] vrend: propperly check whether the shader image range is
|
||||
correct
|
||||
|
||||
Also add a test to check the integer underflow.
|
||||
|
||||
Closes: #251
|
||||
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
|
||||
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
|
||||
|
||||
cherry-pick from anongit.freedesktop.org/virglrenderer
|
||||
commit 2aed5d4...
|
||||
|
||||
CVE: CVE-2022-0135
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Joe Slater <joe.slater@windriver.com>
|
||||
|
||||
---
|
||||
src/vrend_decode.c | 3 +-
|
||||
tests/test_fuzzer_formats.c | 57 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 59 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/vrend_decode.c b/src/vrend_decode.c
|
||||
index 91f5f24..6771b10 100644
|
||||
--- a/src/vrend_decode.c
|
||||
+++ b/src/vrend_decode.c
|
||||
@@ -1249,8 +1249,9 @@ static int vrend_decode_set_shader_images(struct vrend_context *ctx, const uint3
|
||||
if (num_images < 1) {
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
if (start_slot > PIPE_MAX_SHADER_IMAGES ||
|
||||
- start_slot > PIPE_MAX_SHADER_IMAGES - num_images)
|
||||
+ start_slot + num_images > PIPE_MAX_SHADER_IMAGES)
|
||||
return EINVAL;
|
||||
|
||||
for (uint32_t i = 0; i < num_images; i++) {
|
||||
diff --git a/tests/test_fuzzer_formats.c b/tests/test_fuzzer_formats.c
|
||||
index 154a2e5..e32caf0 100644
|
||||
--- a/tests/test_fuzzer_formats.c
|
||||
+++ b/tests/test_fuzzer_formats.c
|
||||
@@ -958,6 +958,61 @@ static void test_vrend_set_signle_abo_heap_overflow() {
|
||||
virgl_renderer_submit_cmd((void *) cmd, ctx_id, 0xde);
|
||||
}
|
||||
|
||||
+static void test_vrend_set_shader_images_overflow()
|
||||
+{
|
||||
+ uint32_t num_shaders = PIPE_MAX_SHADER_IMAGES + 1;
|
||||
+ uint32_t size = num_shaders * VIRGL_SET_SHADER_IMAGE_ELEMENT_SIZE + 3;
|
||||
+ uint32_t cmd[size];
|
||||
+ int i = 0;
|
||||
+ cmd[i++] = ((size - 1)<< 16) | 0 << 8 | VIRGL_CCMD_SET_SHADER_IMAGES;
|
||||
+ cmd[i++] = PIPE_SHADER_FRAGMENT;
|
||||
+ memset(&cmd[i], 0, size - i);
|
||||
+
|
||||
+ virgl_renderer_submit_cmd((void *) cmd, ctx_id, size);
|
||||
+}
|
||||
+
|
||||
+/* Test adapted from yaojun8558363@gmail.com:
|
||||
+ * https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/250
|
||||
+*/
|
||||
+static void test_vrend_3d_resource_overflow() {
|
||||
+
|
||||
+ struct virgl_renderer_resource_create_args resource;
|
||||
+ resource.handle = 0x4c474572;
|
||||
+ resource.target = PIPE_TEXTURE_2D_ARRAY;
|
||||
+ resource.format = VIRGL_FORMAT_Z24X8_UNORM;
|
||||
+ resource.nr_samples = 2;
|
||||
+ resource.last_level = 0;
|
||||
+ resource.array_size = 3;
|
||||
+ resource.bind = VIRGL_BIND_SAMPLER_VIEW;
|
||||
+ resource.depth = 1;
|
||||
+ resource.width = 8;
|
||||
+ resource.height = 4;
|
||||
+ resource.flags = 0;
|
||||
+
|
||||
+ virgl_renderer_resource_create(&resource, NULL, 0);
|
||||
+ virgl_renderer_ctx_attach_resource(ctx_id, resource.handle);
|
||||
+
|
||||
+ uint32_t size = 0x400;
|
||||
+ uint32_t cmd[size];
|
||||
+ int i = 0;
|
||||
+ cmd[i++] = (size - 1) << 16 | 0 << 8 | VIRGL_CCMD_RESOURCE_INLINE_WRITE;
|
||||
+ cmd[i++] = resource.handle;
|
||||
+ cmd[i++] = 0; // level
|
||||
+ cmd[i++] = 0; // usage
|
||||
+ cmd[i++] = 0; // stride
|
||||
+ cmd[i++] = 0; // layer_stride
|
||||
+ cmd[i++] = 0; // x
|
||||
+ cmd[i++] = 0; // y
|
||||
+ cmd[i++] = 0; // z
|
||||
+ cmd[i++] = 8; // w
|
||||
+ cmd[i++] = 4; // h
|
||||
+ cmd[i++] = 3; // d
|
||||
+ memset(&cmd[i], 0, size - i);
|
||||
+
|
||||
+ virgl_renderer_submit_cmd((void *) cmd, ctx_id, size);
|
||||
+}
|
||||
+
|
||||
+
|
||||
int main()
|
||||
{
|
||||
initialize_environment();
|
||||
@@ -980,6 +1035,8 @@ int main()
|
||||
test_cs_nullpointer_deference();
|
||||
test_vrend_set_signle_abo_heap_overflow();
|
||||
|
||||
+ test_vrend_set_shader_images_overflow();
|
||||
+ test_vrend_3d_resource_overflow();
|
||||
|
||||
virgl_renderer_context_destroy(ctx_id);
|
||||
virgl_renderer_cleanup(&cookie);
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
From 5ca7aca001092c557f0b6fc1ba3db7dcdab860b7 Mon Sep 17 00:00:00 2001
|
||||
From: Gert Wollny <gert.wollny@collabora.com>
|
||||
Date: Tue, 30 Nov 2021 09:29:42 +0100
|
||||
Subject: [PATCH 1/2] vrend: clear memory when allocating a host-backed memory
|
||||
resource
|
||||
|
||||
Closes: #249
|
||||
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
|
||||
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
|
||||
|
||||
cherry-pick from anongit.freedesktop.org/virglrenderer
|
||||
commit b05bb61...
|
||||
|
||||
CVE: CVE-2022-0175
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Joe Slater <joe.slater@windriver.com>
|
||||
|
||||
Patch to vrend_renderer.c modified to apply to version used by hardknott.
|
||||
Patch to test_virgl_transfer.c unchanged.
|
||||
|
||||
Signed-off-by: Joe Slater <joe.slater@windriver.com>
|
||||
|
||||
---
|
||||
src/vrend_renderer.c | 2 +-
|
||||
tests/test_virgl_transfer.c | 51 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 52 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
|
||||
index ad7a351..d84f785 100644
|
||||
--- a/src/vrend_renderer.c
|
||||
+++ b/src/vrend_renderer.c
|
||||
@@ -6646,7 +6646,7 @@ int vrend_renderer_resource_create(struct vrend_renderer_resource_create_args *a
|
||||
if (args->bind == VIRGL_BIND_CUSTOM) {
|
||||
/* use iovec directly when attached */
|
||||
gr->storage_bits |= VREND_STORAGE_HOST_SYSTEM_MEMORY;
|
||||
- gr->ptr = malloc(args->width);
|
||||
+ gr->ptr = calloc(1, args->width);
|
||||
if (!gr->ptr) {
|
||||
FREE(gr);
|
||||
return ENOMEM;
|
||||
diff --git a/tests/test_virgl_transfer.c b/tests/test_virgl_transfer.c
|
||||
index 2c8669a..8f8e98a 100644
|
||||
--- a/tests/test_virgl_transfer.c
|
||||
+++ b/tests/test_virgl_transfer.c
|
||||
@@ -952,6 +952,56 @@ START_TEST(virgl_test_transfer_near_res_bounds_with_stride_succeeds)
|
||||
}
|
||||
END_TEST
|
||||
|
||||
+START_TEST(test_vrend_host_backed_memory_no_data_leak)
|
||||
+{
|
||||
+ struct iovec iovs[1];
|
||||
+ int niovs = 1;
|
||||
+
|
||||
+ struct virgl_context ctx = {0};
|
||||
+
|
||||
+ int ret = testvirgl_init_ctx_cmdbuf(&ctx);
|
||||
+
|
||||
+ struct virgl_renderer_resource_create_args res;
|
||||
+ res.handle = 0x400;
|
||||
+ res.target = PIPE_BUFFER;
|
||||
+ res.format = VIRGL_FORMAT_R8_UNORM;
|
||||
+ res.nr_samples = 0;
|
||||
+ res.last_level = 0;
|
||||
+ res.array_size = 1;
|
||||
+ res.bind = VIRGL_BIND_CUSTOM;
|
||||
+ res.depth = 1;
|
||||
+ res.width = 32;
|
||||
+ res.height = 1;
|
||||
+ res.flags = 0;
|
||||
+
|
||||
+ uint32_t size = 32;
|
||||
+ uint8_t* data = calloc(1, size);
|
||||
+ memset(data, 1, 32);
|
||||
+ iovs[0].iov_base = data;
|
||||
+ iovs[0].iov_len = size;
|
||||
+
|
||||
+ struct pipe_box box = {0,0,0, size, 1,1};
|
||||
+
|
||||
+ virgl_renderer_resource_create(&res, NULL, 0);
|
||||
+ virgl_renderer_ctx_attach_resource(ctx.ctx_id, res.handle);
|
||||
+
|
||||
+ ret = virgl_renderer_transfer_read_iov(res.handle, ctx.ctx_id, 0, 0, 0,
|
||||
+ (struct virgl_box *)&box, 0, iovs, niovs);
|
||||
+
|
||||
+ ck_assert_int_eq(ret, 0);
|
||||
+
|
||||
+ for (int i = 0; i < 32; ++i)
|
||||
+ ck_assert_int_eq(data[i], 0);
|
||||
+
|
||||
+ virgl_renderer_ctx_detach_resource(1, res.handle);
|
||||
+
|
||||
+ virgl_renderer_resource_unref(res.handle);
|
||||
+ free(data);
|
||||
+
|
||||
+}
|
||||
+END_TEST
|
||||
+
|
||||
+
|
||||
static Suite *virgl_init_suite(void)
|
||||
{
|
||||
Suite *s;
|
||||
@@ -981,6 +1031,7 @@ static Suite *virgl_init_suite(void)
|
||||
tcase_add_test(tc_core, virgl_test_transfer_buffer_bad_strides);
|
||||
tcase_add_test(tc_core, virgl_test_transfer_2d_array_bad_layer_stride);
|
||||
tcase_add_test(tc_core, virgl_test_transfer_2d_bad_level);
|
||||
+ tcase_add_test(tc_core, test_vrend_host_backed_memory_no_data_leak);
|
||||
|
||||
tcase_add_loop_test(tc_core, virgl_test_transfer_res_read_valid, 0, PIPE_MAX_TEXTURE_TYPES);
|
||||
tcase_add_loop_test(tc_core, virgl_test_transfer_res_write_valid, 0, PIPE_MAX_TEXTURE_TYPES);
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -10,9 +10,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10"
|
||||
|
||||
DEPENDS = "libdrm virtual/libgl libepoxy"
|
||||
SRCREV = "7d204f3927be65fb3365dce01dbcd04d447a4985"
|
||||
SRC_URI = "git://anongit.freedesktop.org/virglrenderer;branch=master \
|
||||
SRC_URI = "git://anongit.freedesktop.org/git/virglrenderer;branch=master \
|
||||
file://0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch \
|
||||
file://0001-meson.build-use-python3-directly-for-python.patch \
|
||||
file://cve-2022-0135.patch \
|
||||
file://cve-2022-0175.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -72,7 +72,7 @@ LICENSE = "\
|
||||
LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \
|
||||
file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
|
||||
file://LICENSE.amdgpu;md5=d357524f5099e2a3db3c1838921c593f \
|
||||
file://LICENSE.amdgpu;md5=44c1166d052226cb2d6c8d7400090203 \
|
||||
file://LICENSE.amd-ucode;md5=3c5399dc9148d7f0e1f41e34b69cf14f \
|
||||
file://LICENSE.amlogic_vdec;md5=dc44f59bf64a81643e500ad3f39a468a \
|
||||
file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
|
||||
@@ -132,7 +132,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
|
||||
file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
|
||||
file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
|
||||
file://WHENCE;md5=79f477f9d53eedee5a65b45193785963 \
|
||||
file://WHENCE;md5=45a9c4a92d152e9495db81e1192f2bdc \
|
||||
"
|
||||
|
||||
# These are not common licenses, set NO_GENERIC_LICENSE for them
|
||||
@@ -205,7 +205,7 @@ PE = "1"
|
||||
|
||||
SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/firmware/${BPN}-${PV}.tar.xz"
|
||||
|
||||
SRC_URI[sha256sum] = "eeddb4e6bef31fd1a3757f12ccc324929bbad97855c0b9ec5ed780f74de1837d"
|
||||
SRC_URI[sha256sum] = "5938ee717b2023b48f6bfcf344b40ddc947e3e22c0bc36d4c3418f90fea68182"
|
||||
|
||||
inherit allarch
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "53a27dc510c8d9152ffa4d2d95b888db7d3d97b6"
|
||||
SRCREV_meta ?= "a58f4e7cca3973e04d3f9a40356ef9c2c0bb10a5"
|
||||
SRCREV_machine ?= "7f96d3fd60eea0ab38afdf07b3fc7c8c9f501802"
|
||||
SRCREV_meta ?= "24ab54209a8822aad92afe2c51ea5b95f5175394"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
|
||||
|
||||
LINUX_VERSION ?= "5.10.99"
|
||||
LINUX_VERSION ?= "5.10.107"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
|
||||
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
LINUX_VERSION ?= "5.10.99"
|
||||
LINUX_VERSION ?= "5.10.107"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
|
||||
KMETA = "kernel-meta"
|
||||
KCONF_BSP_AUDIT_LEVEL = "2"
|
||||
|
||||
SRCREV_machine_qemuarm ?= "b7823b6ac25671f8dc5ee2c4cf74af3be88207cf"
|
||||
SRCREV_machine ?= "7558a33fc5b60d4327b683c3376c5352cba11ed1"
|
||||
SRCREV_meta ?= "a58f4e7cca3973e04d3f9a40356ef9c2c0bb10a5"
|
||||
SRCREV_machine_qemuarm ?= "d47f1b40f2f77d0c810defd853c69eb39cb84bf5"
|
||||
SRCREV_machine ?= "1ae0844c6a36151066744e43fd30db3a946bc21d"
|
||||
SRCREV_meta ?= "24ab54209a8822aad92afe2c51ea5b95f5175394"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -13,17 +13,17 @@ KBRANCH_qemux86 ?= "v5.10/standard/base"
|
||||
KBRANCH_qemux86-64 ?= "v5.10/standard/base"
|
||||
KBRANCH_qemumips64 ?= "v5.10/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine_qemuarm ?= "c3a59bad41cefbe15d6bcde0ec2fe5c7ea28ba2b"
|
||||
SRCREV_machine_qemuarm64 ?= "07ca3e3c85445f2c31bd081b27741c9680536168"
|
||||
SRCREV_machine_qemumips ?= "10ae40d47f14b3c05dd6506c70576383c5474670"
|
||||
SRCREV_machine_qemuppc ?= "bc2a7c884103143e0a4360518247fe01bf2c13d3"
|
||||
SRCREV_machine_qemuriscv64 ?= "84f6a75f64961e59d61bf3d70ab17e8bb430386b"
|
||||
SRCREV_machine_qemuriscv32 ?= "84f6a75f64961e59d61bf3d70ab17e8bb430386b"
|
||||
SRCREV_machine_qemux86 ?= "84f6a75f64961e59d61bf3d70ab17e8bb430386b"
|
||||
SRCREV_machine_qemux86-64 ?= "84f6a75f64961e59d61bf3d70ab17e8bb430386b"
|
||||
SRCREV_machine_qemumips64 ?= "13998bd0244737548a21a17d1969ca65af0712b1"
|
||||
SRCREV_machine ?= "84f6a75f64961e59d61bf3d70ab17e8bb430386b"
|
||||
SRCREV_meta ?= "a58f4e7cca3973e04d3f9a40356ef9c2c0bb10a5"
|
||||
SRCREV_machine_qemuarm ?= "2ef8231651bb6a4c79b307f59a794b92238546ec"
|
||||
SRCREV_machine_qemuarm64 ?= "00684b441f15d202c5849eed164a9b3b94a5c1e8"
|
||||
SRCREV_machine_qemumips ?= "661a4f517906253e074fe301d68ff1e6b6968e9f"
|
||||
SRCREV_machine_qemuppc ?= "bff933cb7a11019c64e6034c48ab79453f75b99e"
|
||||
SRCREV_machine_qemuriscv64 ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27"
|
||||
SRCREV_machine_qemuriscv32 ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27"
|
||||
SRCREV_machine_qemux86 ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27"
|
||||
SRCREV_machine_qemux86-64 ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27"
|
||||
SRCREV_machine_qemumips64 ?= "7a89b456542ff1fa0ab71fa4a2ae6f04281f3a2d"
|
||||
SRCREV_machine ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27"
|
||||
SRCREV_meta ?= "24ab54209a8822aad92afe2c51ea5b95f5175394"
|
||||
|
||||
# remap qemuarm to qemuarma15 for the 5.8 kernel
|
||||
# KMACHINE_qemuarm ?= "qemuarma15"
|
||||
@@ -32,7 +32,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
LINUX_VERSION ?= "5.10.99"
|
||||
LINUX_VERSION ?= "5.10.107"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -13,7 +13,7 @@ SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
|
||||
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "95ac2a2cf92d85d23ffbdaca6a1ec0d7c167211d1e0fb850ab90004a3f475eaa"
|
||||
SRC_URI[sha256sum] = "1302005a982fd4a15cc4843866971008546939f65660023d7762aa046d4b9213"
|
||||
|
||||
export INSTALL_MOD_DIR="kernel/lttng-modules"
|
||||
|
||||
@@ -5,7 +5,7 @@ LICENSE = "ISC"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
|
||||
|
||||
SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
|
||||
SRC_URI[sha256sum] = "cff370c410d1e6d316ae0a7fa8ac6278fdf1efca5d3d664aca7cfd2aafa54446"
|
||||
SRC_URI[sha256sum] = "8828c25a4ee25020044004f57374bb9deac852809fad70f8d3d01770bf9ac97f"
|
||||
|
||||
inherit bin_package allarch
|
||||
|
||||
41
meta/recipes-multimedia/flac/flac/CVE-2021-0561.patch
Normal file
41
meta/recipes-multimedia/flac/flac/CVE-2021-0561.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be Mon Sep 17 00:00:00 2001
|
||||
From: Neelkamal Semwal <neelkamal.semwal@ittiam.com>
|
||||
Date: Fri, 18 Dec 2020 22:28:36 +0530
|
||||
Subject: [PATCH] libFlac: Exit at EOS in verify mode
|
||||
|
||||
When verify mode is enabled, once decoder flags end of stream,
|
||||
encode processing is considered complete.
|
||||
|
||||
CVE-2021-0561
|
||||
|
||||
Signed-off-by: Ralph Giles <giles@thaumas.net>
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2021-0561
|
||||
|
||||
Reference to upstream patch:
|
||||
https://github.com/xiph/flac/commit/e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be
|
||||
|
||||
Signed-off-by: Li Wang <li.wang@windriver.com>
|
||||
---
|
||||
src/libFLAC/stream_encoder.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c
|
||||
index 74387ec..8bb0ef3 100644
|
||||
--- a/src/libFLAC/stream_encoder.c
|
||||
+++ b/src/libFLAC/stream_encoder.c
|
||||
@@ -2610,7 +2610,9 @@ FLAC__bool write_bitbuffer_(FLAC__StreamEncoder *encoder, uint32_t samples, FLAC
|
||||
encoder->private_->verify.needs_magic_hack = true;
|
||||
}
|
||||
else {
|
||||
- if(!FLAC__stream_decoder_process_single(encoder->private_->verify.decoder)) {
|
||||
+ if(!FLAC__stream_decoder_process_single(encoder->private_->verify.decoder)
|
||||
+ || (!is_last_block
|
||||
+ && (FLAC__stream_encoder_get_verify_decoder_state(encoder) == FLAC__STREAM_DECODER_END_OF_STREAM))) {
|
||||
FLAC__bitwriter_release_buffer(encoder->private_->frame);
|
||||
FLAC__bitwriter_clear(encoder->private_->frame);
|
||||
if(encoder->protected_->state != FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \
|
||||
DEPENDS = "libogg"
|
||||
|
||||
SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \
|
||||
file://CVE-2021-0561.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "26703ed2858c1fc9ffc05136d13daa69"
|
||||
|
||||
@@ -12,7 +12,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${PV}
|
||||
file://0001-connect-has-a-different-signature-on-musl.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "ffbd194c40912cb5e7fca2863648bf9dd8257b7af97d3a60c4fcd4efd8526ccf"
|
||||
SRC_URI[sha256sum] = "3725622c740a635452e54b79d065f963ab7706ca2403de6c43072ae7610a0de4"
|
||||
|
||||
DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base"
|
||||
RRECOMMENDS_${PN} = "git"
|
||||
@@ -12,7 +12,7 @@ SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gst-examples.git;protocol=http
|
||||
file://gst-player.desktop \
|
||||
"
|
||||
|
||||
SRCREV = "959bb246a5b1f5f9c78557da11c3f22b42ff89c0"
|
||||
SRCREV = "70e4fcf4fc8ae19641aa990de5f37d758cdfcea4"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
|
||||
"
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz"
|
||||
SRC_URI[sha256sum] = "344a463badca216c2cef6ee36f9510c190862bdee48dc4591c0a430df7e8c396"
|
||||
SRC_URI[sha256sum] = "e4e50dcd5a29441ae34de60d2221057e8064ed824bb6ca4dc0fd9ee88fbe9b81"
|
||||
|
||||
S = "${WORKDIR}/gst-libav-${PV}"
|
||||
|
||||
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
|
||||
|
||||
SRC_URI[sha256sum] = "e35051cf891eb2f31d6fcf176ff37d985f97f33874ac31b0b3ad3b5b95035043"
|
||||
SRC_URI[sha256sum] = "b5281c938e959fd2418e989cfb6065fdd9fe5f6f87ee86236c9427166e708163"
|
||||
|
||||
S = "${WORKDIR}/gst-omx-${PV}"
|
||||
|
||||
@@ -11,7 +11,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad
|
||||
file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
|
||||
file://0005-msdk-fix-includedir-path.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "74e806bc5595b18c70e9ca93571e27e79dfb808e5d2e7967afa952b52e99c85f"
|
||||
SRC_URI[sha256sum] = "0b1b50ac6311f0c510248b6cd64d6d3c94369344828baa602db85ded5bc70ec9"
|
||||
|
||||
S = "${WORKDIR}/gst-plugins-bad-${PV}"
|
||||
|
||||
@@ -12,7 +12,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-ba
|
||||
file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
|
||||
file://0004-glimagesink-Downrank-to-marginal.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "29e53229a84d01d722f6f6db13087231cdf6113dd85c25746b9b58c3d68e8323"
|
||||
SRC_URI[sha256sum] = "56a9ff2fe9e6603b9e658cf6897d412a173d2180829fe01e92568549c6bd0f5b"
|
||||
|
||||
S = "${WORKDIR}/gst-plugins-base-${PV}"
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From ec1949dffd931d0ec7e4f67108a08ab1e2af0cfe Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
|
||||
Date: Tue, 16 Mar 2021 19:25:36 +0200
|
||||
Subject: [PATCH] rtpjitterbuffer: Fix parsing of the mediaclk:direct= field
|
||||
|
||||
Due to an off-by-one when parsing the string, the most significant digit
|
||||
or the clock offset was skipped when parsing the offset.
|
||||
|
||||
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/910>
|
||||
|
||||
Upstream-Status: Backport [b5bb4ede3a42273fafc1054f9cf106ca527e3c26]
|
||||
|
||||
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
|
||||
---
|
||||
gst/rtpmanager/gstrtpjitterbuffer.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c
|
||||
index 60d8ad875..02fe15adc 100644
|
||||
--- a/gst/rtpmanager/gstrtpjitterbuffer.c
|
||||
+++ b/gst/rtpmanager/gstrtpjitterbuffer.c
|
||||
@@ -1534,7 +1534,7 @@ gst_jitter_buffer_sink_parse_caps (GstRtpJitterBuffer * jitterbuffer,
|
||||
GST_DEBUG_OBJECT (jitterbuffer, "Got media clock %s", mediaclk);
|
||||
|
||||
if (!g_str_has_prefix (mediaclk, "direct=") ||
|
||||
- !g_ascii_string_to_unsigned (&mediaclk[8], 10, 0, G_MAXUINT64,
|
||||
+ !g_ascii_string_to_unsigned (&mediaclk[7], 10, 0, G_MAXUINT64,
|
||||
&clock_offset, NULL))
|
||||
GST_FIXME_OBJECT (jitterbuffer, "Unsupported media clock");
|
||||
if (strstr (mediaclk, "rate=") != NULL) {
|
||||
--
|
||||
2.31.0
|
||||
|
||||
@@ -6,10 +6,9 @@ BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
|
||||
file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \
|
||||
file://0002-rtpjitterbuffer-Fix-parsing-of-the-mediaclk-direct-f.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "b6e50e3a9bbcd56ee6ec71c33aa8332cc9c926b0c1fae995aac8b3040ebe39b0"
|
||||
SRC_URI[sha256sum] = "26723ac01fcb360ade1f41d168c7c322d8af4ceb7e55c8c12ed2690d06a76eed"
|
||||
|
||||
S = "${WORKDIR}/gst-plugins-good-${PV}"
|
||||
|
||||
@@ -13,7 +13,7 @@ LICENSE_FLAGS = "commercial"
|
||||
SRC_URI = " \
|
||||
https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
|
||||
"
|
||||
SRC_URI[sha256sum] = "218df0ce0d31e8ca9cdeb01a3b0c573172cc9c21bb3d41811c7820145623d13c"
|
||||
SRC_URI[sha256sum] = "4969c409cb6a88317d2108b8577108e18623b2333d7b587ae3f39459c70e3a7f"
|
||||
|
||||
S = "${WORKDIR}/gst-plugins-ugly-${PV}"
|
||||
|
||||
@@ -8,7 +8,7 @@ LICENSE = "LGPLv2.1"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
|
||||
SRC_URI[sha256sum] = "cb68e08a7e825e08b83a12a22dcd6e4f1b328a7b02a7ac84f42f68f4ddc7098e"
|
||||
SRC_URI[sha256sum] = "bdc0ea22fbd7335ad9decc151561aacc53c51206a9735b81eac700ce5b0bbd4a"
|
||||
|
||||
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
|
||||
RDEPENDS_${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
|
||||
@@ -10,7 +10,7 @@ PNREAL = "gst-rtsp-server"
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
|
||||
|
||||
SRC_URI[sha256sum] = "a46bb8de40b971a048580279d2660e616796f871ad3ed00c8a95fe4d273a6c94"
|
||||
SRC_URI[sha256sum] = "826f32afbcf94b823541efcac4a0dacdb62f6145ef58f363095749f440262be9"
|
||||
|
||||
S = "${WORKDIR}/${PNREAL}-${PV}"
|
||||
|
||||
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz"
|
||||
|
||||
SRC_URI[sha256sum] = "92db98af86f3150d429c9ab17e88d2364f9c07a140c8f445ed739e8f10252aea"
|
||||
SRC_URI[sha256sum] = "ab6270f1e5e4546fbe6f5ea246d86ca3d196282eb863d46e6cdcc96f867449e0"
|
||||
|
||||
S = "${WORKDIR}/${REALPN}-${PV}"
|
||||
DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
|
||||
@@ -1,4 +1,4 @@
|
||||
From 598d108e2c438d8f2ecd3bf948fa3ebbd3681490 Mon Sep 17 00:00:00 2001
|
||||
From e275ba2bd854ac15a4b65a8f07d9f042021950da Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
|
||||
Date: Fri, 14 Aug 2020 16:38:26 +0100
|
||||
Subject: [PATCH 2/3] Remove unused valgrind detection
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
|
||||
3 files changed, 42 deletions(-)
|
||||
|
||||
diff --git a/gst/gst_private.h b/gst/gst_private.h
|
||||
index eefd044d9..8252ede51 100644
|
||||
index eefd044..8252ede 100644
|
||||
--- a/gst/gst_private.h
|
||||
+++ b/gst/gst_private.h
|
||||
@@ -116,8 +116,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin
|
||||
@@ -32,12 +32,12 @@ index eefd044d9..8252ede51 100644
|
||||
G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void);
|
||||
G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void);
|
||||
diff --git a/gst/gstinfo.c b/gst/gstinfo.c
|
||||
index 5d317877b..097f8b20d 100644
|
||||
index eea1a21..d3035d6 100644
|
||||
--- a/gst/gstinfo.c
|
||||
+++ b/gst/gstinfo.c
|
||||
@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT;
|
||||
static volatile gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT;
|
||||
static volatile gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON;
|
||||
static gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT;
|
||||
static gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON;
|
||||
|
||||
-/* FIXME: export this? */
|
||||
-gboolean
|
||||
@@ -82,7 +82,7 @@ index 5d317877b..097f8b20d 100644
|
||||
env = g_getenv ("GST_DEBUG_OPTIONS");
|
||||
if (env != NULL) {
|
||||
if (strstr (env, "full_tags") || strstr (env, "full-tags"))
|
||||
@@ -2503,12 +2470,6 @@ gst_debug_construct_win_color (guint colorinfo)
|
||||
@@ -2505,12 +2472,6 @@ gst_debug_construct_win_color (guint colorinfo)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ index 5d317877b..097f8b20d 100644
|
||||
_gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file,
|
||||
const gchar * func, gint line, GObject * obj, const gchar * msg,
|
||||
diff --git a/meson.build b/meson.build
|
||||
index ce1921aa4..7a84d0981 100644
|
||||
index 82a1728..42ae617 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -200,7 +200,6 @@ check_headers = [
|
||||
|
||||
@@ -21,7 +21,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.x
|
||||
file://0003-meson-Add-option-for-installed-tests.patch \
|
||||
file://0001-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "9aeec99b38e310817012aa2d1d76573b787af47f8a725a65b833880a094dfbc5"
|
||||
SRC_URI[sha256sum] = "4ec816010dd4d3a93cf470ad0a6f25315f52b204eb1d71dfa70ab8a1c3bd06e6"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
|
||||
check \
|
||||
@@ -25,7 +25,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
|
||||
file://CVE-2021-42762.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f"
|
||||
SRC_URI[sha256sum] = "50736ec7a91770b5939d715196e5fe7209b93efcdeef425b24dc51fb8e9d7c1e"
|
||||
|
||||
inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc
|
||||
|
||||
@@ -27,7 +27,7 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
|
||||
file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
|
||||
file://0001-Makefile.am-add-a-missing-space.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "97ebe4f94e2f7e35b752194ce15a0f3c66324e0ff6af26659bbfb5ff2ec328fd"
|
||||
SRC_URI[sha256sum] = "ea849c83a72454e3ed4267697e8ca03390aee972ab421e7df69dfe42b65caaf7"
|
||||
|
||||
# Below whitelisted CVEs are disputed and not affecting crypto libraries for any distro.
|
||||
CVE_CHECK_WHITELIST += "CVE-2018-12433 CVE-2018-12438"
|
||||
@@ -10,7 +10,8 @@ DEPENDS = "ncurses gettext-native"
|
||||
RSUGGESTS_${PN} = "diffutils"
|
||||
|
||||
LICENSE = "vim"
|
||||
LIC_FILES_CHKSUM = "file://runtime/doc/uganda.txt;endline=287;md5=909f1394892b7e0f9c2a95306c0c552b"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=6b30ea4fa660c483b619924bc709ef99 \
|
||||
file://runtime/doc/uganda.txt;md5=a3f193c20c6faff93c69185d5d070535"
|
||||
|
||||
SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
|
||||
file://disable_acl_header_check.patch \
|
||||
@@ -20,8 +21,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
|
||||
file://racefix.patch \
|
||||
"
|
||||
|
||||
PV .= ".4269"
|
||||
SRCREV = "48a604845e33399893d6bf293e71bcd2a412800d"
|
||||
PV .= ".4524"
|
||||
SRCREV = "d8f8629b1bf566e1dada7515e9b146c69e5d9757"
|
||||
|
||||
# Do not consider .z in x.y.z, as that is updated with every commit
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
import sys
|
||||
import os
|
||||
import argparse
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
# Ensure PythonGit is installed (buildhistory_analysis needs it)
|
||||
try:
|
||||
@@ -73,10 +72,6 @@ def main():
|
||||
parser = get_args_parser()
|
||||
args = parser.parse_args()
|
||||
|
||||
if LooseVersion(git.__version__) < '0.3.1':
|
||||
sys.stderr.write("Version of GitPython is too old, please install GitPython (python-git) 0.3.1 or later in order to use this script\n")
|
||||
sys.exit(1)
|
||||
|
||||
if len(args.revisions) > 2:
|
||||
sys.stderr.write('Invalid argument(s) specified: %s\n\n' % ' '.join(args.revisions[2:]))
|
||||
parser.print_help()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user