mirror of
https://git.yoctoproject.org/poky
synced 2026-02-26 19:39:40 +01:00
Compare commits
112 Commits
dunfell-23
...
dunfell-23
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ebb33bdac | ||
|
|
f22c2d6670 | ||
|
|
697be011a8 | ||
|
|
97039a5db6 | ||
|
|
2f920fcca1 | ||
|
|
e7a5814b4b | ||
|
|
bf94fcbeef | ||
|
|
08710428dd | ||
|
|
2202a98337 | ||
|
|
cf6cbc12cb | ||
|
|
ed808ad2f3 | ||
|
|
3b9c61c587 | ||
|
|
58930f3953 | ||
|
|
4d059ba9fd | ||
|
|
a63d9b7e65 | ||
|
|
fd78d060d5 | ||
|
|
1eeb749f01 | ||
|
|
76c2624a1f | ||
|
|
4f428303e0 | ||
|
|
0cbb701834 | ||
|
|
62c3960c3a | ||
|
|
d3d626d93f | ||
|
|
759b62688b | ||
|
|
8f2798ddbf | ||
|
|
f9a754faa6 | ||
|
|
b819be5f6a | ||
|
|
2ddbc1b1b9 | ||
|
|
dbcc366e84 | ||
|
|
53ba676278 | ||
|
|
593eb7ab96 | ||
|
|
584f3a42c9 | ||
|
|
c2332f72a2 | ||
|
|
6ac9ed94d2 | ||
|
|
bdbeec0051 | ||
|
|
506f5d667b | ||
|
|
a055df95c1 | ||
|
|
75a8784a0b | ||
|
|
faad90591c | ||
|
|
519563788c | ||
|
|
515203d45c | ||
|
|
5471428610 | ||
|
|
60e33c1c4a | ||
|
|
766ba72f56 | ||
|
|
97a9f30f1c | ||
|
|
1e4d928f31 | ||
|
|
b604159422 | ||
|
|
61dc70732b | ||
|
|
b0bcec532d | ||
|
|
1c0af37378 | ||
|
|
85866a453c | ||
|
|
8eec52f483 | ||
|
|
5c1a6a8f81 | ||
|
|
a51996d684 | ||
|
|
30f48b461e | ||
|
|
5d0c428946 | ||
|
|
c74bca902b | ||
|
|
e6bf1590cc | ||
|
|
06f80cd38a | ||
|
|
a767a71406 | ||
|
|
c437e512dd | ||
|
|
5062453803 | ||
|
|
4d9ad1e3c4 | ||
|
|
0da39d894e | ||
|
|
0a4fd33a15 | ||
|
|
075b2249c5 | ||
|
|
ce3423ea18 | ||
|
|
416eef4a07 | ||
|
|
9f7559aa4f | ||
|
|
34597b96d9 | ||
|
|
17f41be0f4 | ||
|
|
7cfa913ca1 | ||
|
|
ea63f713b3 | ||
|
|
945b4ef084 | ||
|
|
333fbe6355 | ||
|
|
3f318ade1c | ||
|
|
f041f7c35f | ||
|
|
5695d60572 | ||
|
|
d2691d772d | ||
|
|
7d86fc1d9f | ||
|
|
9e68bd2c94 | ||
|
|
1ee02f662c | ||
|
|
79998ab952 | ||
|
|
320f059a9b | ||
|
|
fa3e840926 | ||
|
|
76b14fe524 | ||
|
|
ee332add6d | ||
|
|
f23e0a1b0a | ||
|
|
71818465cb | ||
|
|
cd75b4c7a7 | ||
|
|
1661a4f971 | ||
|
|
99b43fd223 | ||
|
|
adc56be6d4 | ||
|
|
2d21ece11a | ||
|
|
eb3fd65b42 | ||
|
|
4aae7b8490 | ||
|
|
059c62dcc9 | ||
|
|
18421b909b | ||
|
|
871de5c14d | ||
|
|
ff15dd023e | ||
|
|
229db6be9d | ||
|
|
f40adc9148 | ||
|
|
b0cb809fb9 | ||
|
|
1c0af77e5f | ||
|
|
8f7d34d135 | ||
|
|
7115641813 | ||
|
|
f8c3d7aeb3 | ||
|
|
ad0deaf104 | ||
|
|
723e15ccd1 | ||
|
|
5ec80538bd | ||
|
|
548397c156 | ||
|
|
a225f167d0 | ||
|
|
d685a71c23 |
@@ -388,7 +388,7 @@ class Git(FetchMethod):
|
||||
tmpdir = tempfile.mkdtemp(dir=d.getVar('DL_DIR'))
|
||||
try:
|
||||
# Do the checkout. This implicitly involves a Git LFS fetch.
|
||||
self.unpack(ud, tmpdir, d)
|
||||
Git.unpack(self, ud, tmpdir, d)
|
||||
|
||||
# Scoop up a copy of any stuff that Git LFS downloaded. Merge them into
|
||||
# the bare clonedir.
|
||||
|
||||
@@ -151,7 +151,7 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
|
||||
if item:
|
||||
itemstr = " (for item %s)" % item
|
||||
if preferred_file is None:
|
||||
logger.info("preferred version %s of %s not available%s", pv_str, pn, itemstr)
|
||||
logger.warn("preferred version %s of %s not available%s", pv_str, pn, itemstr)
|
||||
available_vers = []
|
||||
for file_set in pkg_pn:
|
||||
for f in file_set:
|
||||
@@ -163,7 +163,7 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
|
||||
available_vers.append(ver_str)
|
||||
if available_vers:
|
||||
available_vers.sort()
|
||||
logger.info("versions of %s available: %s", pn, ' '.join(available_vers))
|
||||
logger.warn("versions of %s available: %s", pn, ' '.join(available_vers))
|
||||
else:
|
||||
logger.debug(1, "selecting %s as PREFERRED_VERSION %s of package %s%s", preferred_file, pv_str, pn, itemstr)
|
||||
|
||||
|
||||
@@ -2789,6 +2789,7 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
|
||||
sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary)
|
||||
|
||||
sqdata.hashes = {}
|
||||
sqrq.sq_deferred = {}
|
||||
for mc in sorted(sqdata.multiconfigs):
|
||||
for tid in sorted(sqdata.sq_revdeps):
|
||||
if mc_from_tid(tid) != mc:
|
||||
@@ -2801,6 +2802,9 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
|
||||
continue
|
||||
if tid in sqrq.scenequeue_notcovered:
|
||||
continue
|
||||
if tid in sqrq.scenequeue_covered:
|
||||
continue
|
||||
|
||||
sqdata.outrightfail.add(tid)
|
||||
|
||||
h = pending_hash_index(tid, rqdata)
|
||||
|
||||
@@ -371,6 +371,7 @@ class FetcherTest(unittest.TestCase):
|
||||
if os.environ.get("BB_TMPDIR_NOCLEAN") == "yes":
|
||||
print("Not cleaning up %s. Please remove manually." % self.tempdir)
|
||||
else:
|
||||
bb.process.run('chmod u+rw -R %s' % self.tempdir)
|
||||
bb.utils.prunedir(self.tempdir)
|
||||
|
||||
class MirrorUriTest(FetcherTest):
|
||||
@@ -845,6 +846,8 @@ class FetcherNetworkTest(FetcherTest):
|
||||
prefix='gitfetch_localusehead_')
|
||||
src_dir = os.path.abspath(src_dir)
|
||||
bb.process.run("git init", cwd=src_dir)
|
||||
bb.process.run("git config user.email 'you@example.com'", cwd=src_dir)
|
||||
bb.process.run("git config user.name 'Your Name'", cwd=src_dir)
|
||||
bb.process.run("git commit --allow-empty -m'Dummy commit'",
|
||||
cwd=src_dir)
|
||||
# Use other branch than master
|
||||
@@ -1328,6 +1331,8 @@ class GitMakeShallowTest(FetcherTest):
|
||||
self.gitdir = os.path.join(self.tempdir, 'gitshallow')
|
||||
bb.utils.mkdirhier(self.gitdir)
|
||||
bb.process.run('git init', cwd=self.gitdir)
|
||||
bb.process.run('git config user.email "you@example.com"', cwd=self.gitdir)
|
||||
bb.process.run('git config user.name "Your Name"', cwd=self.gitdir)
|
||||
|
||||
def assertRefs(self, expected_refs):
|
||||
actual_refs = self.git(['for-each-ref', '--format=%(refname)']).splitlines()
|
||||
@@ -1451,6 +1456,8 @@ class GitShallowTest(FetcherTest):
|
||||
|
||||
bb.utils.mkdirhier(self.srcdir)
|
||||
self.git('init', cwd=self.srcdir)
|
||||
self.git('config user.email "you@example.com"', cwd=self.srcdir)
|
||||
self.git('config user.name "Your Name"', cwd=self.srcdir)
|
||||
self.d.setVar('WORKDIR', self.tempdir)
|
||||
self.d.setVar('S', self.gitdir)
|
||||
self.d.delVar('PREMIRRORS')
|
||||
@@ -1532,6 +1539,7 @@ class GitShallowTest(FetcherTest):
|
||||
|
||||
# fetch and unpack, from the shallow tarball
|
||||
bb.utils.remove(self.gitdir, recurse=True)
|
||||
bb.process.run('chmod u+w -R "%s"' % ud.clonedir)
|
||||
bb.utils.remove(ud.clonedir, recurse=True)
|
||||
bb.utils.remove(ud.clonedir.replace('gitsource', 'gitsubmodule'), recurse=True)
|
||||
|
||||
@@ -1684,6 +1692,8 @@ class GitShallowTest(FetcherTest):
|
||||
smdir = os.path.join(self.tempdir, 'gitsubmodule')
|
||||
bb.utils.mkdirhier(smdir)
|
||||
self.git('init', cwd=smdir)
|
||||
self.git('config user.email "you@example.com"', cwd=smdir)
|
||||
self.git('config user.name "Your Name"', cwd=smdir)
|
||||
# Make this look like it was cloned from a remote...
|
||||
self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir)
|
||||
self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir)
|
||||
@@ -1714,6 +1724,8 @@ class GitShallowTest(FetcherTest):
|
||||
smdir = os.path.join(self.tempdir, 'gitsubmodule')
|
||||
bb.utils.mkdirhier(smdir)
|
||||
self.git('init', cwd=smdir)
|
||||
self.git('config user.email "you@example.com"', cwd=smdir)
|
||||
self.git('config user.name "Your Name"', cwd=smdir)
|
||||
# Make this look like it was cloned from a remote...
|
||||
self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir)
|
||||
self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir)
|
||||
@@ -1756,8 +1768,8 @@ class GitShallowTest(FetcherTest):
|
||||
self.git('annex init', cwd=self.srcdir)
|
||||
open(os.path.join(self.srcdir, 'c'), 'w').close()
|
||||
self.git('annex add c', cwd=self.srcdir)
|
||||
self.git('commit -m annex-c -a', cwd=self.srcdir)
|
||||
bb.process.run('chmod u+w -R %s' % os.path.join(self.srcdir, '.git', 'annex'))
|
||||
self.git('commit --author "Foo Bar <foo@bar>" -m annex-c -a', cwd=self.srcdir)
|
||||
bb.process.run('chmod u+w -R %s' % self.srcdir)
|
||||
|
||||
uri = 'gitannex://%s;protocol=file;subdir=${S}' % self.srcdir
|
||||
fetcher, ud = self.fetch_shallow(uri)
|
||||
@@ -2032,6 +2044,8 @@ class GitLfsTest(FetcherTest):
|
||||
|
||||
bb.utils.mkdirhier(self.srcdir)
|
||||
self.git('init', cwd=self.srcdir)
|
||||
self.git('config user.email "you@example.com"', cwd=self.srcdir)
|
||||
self.git('config user.name "Your Name"', cwd=self.srcdir)
|
||||
with open(os.path.join(self.srcdir, '.gitattributes'), 'wt') as attrs:
|
||||
attrs.write('*.mp3 filter=lfs -text')
|
||||
self.git(['add', '.gitattributes'], cwd=self.srcdir)
|
||||
|
||||
@@ -16,7 +16,7 @@ import os
|
||||
import sys
|
||||
import datetime
|
||||
|
||||
current_version = "3.1.7"
|
||||
current_version = "3.1.8"
|
||||
|
||||
# String used in sidebar
|
||||
version = 'Version: ' + current_version
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
DISTRO : "3.1.7"
|
||||
DISTRO : "3.1.8"
|
||||
DISTRO_NAME_NO_CAP : "dunfell"
|
||||
DISTRO_NAME : "Dunfell"
|
||||
DISTRO_NAME_NO_CAP_MINUS_ONE : "zeus"
|
||||
YOCTO_DOC_VERSION : "3.1.7"
|
||||
YOCTO_DOC_VERSION : "3.1.8"
|
||||
YOCTO_DOC_VERSION_MINUS_ONE : "3.0.2"
|
||||
DISTRO_REL_TAG : "yocto-3.1.7"
|
||||
POKYVERSION : "23.0.7"
|
||||
DISTRO_REL_TAG : "yocto-3.1.8"
|
||||
POKYVERSION : "23.0.8"
|
||||
YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
|
||||
YOCTO_DL_URL : "https://downloads.yoctoproject.org"
|
||||
YOCTO_AB_URL : "https://autobuilder.yoctoproject.org"
|
||||
|
||||
@@ -55,6 +55,8 @@ distributions:
|
||||
|
||||
- Fedora 32
|
||||
|
||||
- Fedora 33
|
||||
|
||||
- CentOS 7.x
|
||||
|
||||
- Debian GNU/Linux 8.x (Jessie)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
- :yocto_docs:`3.1.5 Documentation </3.1.5>`
|
||||
- :yocto_docs:`3.1.6 Documentation </3.1.6>`
|
||||
- :yocto_docs:`3.1.7 Documentation </3.1.7>`
|
||||
- :yocto_docs:`3.1.7 Documentation </3.1.8>`
|
||||
|
||||
==========================
|
||||
Previous Release Manuals
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
var all_versions = {
|
||||
'dev': 'dev (3.3)',
|
||||
'3.1.7': '3.1.7',
|
||||
'3.1.8': '3.1.8',
|
||||
'3.0.4': '3.0.4',
|
||||
'2.7.4': '2.7.4',
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ TCLIBC = "musl"
|
||||
# Distro config is evaluated after the machine config, so we have to explicitly
|
||||
# set the kernel provider to override a machine config.
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
|
||||
PREFERRED_VERSION_linux-yocto-tiny ?= "5.0%"
|
||||
PREFERRED_VERSION_linux-yocto-tiny ?= "5.4%"
|
||||
|
||||
# We can use packagegroup-core-boot, but in the future we may need a new packagegroup-core-tiny
|
||||
#POKY_DEFAULT_EXTRA_RDEPENDS += "packagegroup-core-boot"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
DISTRO_VERSION = "3.1.7"
|
||||
DISTRO_VERSION = "3.1.8"
|
||||
DISTRO_CODENAME = "dunfell"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"
|
||||
@@ -60,6 +60,7 @@ SANITY_TESTED_DISTROS ?= " \
|
||||
fedora-30 \n \
|
||||
fedora-31 \n \
|
||||
fedora-32 \n \
|
||||
fedora-33 \n \
|
||||
centos-7 \n \
|
||||
centos-8 \n \
|
||||
debian-8 \n \
|
||||
|
||||
@@ -216,11 +216,10 @@ def srctree_hash_files(d, srcdir=None):
|
||||
env['GIT_INDEX_FILE'] = tmp_index.name
|
||||
subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env)
|
||||
git_sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8")
|
||||
submodule_helper = subprocess.check_output(['git', 'submodule', 'status'], cwd=s_dir, env=env).decode("utf-8")
|
||||
submodule_helper = subprocess.check_output(['git', 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8")
|
||||
for line in submodule_helper.splitlines():
|
||||
module_relpath = line.split()[1]
|
||||
if not module_relpath.split('/')[0] == '..':
|
||||
module_dir = os.path.join(s_dir, module_relpath)
|
||||
module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1])
|
||||
if os.path.isdir(module_dir):
|
||||
proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
proc.communicate()
|
||||
proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
||||
|
||||
@@ -145,11 +145,11 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg"
|
||||
|
||||
INSANE_SKIP_${PN} += "ldflags"
|
||||
|
||||
# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips
|
||||
# doesn't support -buildmode=pie, so skip the QA checking for mips and its
|
||||
# variants.
|
||||
# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but
|
||||
# windows/mips/riscv doesn't support -buildmode=pie, so skip the QA checking
|
||||
# for windows/mips/riscv and their variants.
|
||||
python() {
|
||||
if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in d.getVar('TARGET_ARCH'):
|
||||
if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in d.getVar('TARGET_ARCH') or 'windows' in d.getVar('TARGET_GOOS'):
|
||||
d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
|
||||
else:
|
||||
d.appendVar('GOBUILDFLAGS', ' -buildmode=pie')
|
||||
|
||||
@@ -114,6 +114,8 @@ def go_map_mips(a, f, d):
|
||||
def go_map_os(o, d):
|
||||
if o.startswith('linux'):
|
||||
return 'linux'
|
||||
elif o.startswith('mingw'):
|
||||
return 'windows'
|
||||
return o
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
|
||||
virtual/kernel:do_deploy \
|
||||
${MLPREFIX}syslinux:do_populate_sysroot \
|
||||
syslinux-native:do_populate_sysroot \
|
||||
${PN}:do_image_${@d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_')} \
|
||||
${@'%s:do_image_%s' % (d.getVar('PN'), d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_')) if d.getVar('ROOTFS') else ''} \
|
||||
"
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs stateless-rootfs em
|
||||
# Generate companion debugfs?
|
||||
IMAGE_GEN_DEBUGFS ?= "0"
|
||||
|
||||
# These pacackages will be installed as additional into debug rootfs
|
||||
# These packages will be installed as additional into debug rootfs
|
||||
IMAGE_INSTALL_DEBUGFS ?= ""
|
||||
|
||||
# These packages will be removed from a read-only rootfs after all other
|
||||
@@ -662,7 +662,7 @@ reproducible_final_image_task () {
|
||||
fi
|
||||
# Set mtime of all files to a reproducible value
|
||||
bbnote "reproducible_final_image_task: mtime set to $REPRODUCIBLE_TIMESTAMP_ROOTFS"
|
||||
find ${IMAGE_ROOTFS} -exec touch -h --date=@$REPRODUCIBLE_TIMESTAMP_ROOTFS {} \;
|
||||
find ${IMAGE_ROOTFS} -print0 | xargs -0 touch -h --date=@$REPRODUCIBLE_TIMESTAMP_ROOTFS
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
|
||||
if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir):
|
||||
# The dynamic linker searches both these places anyway. There is no point in
|
||||
# looking there again.
|
||||
package_qa_add_message(messages, "useless-rpaths", "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
|
||||
package_qa_add_message(messages, "useless-rpaths", "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d, name), rpath))
|
||||
|
||||
QAPATHTEST[dev-so] = "package_qa_check_dev"
|
||||
def package_qa_check_dev(path, name, d, elf, messages):
|
||||
@@ -183,8 +183,8 @@ def package_qa_check_dev(path, name, d, elf, messages):
|
||||
"""
|
||||
|
||||
if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-ptest") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
|
||||
package_qa_add_message(messages, "dev-so", "non -dev/-dbg/nativesdk- package contains symlink .so: %s path '%s'" % \
|
||||
(name, package_qa_clean_path(path,d)))
|
||||
package_qa_add_message(messages, "dev-so", "non -dev/-dbg/nativesdk- package %s contains symlink .so '%s'" % \
|
||||
(name, package_qa_clean_path(path, d, name)))
|
||||
|
||||
QAPATHTEST[dev-elf] = "package_qa_check_dev_elf"
|
||||
def package_qa_check_dev_elf(path, name, d, elf, messages):
|
||||
@@ -194,8 +194,8 @@ def package_qa_check_dev_elf(path, name, d, elf, messages):
|
||||
install link-time .so files that are linker scripts.
|
||||
"""
|
||||
if name.endswith("-dev") and path.endswith(".so") and not os.path.islink(path) and elf:
|
||||
package_qa_add_message(messages, "dev-elf", "-dev package contains non-symlink .so: %s path '%s'" % \
|
||||
(name, package_qa_clean_path(path,d)))
|
||||
package_qa_add_message(messages, "dev-elf", "-dev package %s contains non-symlink .so '%s'" % \
|
||||
(name, package_qa_clean_path(path, d, name)))
|
||||
|
||||
QAPATHTEST[staticdev] = "package_qa_check_staticdev"
|
||||
def package_qa_check_staticdev(path, name, d, elf, messages):
|
||||
@@ -208,7 +208,7 @@ def package_qa_check_staticdev(path, name, d, elf, messages):
|
||||
|
||||
if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a") and not '/usr/lib/debug-static/' in path and not '/.debug-static/' in path:
|
||||
package_qa_add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \
|
||||
(name, package_qa_clean_path(path,d)))
|
||||
(name, package_qa_clean_path(path,d, name)))
|
||||
|
||||
QAPATHTEST[mime] = "package_qa_check_mime"
|
||||
def package_qa_check_mime(path, name, d, elf, messages):
|
||||
|
||||
@@ -194,6 +194,8 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
|
||||
KERNEL_EXTRA_ARGS ?= ""
|
||||
|
||||
EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
|
||||
EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
|
||||
|
||||
KERNEL_ALT_IMAGETYPE ??= ""
|
||||
|
||||
copy_initramfs() {
|
||||
@@ -403,7 +405,6 @@ kernel_do_install() {
|
||||
install -d ${D}${sysconfdir}/modules-load.d
|
||||
install -d ${D}${sysconfdir}/modprobe.d
|
||||
}
|
||||
do_install[prefuncs] += "package_get_auto_pr"
|
||||
|
||||
# Must be ran no earlier than after do_kernel_checkout or else Makefile won't be in ${S}/Makefile
|
||||
do_kernel_version_sanity_check() {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
ROOTFS_LICENSE_DIR = "${IMAGE_ROOTFS}/usr/share/common-licenses"
|
||||
|
||||
python write_package_manifest() {
|
||||
# Get list of installed packages
|
||||
license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}')
|
||||
@@ -105,8 +107,7 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
|
||||
copy_lic_manifest = d.getVar('COPY_LIC_MANIFEST')
|
||||
copy_lic_dirs = d.getVar('COPY_LIC_DIRS')
|
||||
if rootfs and copy_lic_manifest == "1":
|
||||
rootfs_license_dir = os.path.join(d.getVar('IMAGE_ROOTFS'),
|
||||
'usr', 'share', 'common-licenses')
|
||||
rootfs_license_dir = d.getVar('ROOTFS_LICENSE_DIR')
|
||||
bb.utils.mkdirhier(rootfs_license_dir)
|
||||
rootfs_license_manifest = os.path.join(rootfs_license_dir,
|
||||
os.path.split(license_manifest)[1])
|
||||
@@ -144,12 +145,13 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
|
||||
continue
|
||||
|
||||
# Make sure we use only canonical name for the license file
|
||||
rootfs_license = os.path.join(rootfs_license_dir, "generic_%s" % generic_lic)
|
||||
generic_lic_file = "generic_%s" % generic_lic
|
||||
rootfs_license = os.path.join(rootfs_license_dir, generic_lic_file)
|
||||
if not os.path.exists(rootfs_license):
|
||||
oe.path.copyhardlink(pkg_license, rootfs_license)
|
||||
|
||||
if not os.path.exists(pkg_rootfs_license):
|
||||
os.symlink(os.path.join('..', lic), pkg_rootfs_license)
|
||||
os.symlink(os.path.join('..', generic_lic_file), pkg_rootfs_license)
|
||||
else:
|
||||
if (oe.license.license_ok(canonical_license(d,
|
||||
lic), bad_licenses) == False or
|
||||
@@ -256,3 +258,13 @@ python do_populate_lic_deploy() {
|
||||
addtask populate_lic_deploy before do_build after do_image_complete
|
||||
do_populate_lic_deploy[recrdeptask] += "do_populate_lic do_deploy"
|
||||
|
||||
python license_qa_dead_symlink() {
|
||||
import os
|
||||
|
||||
for root, dirs, files in os.walk(d.getVar('ROOTFS_LICENSE_DIR')):
|
||||
for file in files:
|
||||
full_path = root + "/" + file
|
||||
if os.path.islink(full_path) and not os.path.exists(full_path):
|
||||
bb.error("broken symlink: " + full_path)
|
||||
}
|
||||
IMAGE_QA_COMMANDS += "license_qa_dead_symlink"
|
||||
|
||||
@@ -392,9 +392,12 @@ def check_connectivity(d):
|
||||
msg = data.getVar('CONNECTIVITY_CHECK_MSG') or ""
|
||||
if len(msg) == 0:
|
||||
msg = "%s.\n" % err
|
||||
msg += " Please ensure your host's network is configured correctly,\n"
|
||||
msg += " or set BB_NO_NETWORK = \"1\" to disable network access if\n"
|
||||
msg += " all required sources are on local disk.\n"
|
||||
msg += " Please ensure your host's network is configured correctly.\n"
|
||||
msg += " If your ISP or network is blocking the above URL,\n"
|
||||
msg += " try with another domain name, for example by setting:\n"
|
||||
msg += " CONNECTIVITY_CHECK_URIS = \"https://www.yoctoproject.org/\""
|
||||
msg += " You could also set BB_NO_NETWORK = \"1\" to disable network\n"
|
||||
msg += " access if all required sources are on local disk.\n"
|
||||
retval = msg
|
||||
|
||||
return retval
|
||||
@@ -882,13 +885,18 @@ def check_sanity_everybuild(status, d):
|
||||
except:
|
||||
pass
|
||||
|
||||
oeroot = d.getVar('COREBASE')
|
||||
if oeroot.find('+') != -1:
|
||||
status.addresult("Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include any + characters.")
|
||||
if oeroot.find('@') != -1:
|
||||
status.addresult("Error, you have an invalid character (@) in your COREBASE directory path. Please move the installation to a directory which doesn't include any @ characters.")
|
||||
if oeroot.find(' ') != -1:
|
||||
status.addresult("Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this.")
|
||||
for checkdir in ['COREBASE', 'TMPDIR']:
|
||||
val = d.getVar(checkdir)
|
||||
if val.find('..') != -1:
|
||||
status.addresult("Error, you have '..' in your %s directory path. Please ensure the variable contains an absolute path as this can break some recipe builds in obtuse ways." % checkdir)
|
||||
if val.find('+') != -1:
|
||||
status.addresult("Error, you have an invalid character (+) in your %s directory path. Please move the installation to a directory which doesn't include any + characters." % checkdir)
|
||||
if val.find('@') != -1:
|
||||
status.addresult("Error, you have an invalid character (@) in your %s directory path. Please move the installation to a directory which doesn't include any @ characters." % checkdir)
|
||||
if val.find(' ') != -1:
|
||||
status.addresult("Error, you have a space in your %s directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this." % checkdir)
|
||||
if val.find('%') != -1:
|
||||
status.addresult("Error, you have an invalid character (%) in your %s directory path which causes problems with python string formatting. Please move the installation to a directory which doesn't include any % characters." % checkdir)
|
||||
|
||||
# Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS
|
||||
import re
|
||||
|
||||
@@ -319,6 +319,8 @@ def sstate_install(ss, d):
|
||||
if os.path.exists(i):
|
||||
with open(i, "r") as f:
|
||||
manifests = f.readlines()
|
||||
# We append new entries, we don't remove older entries which may have the same
|
||||
# manifest name but different versions from stamp/workdir. See below.
|
||||
if filedata not in manifests:
|
||||
with open(i, "a+") as f:
|
||||
f.write(filedata)
|
||||
@@ -1175,11 +1177,21 @@ python sstate_eventhandler2() {
|
||||
i = d.expand("${SSTATE_MANIFESTS}/index-" + a)
|
||||
if not os.path.exists(i):
|
||||
continue
|
||||
manseen = set()
|
||||
ignore = []
|
||||
with open(i, "r") as f:
|
||||
lines = f.readlines()
|
||||
for l in lines:
|
||||
for l in reversed(lines):
|
||||
try:
|
||||
(stamp, manifest, workdir) = l.split()
|
||||
# The index may have multiple entries for the same manifest as the code above only appends
|
||||
# new entries and there may be an entry with matching manifest but differing version in stamp/workdir.
|
||||
# The last entry in the list is the valid one, any earlier entries with matching manifests
|
||||
# should be ignored.
|
||||
if manifest in manseen:
|
||||
ignore.append(l)
|
||||
continue
|
||||
manseen.add(manifest)
|
||||
if stamp not in stamps and stamp not in preservestamps and stamp in machineindex:
|
||||
toremove.append(l)
|
||||
if stamp not in seen:
|
||||
@@ -1210,6 +1222,8 @@ python sstate_eventhandler2() {
|
||||
|
||||
with open(i, "w") as f:
|
||||
for l in lines:
|
||||
if l in ignore:
|
||||
continue
|
||||
f.write(l)
|
||||
machineindex |= set(stamps)
|
||||
with open(mi, "w") as f:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
UNINATIVE_MAXGLIBCVERSION = "2.33"
|
||||
|
||||
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/3.0/"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "1c668909098c5b56132067adc69a249cb771f4560428e5822de903a12d97bf33"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "e6cc2fc056234cffa6a2ff084cce27d544ea3f487a62b5e253351cefd4421900"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "5ec5a9276046e7eceeac749a18b175667384e1f445cd4526300a41404d985a5b"
|
||||
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/3.1/"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "7fa12b9fe7a95934cc09beb0e8a25ff97179ef3105116015d32548eadd27b024"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "bbfcdd48336800b5af97e294918c6586a0a8fa903f127f813b0bd5110de8c55c"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "5d0611df544edff6428cef7d871257a91aa6ba1bd92f5365a2df8deb54b6b31e"
|
||||
|
||||
@@ -403,7 +403,7 @@ class PackageManager(object, metaclass=ABCMeta):
|
||||
bb.utils.remove(self.intercepts_dir, True)
|
||||
bb.utils.mkdirhier(self.intercepts_dir)
|
||||
for intercept in postinst_intercepts:
|
||||
bb.utils.copyfile(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept)))
|
||||
shutil.copy(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept)))
|
||||
|
||||
@abstractmethod
|
||||
def _handle_intercept_failure(self, failed_script):
|
||||
|
||||
@@ -167,7 +167,7 @@ class Rootfs(object, metaclass=ABCMeta):
|
||||
pass
|
||||
os.rename(self.image_rootfs, self.image_rootfs + '-dbg')
|
||||
|
||||
bb.note(" Restoreing original rootfs...")
|
||||
bb.note(" Restoring original rootfs...")
|
||||
os.rename(self.image_rootfs + '-orig', self.image_rootfs)
|
||||
|
||||
def _exec_shell_cmd(self, cmd):
|
||||
@@ -304,7 +304,7 @@ class Rootfs(object, metaclass=ABCMeta):
|
||||
def _check_for_kernel_modules(self, modules_dir):
|
||||
for root, dirs, files in os.walk(modules_dir, topdown=True):
|
||||
for name in files:
|
||||
found_ko = name.endswith(".ko")
|
||||
found_ko = name.endswith((".ko", ".ko.gz", ".ko.xz"))
|
||||
if found_ko:
|
||||
return found_ko
|
||||
return False
|
||||
|
||||
@@ -163,7 +163,12 @@ class Tmux(Terminal):
|
||||
# devshells, if it's already there, add a new window to it.
|
||||
window_name = 'devshell-%i' % os.getpid()
|
||||
|
||||
self.command = 'tmux new -c "{{cwd}}" -d -s {0} -n {0} "{{command}}"'.format(window_name)
|
||||
self.command = 'tmux new -c "{{cwd}}" -d -s {0} -n {0} "{{command}}"'
|
||||
if not check_tmux_version('1.9'):
|
||||
# `tmux new-session -c` was added in 1.9;
|
||||
# older versions fail with that flag
|
||||
self.command = 'tmux new -d -s {0} -n {0} "{{command}}"'
|
||||
self.command = self.command.format(window_name)
|
||||
Terminal.__init__(self, sh_cmd, title, env, d)
|
||||
|
||||
attach_cmd = 'tmux att -t {0}'.format(window_name)
|
||||
@@ -253,13 +258,18 @@ def spawn(name, sh_cmd, title=None, env=None, d=None):
|
||||
except OSError:
|
||||
return
|
||||
|
||||
def check_tmux_version(desired):
|
||||
vernum = check_terminal_version("tmux")
|
||||
if vernum and LooseVersion(vernum) < desired:
|
||||
return False
|
||||
return vernum
|
||||
|
||||
def check_tmux_pane_size(tmux):
|
||||
import subprocess as sub
|
||||
# On older tmux versions (<1.9), return false. The reason
|
||||
# is that there is no easy way to get the height of the active panel
|
||||
# on current window without nested formats (available from version 1.9)
|
||||
vernum = check_terminal_version("tmux")
|
||||
if vernum and LooseVersion(vernum) < '1.9':
|
||||
if not check_tmux_version('1.9'):
|
||||
return False
|
||||
try:
|
||||
p = sub.Popen('%s list-panes -F "#{?pane_active,#{pane_height},}"' % tmux,
|
||||
|
||||
@@ -43,8 +43,13 @@ class OETestCase(unittest.TestCase):
|
||||
clss.tearDownClassMethod()
|
||||
|
||||
def _oeSetUp(self):
|
||||
for d in self.decorators:
|
||||
d.setUpDecorator()
|
||||
try:
|
||||
for d in self.decorators:
|
||||
d.setUpDecorator()
|
||||
except:
|
||||
for d in self.decorators:
|
||||
d.tearDownDecorator()
|
||||
raise
|
||||
self.setUpMethod()
|
||||
|
||||
def _oeTearDown(self):
|
||||
|
||||
@@ -24,5 +24,6 @@ class OETimeout(OETestDecorator):
|
||||
|
||||
def tearDownDecorator(self):
|
||||
signal.alarm(0)
|
||||
signal.signal(signal.SIGALRM, self.alarmSignal)
|
||||
self.logger.debug("Removed SIGALRM handler")
|
||||
if hasattr(self, 'alarmSignal'):
|
||||
signal.signal(signal.SIGALRM, self.alarmSignal)
|
||||
self.logger.debug("Removed SIGALRM handler")
|
||||
|
||||
@@ -8,6 +8,7 @@ from time import sleep
|
||||
|
||||
from oeqa.core.case import OETestCase
|
||||
from oeqa.core.decorator.oetimeout import OETimeout
|
||||
from oeqa.core.decorator.depends import OETestDepends
|
||||
|
||||
class TimeoutTest(OETestCase):
|
||||
|
||||
@@ -19,3 +20,15 @@ class TimeoutTest(OETestCase):
|
||||
def testTimeoutFail(self):
|
||||
sleep(2)
|
||||
self.assertTrue(True, msg='How is this possible?')
|
||||
|
||||
|
||||
def testTimeoutSkip(self):
|
||||
self.skipTest("This test needs to be skipped, so that testTimeoutDepends()'s OETestDepends kicks in")
|
||||
|
||||
@OETestDepends(["timeout.TimeoutTest.testTimeoutSkip"])
|
||||
@OETimeout(3)
|
||||
def testTimeoutDepends(self):
|
||||
self.assertTrue(False, msg='How is this possible?')
|
||||
|
||||
def testTimeoutUnrelated(self):
|
||||
sleep(6)
|
||||
|
||||
@@ -133,5 +133,11 @@ class TestTimeoutDecorator(TestBase):
|
||||
msg = "OETestTimeout didn't restore SIGALRM"
|
||||
self.assertIs(alarm_signal, signal.getsignal(signal.SIGALRM), msg=msg)
|
||||
|
||||
def test_timeout_cancel(self):
|
||||
tests = ['timeout.TimeoutTest.testTimeoutSkip', 'timeout.TimeoutTest.testTimeoutDepends', 'timeout.TimeoutTest.testTimeoutUnrelated']
|
||||
msg = 'Unrelated test failed to complete'
|
||||
tc = self._testLoader(modules=self.modules, tests=tests)
|
||||
self.assertTrue(tc.runTests().wasSuccessful(), msg=msg)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
@@ -88,6 +88,8 @@ qemux86_common = [
|
||||
'tsc: HPET/PMTIMER calibration failed',
|
||||
"modeset(0): Failed to initialize the DRI2 extension",
|
||||
"glamor initialization failed",
|
||||
"blk_update_request: I/O error, dev fd0, sector 0 op 0x0:(READ)",
|
||||
"floppy: error",
|
||||
] + common_errors
|
||||
|
||||
ignore_errors = {
|
||||
|
||||
@@ -12,6 +12,11 @@ from oeqa.selftest.case import OESelftestTestCase
|
||||
|
||||
class BitbakeLayers(OESelftestTestCase):
|
||||
|
||||
def test_bitbakelayers_layerindexshowdepends(self):
|
||||
result = runCmd('bitbake-layers layerindex-show-depends meta-poky')
|
||||
find_in_contents = re.search("openembedded-core", result.output)
|
||||
self.assertTrue(find_in_contents, msg = "openembedded-core should have been listed at this step. bitbake-layers layerindex-show-depends meta-poky output: %s" % result.output)
|
||||
|
||||
def test_bitbakelayers_showcrossdepends(self):
|
||||
result = runCmd('bitbake-layers show-cross-depends')
|
||||
self.assertIn('aspell', result.output)
|
||||
|
||||
@@ -57,15 +57,15 @@ class ImageOptionsTests(OESelftestTestCase):
|
||||
class DiskMonTest(OESelftestTestCase):
|
||||
|
||||
def test_stoptask_behavior(self):
|
||||
self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"')
|
||||
self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"')
|
||||
res = bitbake("delay -c delay", ignore_status = True)
|
||||
self.assertTrue('ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!' in res.output, msg = "Tasks should have stopped. Disk monitor is set to STOPTASK: %s" % res.output)
|
||||
self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
|
||||
self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"')
|
||||
self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"')
|
||||
res = bitbake("delay -c delay", ignore_status = True)
|
||||
self.assertTrue('ERROR: Immediately abort since the disk space monitor action is "ABORT"!' in res.output, "Tasks should have been aborted immediatelly. Disk monitor is set to ABORT: %s" % res.output)
|
||||
self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
|
||||
self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"')
|
||||
self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"\nBB_HEARTBEAT_EVENT = "1"')
|
||||
res = bitbake("delay -c delay")
|
||||
self.assertTrue('WARNING: The free space' in res.output, msg = "A warning should have been displayed for disk monitor is set to WARN: %s" %res.output)
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please re
|
||||
return True
|
||||
return False
|
||||
|
||||
feature = 'require conf/distro/include/maintainers.inc\nLICENSE_FLAGS_WHITELIST += " commercial"\nPARSE_ALL_RECIPES = "1"\n'
|
||||
feature = 'require conf/distro/include/maintainers.inc\nLICENSE_FLAGS_WHITELIST += " commercial"\nPARSE_ALL_RECIPES = "1"\nPACKAGE_CLASSES = "package_ipk package_deb package_rpm"\n'
|
||||
self.write_config(feature)
|
||||
|
||||
with bb.tinfoil.Tinfoil() as tinfoil:
|
||||
|
||||
@@ -17,6 +17,62 @@ import stat
|
||||
import os
|
||||
import datetime
|
||||
|
||||
# For sample packages, see:
|
||||
# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201127-0t7wr_oo/
|
||||
# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201127-4s9ejwyp/
|
||||
# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201127-haiwdlbr/
|
||||
# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201127-hwds3mcl/
|
||||
# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201203-sua0pzvc/
|
||||
# (both packages/ and packages-excluded/)
|
||||
exclude_packages = [
|
||||
'acpica-src',
|
||||
'babeltrace2-ptest',
|
||||
'bind',
|
||||
'bootchart2-doc',
|
||||
'epiphany',
|
||||
'gcr',
|
||||
'git',
|
||||
'glide',
|
||||
'go-dep',
|
||||
'go-helloworld',
|
||||
'go-runtime',
|
||||
'go_',
|
||||
'gstreamer1.0-python',
|
||||
'hwlatdetect',
|
||||
'kernel-devsrc',
|
||||
'libaprutil',
|
||||
'libcap-ng',
|
||||
'libjson',
|
||||
'libproxy',
|
||||
'lsb-release',
|
||||
'lttng-tools-dbg',
|
||||
'lttng-tools-ptest',
|
||||
'ltp',
|
||||
'ovmf-shell-efi',
|
||||
'parted-ptest',
|
||||
'perf',
|
||||
'piglit',
|
||||
'pybootchartgui',
|
||||
'qemu',
|
||||
'quilt-ptest',
|
||||
"rpm",
|
||||
'rsync',
|
||||
'ruby',
|
||||
'stress-ng',
|
||||
'systemd-bootchart',
|
||||
'systemtap',
|
||||
'valgrind-ptest',
|
||||
'vim',
|
||||
'webkitgtk',
|
||||
]
|
||||
|
||||
def is_excluded(package):
|
||||
package_name = os.path.basename(package)
|
||||
for i in exclude_packages:
|
||||
if package_name.startswith(i):
|
||||
return i
|
||||
return None
|
||||
|
||||
MISSING = 'MISSING'
|
||||
DIFFERENT = 'DIFFERENT'
|
||||
SAME = 'SAME'
|
||||
@@ -39,14 +95,21 @@ class PackageCompareResults(object):
|
||||
self.total = []
|
||||
self.missing = []
|
||||
self.different = []
|
||||
self.different_excluded = []
|
||||
self.same = []
|
||||
self.active_exclusions = set()
|
||||
|
||||
def add_result(self, r):
|
||||
self.total.append(r)
|
||||
if r.status == MISSING:
|
||||
self.missing.append(r)
|
||||
elif r.status == DIFFERENT:
|
||||
self.different.append(r)
|
||||
exclusion = is_excluded(r.reference)
|
||||
if exclusion:
|
||||
self.different_excluded.append(r)
|
||||
self.active_exclusions.add(exclusion)
|
||||
else:
|
||||
self.different.append(r)
|
||||
else:
|
||||
self.same.append(r)
|
||||
|
||||
@@ -54,10 +117,14 @@ class PackageCompareResults(object):
|
||||
self.total.sort()
|
||||
self.missing.sort()
|
||||
self.different.sort()
|
||||
self.different_excluded.sort()
|
||||
self.same.sort()
|
||||
|
||||
def __str__(self):
|
||||
return 'same=%i different=%i missing=%i total=%i' % (len(self.same), len(self.different), len(self.missing), len(self.total))
|
||||
return 'same=%i different=%i different_excluded=%i missing=%i total=%i\nunused_exclusions=%s' % (len(self.same), len(self.different), len(self.different_excluded), len(self.missing), len(self.total), self.unused_exclusions())
|
||||
|
||||
def unused_exclusions(self):
|
||||
return sorted(set(exclude_packages) - self.active_exclusions)
|
||||
|
||||
def compare_file(reference, test, diffutils_sysroot):
|
||||
result = CompareResult()
|
||||
@@ -83,7 +150,7 @@ class ReproducibleTests(OESelftestTestCase):
|
||||
package_classes = ['deb', 'ipk']
|
||||
|
||||
# targets are the things we want to test the reproducibility of
|
||||
targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline']
|
||||
targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'world']
|
||||
# sstate targets are things to pull from sstate to potentially cut build/debugging time
|
||||
sstate_targets = []
|
||||
save_results = False
|
||||
@@ -156,6 +223,8 @@ class ReproducibleTests(OESelftestTestCase):
|
||||
PACKAGE_CLASSES = "{package_classes}"
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
TMPDIR = "{tmpdir}"
|
||||
LICENSE_FLAGS_WHITELIST = "commercial"
|
||||
DISTRO_FEATURES_append = ' systemd pam'
|
||||
''').format(package_classes=' '.join('package_%s' % c for c in self.package_classes),
|
||||
tmpdir=tmpdir)
|
||||
|
||||
@@ -224,6 +293,7 @@ class ReproducibleTests(OESelftestTestCase):
|
||||
|
||||
self.write_package_list(package_class, 'missing', result.missing)
|
||||
self.write_package_list(package_class, 'different', result.different)
|
||||
self.write_package_list(package_class, 'different_excluded', result.different_excluded)
|
||||
self.write_package_list(package_class, 'same', result.same)
|
||||
|
||||
if self.save_results:
|
||||
@@ -231,8 +301,12 @@ class ReproducibleTests(OESelftestTestCase):
|
||||
self.copy_file(d.reference, '/'.join([save_dir, 'packages', strip_topdir(d.reference)]))
|
||||
self.copy_file(d.test, '/'.join([save_dir, 'packages', strip_topdir(d.test)]))
|
||||
|
||||
for d in result.different_excluded:
|
||||
self.copy_file(d.reference, '/'.join([save_dir, 'packages-excluded', strip_topdir(d.reference)]))
|
||||
self.copy_file(d.test, '/'.join([save_dir, 'packages-excluded', strip_topdir(d.test)]))
|
||||
|
||||
if result.missing or result.different:
|
||||
fails.append("The following %s packages are missing or different: %s" %
|
||||
fails.append("The following %s packages are missing or different and not in exclusion list: %s" %
|
||||
(c, '\n'.join(r.test for r in (result.missing + result.different))))
|
||||
|
||||
# Clean up empty directories
|
||||
|
||||
@@ -163,12 +163,11 @@ class QemuTest(OESelftestTestCase):
|
||||
bitbake(cls.recipe)
|
||||
|
||||
def _start_qemu_shutdown_check_if_shutdown_succeeded(self, qemu, timeout):
|
||||
# Allow the runner's LoggingThread instance to exit without errors
|
||||
# (such as the exception "Console connection closed unexpectedly")
|
||||
# as qemu will disappear when we shut it down
|
||||
qemu.runner.allowexit()
|
||||
qemu.run_serial("shutdown -h now")
|
||||
# Stop thread will stop the LoggingThread instance used for logging
|
||||
# qemu through serial console, stop thread will prevent this code
|
||||
# from facing exception (Console connection closed unexpectedly)
|
||||
# when qemu was shutdown by the above shutdown command
|
||||
qemu.runner.stop_thread()
|
||||
time_track = 0
|
||||
try:
|
||||
while True:
|
||||
|
||||
@@ -174,11 +174,8 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, sync=T
|
||||
if native_sysroot:
|
||||
extra_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin" % \
|
||||
(native_sysroot, native_sysroot, native_sysroot)
|
||||
extra_libpaths = "%s/lib:%s/usr/lib" % \
|
||||
(native_sysroot, native_sysroot)
|
||||
nenv = dict(options.get('env', os.environ))
|
||||
nenv['PATH'] = extra_paths + ':' + nenv.get('PATH', '')
|
||||
nenv['LD_LIBRARY_PATH'] = extra_libpaths + ':' + nenv.get('LD_LIBRARY_PATH', '')
|
||||
options['env'] = nenv
|
||||
|
||||
cmd = Command(command, timeout=timeout, output_log=output_log, **options)
|
||||
|
||||
@@ -70,6 +70,8 @@ class QemuRunner:
|
||||
self.monitorpipe = None
|
||||
|
||||
self.logger = logger
|
||||
# Whether we're expecting an exit and should show related errors
|
||||
self.canexit = False
|
||||
|
||||
# Enable testing other OS's
|
||||
# Set commands for target communication, and default to Linux ALWAYS
|
||||
@@ -467,6 +469,11 @@ class QemuRunner:
|
||||
self.thread.stop()
|
||||
self.thread.join()
|
||||
|
||||
def allowexit(self):
|
||||
self.canexit = True
|
||||
if self.thread:
|
||||
self.thread.allowexit()
|
||||
|
||||
def restart(self, qemuparams = None):
|
||||
self.logger.warning("Restarting qemu process")
|
||||
if self.runqemu.poll() is None:
|
||||
@@ -522,7 +529,9 @@ class QemuRunner:
|
||||
if re.search(self.boot_patterns['search_cmd_finished'], data):
|
||||
break
|
||||
else:
|
||||
raise Exception("No data on serial console socket")
|
||||
if self.canexit:
|
||||
return (1, "")
|
||||
raise Exception("No data on serial console socket, connection closed?")
|
||||
|
||||
if data:
|
||||
if raw:
|
||||
@@ -560,6 +569,7 @@ class LoggingThread(threading.Thread):
|
||||
self.logger = logger
|
||||
self.readsock = None
|
||||
self.running = False
|
||||
self.canexit = False
|
||||
|
||||
self.errorevents = select.POLLERR | select.POLLHUP | select.POLLNVAL
|
||||
self.readevents = select.POLLIN | select.POLLPRI
|
||||
@@ -593,6 +603,9 @@ class LoggingThread(threading.Thread):
|
||||
self.close_ignore_error(self.writepipe)
|
||||
self.running = False
|
||||
|
||||
def allowexit(self):
|
||||
self.canexit = True
|
||||
|
||||
def eventloop(self):
|
||||
poll = select.poll()
|
||||
event_read_mask = self.errorevents | self.readevents
|
||||
@@ -638,7 +651,7 @@ class LoggingThread(threading.Thread):
|
||||
data = self.readsock.recv(count)
|
||||
except socket.error as e:
|
||||
if e.errno == errno.EAGAIN or e.errno == errno.EWOULDBLOCK:
|
||||
return ''
|
||||
return b''
|
||||
else:
|
||||
raise
|
||||
|
||||
@@ -649,7 +662,9 @@ class LoggingThread(threading.Thread):
|
||||
# happened. But for this code it counts as an
|
||||
# error since the connection shouldn't go away
|
||||
# until qemu exits.
|
||||
raise Exception("Console connection closed unexpectedly")
|
||||
if not self.canexit:
|
||||
raise Exception("Console connection closed unexpectedly")
|
||||
return b''
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ SRC_URI += "file://00avahi-autoipd \
|
||||
|
||||
inherit update-rc.d systemd useradd
|
||||
|
||||
# Issue only affects Debian/SUSE, not us
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-26720"
|
||||
|
||||
PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils"
|
||||
|
||||
LICENSE_libavahi-gobject = "LGPLv2.1+"
|
||||
|
||||
@@ -3,6 +3,9 @@ require bluez5.inc
|
||||
SRC_URI[md5sum] = "94972b8bc7ade60c72b0ffa6ccff2c0a"
|
||||
SRC_URI[sha256sum] = "8863717113c4897e2ad3271fc808ea245319e6fd95eed2e934fae8e0894e9b88"
|
||||
|
||||
# These issues have kernel fixes rather than bluez fixes so exclude here
|
||||
CVE_CHECK_WHITELIST += "CVE-2020-12352 CVE-2020-24490"
|
||||
|
||||
# noinst programs in Makefile.tools that are conditional on READLINE
|
||||
# support
|
||||
NOINST_TOOLS_READLINE ?= " \
|
||||
|
||||
@@ -28,10 +28,16 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
|
||||
SRC_URI[md5sum] = "3076e6413e8dbe56d33848c1054ac091"
|
||||
SRC_URI[sha256sum] = "43925151e6cf6cee1450190c0e9af4dc36b41c12737619edff8bcebdff64e671"
|
||||
|
||||
# This CVE is specific to OpenSSH with the pam opie which we don't build/use here
|
||||
CVE_CHECK_WHITELIST += "CVE-2007-2768"
|
||||
|
||||
# This CVE is specific to OpenSSH server, as used in Fedora and Red Hat Enterprise Linux 7
|
||||
# and when running in a Kerberos environment. As such it is not relevant to OpenEmbedded
|
||||
CVE_CHECK_WHITELIST += "CVE-2014-9278"
|
||||
|
||||
# CVE only applies to some distributed RHEL binaries
|
||||
CVE_CHECK_WHITELIST += "CVE-2008-3844"
|
||||
|
||||
PAM_SRC_URI = "file://sshd"
|
||||
|
||||
inherit manpages useradd update-rc.d update-alternatives systemd
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
From a0541334a6394f8237a4393b7372693cd7e96f15 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Sat, 13 Mar 2021 18:19:31 +0200
|
||||
Subject: [PATCH] ASN.1: Validate DigestAlgorithmIdentifier parameters
|
||||
|
||||
The supported hash algorithms do not use AlgorithmIdentifier parameters.
|
||||
However, there are implementations that include NULL parameters in
|
||||
addition to ones that omit the parameters. Previous implementation did
|
||||
not check the parameters value at all which supported both these cases,
|
||||
but did not reject any other unexpected information.
|
||||
|
||||
Use strict validation of digest algorithm parameters and reject any
|
||||
unexpected value when validating a signature. This is needed to prevent
|
||||
potential forging attacks.
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2021-30004
|
||||
|
||||
Reference to upstream patch:
|
||||
[https://w1.fi/cgit/hostap/commit/?id=a0541334a6394f8237a4393b7372693cd7e96f15]
|
||||
|
||||
Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
|
||||
---
|
||||
src/tls/pkcs1.c | 21 +++++++++++++++++++++
|
||||
src/tls/x509v3.c | 20 ++++++++++++++++++++
|
||||
2 files changed, 41 insertions(+)
|
||||
|
||||
diff --git a/src/tls/pkcs1.c b/src/tls/pkcs1.c
|
||||
index 141ac50..e09db07 100644
|
||||
--- a/src/tls/pkcs1.c
|
||||
+++ b/src/tls/pkcs1.c
|
||||
@@ -240,6 +240,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk,
|
||||
os_free(decrypted);
|
||||
return -1;
|
||||
}
|
||||
+ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestInfo",
|
||||
+ hdr.payload, hdr.length);
|
||||
|
||||
pos = hdr.payload;
|
||||
end = pos + hdr.length;
|
||||
@@ -261,6 +263,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk,
|
||||
os_free(decrypted);
|
||||
return -1;
|
||||
}
|
||||
+ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestAlgorithmIdentifier",
|
||||
+ hdr.payload, hdr.length);
|
||||
da_end = hdr.payload + hdr.length;
|
||||
|
||||
if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) {
|
||||
@@ -269,6 +273,23 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk,
|
||||
os_free(decrypted);
|
||||
return -1;
|
||||
}
|
||||
+ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: Digest algorithm parameters",
|
||||
+ next, da_end - next);
|
||||
+
|
||||
+ /*
|
||||
+ * RFC 5754: The correct encoding for the SHA2 algorithms would be to
|
||||
+ * omit the parameters, but there are implementation that encode these
|
||||
+ * as a NULL element. Allow these two cases and reject anything else.
|
||||
+ */
|
||||
+ if (da_end > next &&
|
||||
+ (asn1_get_next(next, da_end - next, &hdr) < 0 ||
|
||||
+ !asn1_is_null(&hdr) ||
|
||||
+ hdr.payload + hdr.length != da_end)) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "PKCS #1: Unexpected digest algorithm parameters");
|
||||
+ os_free(decrypted);
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
if (!asn1_oid_equal(&oid, hash_alg)) {
|
||||
char txt[100], txt2[100];
|
||||
diff --git a/src/tls/x509v3.c b/src/tls/x509v3.c
|
||||
index 1bd5aa0..bf2289f 100644
|
||||
--- a/src/tls/x509v3.c
|
||||
+++ b/src/tls/x509v3.c
|
||||
@@ -1834,6 +1834,7 @@ int x509_check_signature(struct x509_certificate *issuer,
|
||||
os_free(data);
|
||||
return -1;
|
||||
}
|
||||
+ wpa_hexdump(MSG_MSGDUMP, "X509: DigestInfo", hdr.payload, hdr.length);
|
||||
|
||||
pos = hdr.payload;
|
||||
end = pos + hdr.length;
|
||||
@@ -1855,6 +1856,8 @@ int x509_check_signature(struct x509_certificate *issuer,
|
||||
os_free(data);
|
||||
return -1;
|
||||
}
|
||||
+ wpa_hexdump(MSG_MSGDUMP, "X509: DigestAlgorithmIdentifier",
|
||||
+ hdr.payload, hdr.length);
|
||||
da_end = hdr.payload + hdr.length;
|
||||
|
||||
if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) {
|
||||
@@ -1862,6 +1865,23 @@ int x509_check_signature(struct x509_certificate *issuer,
|
||||
os_free(data);
|
||||
return -1;
|
||||
}
|
||||
+ wpa_hexdump(MSG_MSGDUMP, "X509: Digest algorithm parameters",
|
||||
+ next, da_end - next);
|
||||
+
|
||||
+ /*
|
||||
+ * RFC 5754: The correct encoding for the SHA2 algorithms would be to
|
||||
+ * omit the parameters, but there are implementation that encode these
|
||||
+ * as a NULL element. Allow these two cases and reject anything else.
|
||||
+ */
|
||||
+ if (da_end > next &&
|
||||
+ (asn1_get_next(next, da_end - next, &hdr) < 0 ||
|
||||
+ !asn1_is_null(&hdr) ||
|
||||
+ hdr.payload + hdr.length != da_end)) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "X509: Unexpected digest algorithm parameters");
|
||||
+ os_free(data);
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
if (x509_sha1_oid(&oid)) {
|
||||
if (signature->oid.oid[6] != 5 /* sha-1WithRSAEncryption */) {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -32,6 +32,7 @@ SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \
|
||||
file://0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch \
|
||||
file://CVE-2021-0326.patch \
|
||||
file://CVE-2021-27803.patch \
|
||||
file://CVE-2021-30004.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "2d2958c782576dc9901092fbfecb4190"
|
||||
SRC_URI[sha256sum] = "fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17"
|
||||
|
||||
@@ -26,6 +26,10 @@ SRC_URI_append_libc-musl = "file://strtod_fix_clash_with_strtold.patch"
|
||||
SRC_URI[md5sum] = "0009a224d8e288e8ec406ef0161f9293"
|
||||
SRC_URI[sha256sum] = "ff7a9c918edce6b4f4b2725e3f9b37b0c4d193531cac49a48b56c4d0d3a9e9fd"
|
||||
|
||||
# http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.27-101-gf5d7c0842
|
||||
# runcon is not really a sandbox command, use `runcon ... setsid ...` to avoid this particular issue.
|
||||
CVE_CHECK_WHITELIST += "CVE-2016-2781"
|
||||
|
||||
EXTRA_OECONF_class-native = "--without-gmp"
|
||||
EXTRA_OECONF_class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}"
|
||||
EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch,hostname"
|
||||
|
||||
@@ -5,6 +5,19 @@ CVE_CHECK_WHITELIST += "CVE-2020-10029 CVE-2020-6096 CVE-2016-10228 CVE-2020-175
|
||||
CVE-2021-27645 CVE-2021-3326 CVE-2020-27618 CVE-2020-29562 CVE-2019-25013 \
|
||||
"
|
||||
|
||||
# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010022
|
||||
# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010023
|
||||
# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010024
|
||||
# Upstream glibc maintainers dispute there is any issue and have no plans to address it further.
|
||||
# "this is being treated as a non-security bug and no real threat."
|
||||
CVE_CHECK_WHITELIST += "CVE-2019-1010022 CVE-2019-1010023 CVE-2019-1010024"
|
||||
|
||||
# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010025
|
||||
# Allows for ASLR bypass so can bypass some hardening, not an exploit in itself, may allow
|
||||
# easier access for another. "ASLR bypass itself is not a vulnerability."
|
||||
# Potential patch at https://sourceware.org/bugzilla/show_bug.cgi?id=22853
|
||||
CVE_CHECK_WHITELIST += "CVE-2019-1010025"
|
||||
|
||||
DEPENDS += "gperf-native bison-native make-native"
|
||||
|
||||
NATIVESDKFIXES ?= ""
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "5e2e41c3e7f2a091e80d63bbbec975a52f37d023"
|
||||
SRCREV ?= "f22c2d6670d3b6f0d6eaa201fb2f9307a8d503d5"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=dunfell \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -132,7 +132,12 @@ def parse_node_and_insert(c, node, cveId):
|
||||
for cpe in node.get('cpe_match', ()):
|
||||
if not cpe['vulnerable']:
|
||||
return
|
||||
cpe23 = cpe['cpe23Uri'].split(':')
|
||||
cpe23 = cpe.get('cpe23Uri')
|
||||
if not cpe23:
|
||||
return
|
||||
cpe23 = cpe23.split(':')
|
||||
if len(cpe23) < 6:
|
||||
return
|
||||
vendor = cpe23[3]
|
||||
product = cpe23[4]
|
||||
version = cpe23[5]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0a8362cfb9f00870d70687475665b131dd82c947 Mon Sep 17 00:00:00 2001
|
||||
From 200ff35c6545b4ab85f5ea7a6096fbaec3d82f6d Mon Sep 17 00:00:00 2001
|
||||
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
|
||||
Date: Thu, 9 Jun 2016 02:23:01 -0700
|
||||
Subject: [PATCH 1/5] ovmf: update path to native BaseTools
|
||||
Subject: [PATCH 1/4] ovmf: update path to native BaseTools
|
||||
|
||||
BaseTools is a set of utilities to build EDK-based firmware. These utilities
|
||||
are used during the build process. Thus, they need to be built natively.
|
||||
@@ -30,5 +30,5 @@ index 91b1442ade..1858dae31a 100755
|
||||
source edksetup.sh BaseTools
|
||||
else
|
||||
--
|
||||
2.17.1
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From a8bceaec1b16fffbf6810df05503d8ae9092b735 Mon Sep 17 00:00:00 2001
|
||||
From 667c0cf97dadc4f5994d26ec3984f559a05ec406 Mon Sep 17 00:00:00 2001
|
||||
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
|
||||
Date: Fri, 26 Jul 2019 17:34:26 -0400
|
||||
Subject: [PATCH 2/5] BaseTools: makefile: adjust to build in under bitbake
|
||||
Subject: [PATCH 2/4] BaseTools: makefile: adjust to build in under bitbake
|
||||
|
||||
Prepend the build flags with those of bitbake. This is to build
|
||||
using the bitbake native sysroot include and library directories.
|
||||
@@ -10,14 +10,14 @@ Signed-off-by: Ricardo Neri <ricardo.neri@linux.intel.com>
|
||||
Upstream-Status: Pending
|
||||
|
||||
---
|
||||
BaseTools/Source/C/Makefiles/header.makefile | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
BaseTools/Source/C/Makefiles/header.makefile | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
|
||||
index 4e9b36d98b..eb03ee33fa 100644
|
||||
index 1c105ee7d4..d5eea3864e 100644
|
||||
--- a/BaseTools/Source/C/Makefiles/header.makefile
|
||||
+++ b/BaseTools/Source/C/Makefiles/header.makefile
|
||||
@@ -62,23 +62,23 @@ $(error Bad HOST_ARCH)
|
||||
@@ -69,35 +69,36 @@ $(error Bad HOST_ARCH)
|
||||
endif
|
||||
|
||||
INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
|
||||
@@ -33,19 +33,35 @@ index 4e9b36d98b..eb03ee33fa 100644
|
||||
+BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
|
||||
-Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g
|
||||
else
|
||||
ifeq ($(CXX), llvm)
|
||||
-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
|
||||
+BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
|
||||
-fno-delete-null-pointer-checks -Wall -Werror \
|
||||
-Wno-deprecated-declarations -Wno-self-assign \
|
||||
-Wno-unused-result -nostdlib -g
|
||||
else
|
||||
-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
|
||||
+BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
|
||||
-fno-delete-null-pointer-checks -Wall -Werror \
|
||||
-Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \
|
||||
-Wno-unused-result -nostdlib -g
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CXX), llvm)
|
||||
-BUILD_LFLAGS =
|
||||
-BUILD_CXXFLAGS = -Wno-deprecated-register -Wno-unused-result
|
||||
+BUILD_LFLAGS = $(LDFLAGS)
|
||||
+BUILD_CXXFLAGS += -Wno-deprecated-register -Wno-unused-result
|
||||
else
|
||||
-BUILD_LFLAGS =
|
||||
-BUILD_CXXFLAGS = -Wno-unused-result
|
||||
+BUILD_LFLAGS = $(LDFLAGS)
|
||||
+BUILD_CXXFLAGS += -Wno-unused-result
|
||||
|
||||
endif
|
||||
+
|
||||
ifeq ($(HOST_ARCH), IA32)
|
||||
#
|
||||
# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults
|
||||
--
|
||||
2.17.1
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 60a5f953f747e1e9e05a40157b651cba8ea57b91 Mon Sep 17 00:00:00 2001
|
||||
From e19481e5a64f8915ac118899b10c40d12c0f9daa Mon Sep 17 00:00:00 2001
|
||||
From: Dengke Du <dengke.du@windriver.com>
|
||||
Date: Mon, 11 Sep 2017 02:21:55 -0400
|
||||
Subject: [PATCH 3/5] ovmf: enable long path file
|
||||
Subject: [PATCH 3/4] ovmf: enable long path file
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Dengke Du <dengke.du@windriver.com>
|
||||
@@ -24,5 +24,5 @@ index e1cce985f7..d67d03c70c 100644
|
||||
#define MAX_UINT64 ((UINT64)0xFFFFFFFFFFFFFFFFULL)
|
||||
#define MAX_UINT32 ((UINT32)0xFFFFFFFF)
|
||||
--
|
||||
2.17.1
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 94eff316b31b4d0348af28c77be5c00bc09fe8e7 Mon Sep 17 00:00:00 2001
|
||||
From ad06fcf1e08736e79221cd6863ff2e3c9254f261 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Langasek <steve.langasek@ubuntu.com>
|
||||
Date: Sat, 10 Jun 2017 01:39:36 -0700
|
||||
Subject: [PATCH 4/5] ovmf: Update to latest
|
||||
Subject: [PATCH 4/4] ovmf: Update to latest
|
||||
|
||||
Description: pass -fno-stack-protector to all GCC toolchains
|
||||
The upstream build rules inexplicably pass -fno-stack-protector only
|
||||
@@ -15,15 +15,15 @@ Upstream-Status: Pending
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
|
||||
index ca0b122dbb..b0066c2ab8 100755
|
||||
index 933b3160fd..c2fbbf0c38 100755
|
||||
--- a/BaseTools/Conf/tools_def.template
|
||||
+++ b/BaseTools/Conf/tools_def.template
|
||||
@@ -1941,10 +1941,10 @@ DEFINE GCC_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386
|
||||
DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii
|
||||
DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
|
||||
@@ -1952,10 +1952,10 @@ DEFINE GCC_RISCV64_RC_FLAGS = -I binary -O elf64-littleriscv -B riscv
|
||||
# GCC Build Flag for included header file list generation
|
||||
DEFINE GCC_DEPS_FLAGS = -MMD -MF $@.deps
|
||||
|
||||
-DEFINE GCC48_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
|
||||
+DEFINE GCC48_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-stack-protector -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
|
||||
-DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
|
||||
+DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -fno-stack-protector -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
|
||||
DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
|
||||
-DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address
|
||||
-DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address
|
||||
@@ -32,7 +32,7 @@ index ca0b122dbb..b0066c2ab8 100755
|
||||
DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
|
||||
DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
|
||||
DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON)
|
||||
@@ -1953,7 +1953,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF
|
||||
@@ -1964,7 +1964,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF
|
||||
DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
|
||||
DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
|
||||
DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
|
||||
@@ -42,5 +42,5 @@ index ca0b122dbb..b0066c2ab8 100755
|
||||
DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS)
|
||||
DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS)
|
||||
--
|
||||
2.17.1
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -12,15 +12,15 @@ LIC_FILES_CHKSUM = "file://OvmfPkg/License.txt;md5=06357ddc23f46577c2aeaeaf7b776
|
||||
PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG[secureboot] = ",,,"
|
||||
|
||||
SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=git \
|
||||
SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \
|
||||
file://0001-ovmf-update-path-to-native-BaseTools.patch \
|
||||
file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
|
||||
file://0003-ovmf-enable-long-path-file.patch \
|
||||
file://0004-ovmf-Update-to-latest.patch \
|
||||
"
|
||||
|
||||
PV = "edk2-stable201911"
|
||||
SRCREV = "bd85bf54c268204c7a698a96f3ccd96cd77952cd"
|
||||
PV = "edk2-stable202008"
|
||||
SRCREV = "06dc822d045c2bb42e497487935485302486e151"
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)"
|
||||
|
||||
inherit deploy
|
||||
|
||||
@@ -46,5 +46,7 @@ SRC_URI = "\
|
||||
file://0001-gas-improve-reproducibility-for-stabs-debugging-data.patch \
|
||||
file://CVE-2020-16592.patch \
|
||||
file://CVE-2020-16598.patch \
|
||||
file://CVE-2021-20197.patch \
|
||||
file://CVE-2021-3487.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
572
meta/recipes-devtools/binutils/binutils/CVE-2021-20197.patch
Normal file
572
meta/recipes-devtools/binutils/binutils/CVE-2021-20197.patch
Normal file
@@ -0,0 +1,572 @@
|
||||
From d3edaa91d4cf7202ec14342410194841e2f67f12 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Fri, 26 Feb 2021 11:30:32 +1030
|
||||
Subject: [PATCH v2] Reinstate various pieces backed out from smart_rename changes
|
||||
|
||||
In the interests of a stable release various last minute smart_rename
|
||||
patches were backed out of the 2.36 branch. The main reason to
|
||||
reinstate some of those backed out changes here is to make necessary
|
||||
followup fixes to commit 8e03235147a9 simple cherry-picks from
|
||||
mainline. A secondary reason is that ar -M support isn't fixed for
|
||||
pr26945 without this patch.
|
||||
|
||||
PR 26945
|
||||
* ar.c: Don't include libbfd.h.
|
||||
(write_archive): Replace xmalloc+strcpy with xstrdup.
|
||||
* arsup.c (temp_name, real_ofd): New static variables.
|
||||
(ar_open): Use make_tempname and bfd_fdopenw.
|
||||
(ar_save): Adjust to suit ar_open changes.
|
||||
* objcopy.c: Don't include libbfd.h.
|
||||
* rename.c: Rename and reorder variables.
|
||||
|
||||
(cherry picked from commit 95b91a043aeaeb546d2fea556d84a2de1e917770)
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d3edaa91d4cf7202ec14342410194841e2f67f12]
|
||||
CVE: CVE-2021-20197
|
||||
Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com>
|
||||
---
|
||||
bfd/bfd-in2.h | 2 +
|
||||
bfd/opncls.c | 33 ++++++++++
|
||||
binutils/ar.c | 15 +++--
|
||||
binutils/arsup.c | 37 ++++++++----
|
||||
binutils/bucomm.c | 4 +-
|
||||
binutils/bucomm.h | 5 +-
|
||||
binutils/objcopy.c | 37 +++++++-----
|
||||
binutils/rename.c | 148 +++++++++++----------------------------------
|
||||
8 files changed, 133 insertions(+), 148 deletions(-)
|
||||
|
||||
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
|
||||
index 2e453c50c18..e53f54a8ab7 100644
|
||||
--- a/bfd/bfd-in2.h
|
||||
+++ b/bfd/bfd-in2.h
|
||||
@@ -588,6 +588,8 @@ bfd *bfd_openr (const char *filename, const char *target);
|
||||
|
||||
bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
|
||||
|
||||
+bfd *bfd_fdopenw (const char *filename, const char *target, int fd);
|
||||
+
|
||||
bfd *bfd_openstreamr (const char * filename, const char * target,
|
||||
void * stream);
|
||||
|
||||
diff --git a/bfd/opncls.c b/bfd/opncls.c
|
||||
index a03ad51c8fa..f9da97ed710 100644
|
||||
--- a/bfd/opncls.c
|
||||
+++ b/bfd/opncls.c
|
||||
@@ -370,6 +370,39 @@ bfd_fdopenr (const char *filename, const char *target, int fd)
|
||||
return bfd_fopen (filename, target, mode, fd);
|
||||
}
|
||||
|
||||
+/*
|
||||
+FUNCTION
|
||||
+ bfd_fdopenw
|
||||
+
|
||||
+SYNOPSIS
|
||||
+ bfd *bfd_fdopenw (const char *filename, const char *target, int fd);
|
||||
+
|
||||
+DESCRIPTION
|
||||
+ <<bfd_fdopenw>> is exactly like <<bfd_fdopenr>> with the exception that
|
||||
+ the resulting BFD is suitable for output.
|
||||
+*/
|
||||
+
|
||||
+bfd *
|
||||
+bfd_fdopenw (const char *filename, const char *target, int fd)
|
||||
+{
|
||||
+ bfd *out = bfd_fdopenr (filename, target, fd);
|
||||
+
|
||||
+ if (out != NULL)
|
||||
+ {
|
||||
+ if (!bfd_write_p (out))
|
||||
+ {
|
||||
+ close (fd);
|
||||
+ _bfd_delete_bfd (out);
|
||||
+ out = NULL;
|
||||
+ bfd_set_error (bfd_error_invalid_operation);
|
||||
+ }
|
||||
+ else
|
||||
+ out->direction = write_direction;
|
||||
+ }
|
||||
+
|
||||
+ return out;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
FUNCTION
|
||||
bfd_openstreamr
|
||||
diff --git a/binutils/ar.c b/binutils/ar.c
|
||||
index 1057db9980e..c33a11e0d70 100644
|
||||
--- a/binutils/ar.c
|
||||
+++ b/binutils/ar.c
|
||||
@@ -1195,20 +1195,23 @@ write_archive (bfd *iarch)
|
||||
bfd *obfd;
|
||||
char *old_name, *new_name;
|
||||
bfd *contents_head = iarch->archive_next;
|
||||
+ int ofd = -1;
|
||||
|
||||
- old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1);
|
||||
- strcpy (old_name, bfd_get_filename (iarch));
|
||||
- new_name = make_tempname (old_name);
|
||||
+ old_name = xstrdup (bfd_get_filename (iarch));
|
||||
+ new_name = make_tempname (old_name, &ofd);
|
||||
|
||||
if (new_name == NULL)
|
||||
bfd_fatal (_("could not create temporary file whilst writing archive"));
|
||||
|
||||
output_filename = new_name;
|
||||
|
||||
- obfd = bfd_openw (new_name, bfd_get_target (iarch));
|
||||
+ obfd = bfd_fdopenw (new_name, bfd_get_target (iarch), ofd);
|
||||
|
||||
if (obfd == NULL)
|
||||
- bfd_fatal (old_name);
|
||||
+ {
|
||||
+ close (ofd);
|
||||
+ bfd_fatal (old_name);
|
||||
+ }
|
||||
|
||||
output_bfd = obfd;
|
||||
|
||||
@@ -1246,7 +1249,7 @@ write_archive (bfd *iarch)
|
||||
/* We don't care if this fails; we might be creating the archive. */
|
||||
bfd_close (iarch);
|
||||
|
||||
- if (smart_rename (new_name, old_name, 0) != 0)
|
||||
+ if (smart_rename (new_name, old_name, NULL) != 0)
|
||||
xexit (1);
|
||||
free (old_name);
|
||||
free (new_name);
|
||||
diff --git a/binutils/arsup.c b/binutils/arsup.c
|
||||
index 00967c972cd..b8ae4f7ec1a 100644
|
||||
--- a/binutils/arsup.c
|
||||
+++ b/binutils/arsup.c
|
||||
@@ -42,6 +42,8 @@ extern int deterministic;
|
||||
|
||||
static bfd *obfd;
|
||||
static char *real_name;
|
||||
+static char *temp_name;
|
||||
+static int real_ofd;
|
||||
static FILE *outfile;
|
||||
|
||||
static void
|
||||
@@ -149,27 +151,24 @@ maybequit (void)
|
||||
void
|
||||
ar_open (char *name, int t)
|
||||
{
|
||||
- char *tname;
|
||||
- const char *bname = lbasename (name);
|
||||
- real_name = name;
|
||||
+ real_name = xstrdup (name);
|
||||
+ temp_name = make_tempname (real_name, &real_ofd);
|
||||
|
||||
- /* Prepend tmp- to the beginning, to avoid file-name clashes after
|
||||
- truncation on filesystems with limited namespaces (DOS). */
|
||||
- if (asprintf (&tname, "%.*stmp-%s", (int) (bname - name), name, bname) == -1)
|
||||
+ if (temp_name == NULL)
|
||||
{
|
||||
- fprintf (stderr, _("%s: Can't allocate memory for temp name (%s)\n"),
|
||||
+ fprintf (stderr, _("%s: Can't open temporary file (%s)\n"),
|
||||
program_name, strerror(errno));
|
||||
maybequit ();
|
||||
return;
|
||||
}
|
||||
|
||||
- obfd = bfd_openw (tname, NULL);
|
||||
+ obfd = bfd_fdopenw (temp_name, NULL, real_ofd);
|
||||
|
||||
if (!obfd)
|
||||
{
|
||||
fprintf (stderr,
|
||||
_("%s: Can't open output archive %s\n"),
|
||||
- program_name, tname);
|
||||
+ program_name, temp_name);
|
||||
|
||||
maybequit ();
|
||||
}
|
||||
@@ -344,16 +343,30 @@ ar_save (void)
|
||||
}
|
||||
else
|
||||
{
|
||||
- char *ofilename = xstrdup (bfd_get_filename (obfd));
|
||||
+ struct stat target_stat;
|
||||
|
||||
if (deterministic > 0)
|
||||
obfd->flags |= BFD_DETERMINISTIC_OUTPUT;
|
||||
|
||||
bfd_close (obfd);
|
||||
|
||||
- smart_rename (ofilename, real_name, 0);
|
||||
+ if (stat (real_name, &target_stat) != 0)
|
||||
+ {
|
||||
+ /* The temp file created in ar_open has mode 0600 as per mkstemp.
|
||||
+ Create the real empty output file here so smart_rename will
|
||||
+ update the mode according to the process umask. */
|
||||
+ obfd = bfd_openw (real_name, NULL);
|
||||
+ if (obfd != NULL)
|
||||
+ {
|
||||
+ bfd_set_format (obfd, bfd_archive);
|
||||
+ bfd_close (obfd);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ smart_rename (temp_name, real_name, NULL);
|
||||
obfd = 0;
|
||||
- free (ofilename);
|
||||
+ free (temp_name);
|
||||
+ free (real_name);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
|
||||
index 9e6a02843e6..53244201f89 100644
|
||||
--- a/binutils/bucomm.c
|
||||
+++ b/binutils/bucomm.c
|
||||
@@ -532,7 +532,7 @@ template_in_dir (const char *path)
|
||||
as FILENAME. */
|
||||
|
||||
char *
|
||||
-make_tempname (const char *filename)
|
||||
+make_tempname (const char *filename, int *ofd)
|
||||
{
|
||||
char *tmpname = template_in_dir (filename);
|
||||
int fd;
|
||||
@@ -550,7 +550,7 @@ make_tempname (const char *filename)
|
||||
free (tmpname);
|
||||
return NULL;
|
||||
}
|
||||
- close (fd);
|
||||
+ *ofd = fd;
|
||||
return tmpname;
|
||||
}
|
||||
|
||||
diff --git a/binutils/bucomm.h b/binutils/bucomm.h
|
||||
index d8318343f78..2b164e0af68 100644
|
||||
--- a/binutils/bucomm.h
|
||||
+++ b/binutils/bucomm.h
|
||||
@@ -51,7 +51,7 @@ int display_info (void);
|
||||
|
||||
void print_arelt_descr (FILE *, bfd *, bfd_boolean, bfd_boolean);
|
||||
|
||||
-char *make_tempname (const char *);
|
||||
+char *make_tempname (const char *, int *);
|
||||
char *make_tempdir (const char *);
|
||||
|
||||
bfd_vma parse_vma (const char *, const char *);
|
||||
@@ -71,7 +71,8 @@ extern void print_version (const char *);
|
||||
/* In rename.c. */
|
||||
extern void set_times (const char *, const struct stat *);
|
||||
|
||||
-extern int smart_rename (const char *, const char *, int);
|
||||
+extern int smart_rename (const char *, const char *, struct stat *);
|
||||
+
|
||||
|
||||
/* In libiberty. */
|
||||
void *xmalloc (size_t);
|
||||
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
|
||||
index 212e25144e6..5ccbd926610 100644
|
||||
--- a/binutils/objcopy.c
|
||||
+++ b/binutils/objcopy.c
|
||||
@@ -3682,7 +3682,7 @@ set_long_section_mode (bfd *output_bfd, bfd *input_bfd, enum long_section_name_h
|
||||
/* The top-level control. */
|
||||
|
||||
static void
|
||||
-copy_file (const char *input_filename, const char *output_filename,
|
||||
+copy_file (const char *input_filename, const char *output_filename, int ofd,
|
||||
const char *input_target, const char *output_target,
|
||||
const bfd_arch_info_type *input_arch)
|
||||
{
|
||||
@@ -3757,9 +3757,14 @@ copy_file (const char *input_filename, const char *output_filename,
|
||||
else
|
||||
force_output_target = TRUE;
|
||||
|
||||
- obfd = bfd_openw (output_filename, output_target);
|
||||
+ if (ofd >= 0)
|
||||
+ obfd = bfd_fdopenw (output_filename, output_target, ofd);
|
||||
+ else
|
||||
+ obfd = bfd_openw (output_filename, output_target);
|
||||
+
|
||||
if (obfd == NULL)
|
||||
{
|
||||
+ close (ofd);
|
||||
bfd_nonfatal_message (output_filename, NULL, NULL, NULL);
|
||||
status = 1;
|
||||
return;
|
||||
@@ -3787,13 +3792,19 @@ copy_file (const char *input_filename, const char *output_filename,
|
||||
if (output_target == NULL)
|
||||
output_target = bfd_get_target (ibfd);
|
||||
|
||||
- obfd = bfd_openw (output_filename, output_target);
|
||||
+ if (ofd >= 0)
|
||||
+ obfd = bfd_fdopenw (output_filename, output_target, ofd);
|
||||
+ else
|
||||
+ obfd = bfd_openw (output_filename, output_target);
|
||||
+
|
||||
if (obfd == NULL)
|
||||
{
|
||||
+ close (ofd);
|
||||
bfd_nonfatal_message (output_filename, NULL, NULL, NULL);
|
||||
status = 1;
|
||||
return;
|
||||
}
|
||||
+
|
||||
/* This is a no-op on non-Coff targets. */
|
||||
set_long_section_mode (obfd, ibfd, long_section_names);
|
||||
|
||||
@@ -4746,6 +4757,7 @@ strip_main (int argc, char *argv[])
|
||||
int hold_status = status;
|
||||
struct stat statbuf;
|
||||
char *tmpname;
|
||||
+ int tmpfd = -1;
|
||||
|
||||
if (get_file_size (argv[i]) < 1)
|
||||
{
|
||||
@@ -4760,7 +4772,7 @@ strip_main (int argc, char *argv[])
|
||||
|
||||
if (output_file == NULL
|
||||
|| filename_cmp (argv[i], output_file) == 0)
|
||||
- tmpname = make_tempname (argv[i]);
|
||||
+ tmpname = make_tempname (argv[i], &tmpfd);
|
||||
else
|
||||
tmpname = output_file;
|
||||
|
||||
@@ -4773,15 +4785,13 @@ strip_main (int argc, char *argv[])
|
||||
}
|
||||
|
||||
status = 0;
|
||||
- copy_file (argv[i], tmpname, input_target, output_target, NULL);
|
||||
+ copy_file (argv[i], tmpname, tmpfd, input_target, output_target, NULL);
|
||||
if (status == 0)
|
||||
{
|
||||
- if (preserve_dates)
|
||||
- set_times (tmpname, &statbuf);
|
||||
if (output_file != tmpname)
|
||||
status = (smart_rename (tmpname,
|
||||
output_file ? output_file : argv[i],
|
||||
- preserve_dates) != 0);
|
||||
+ preserve_dates ? &statbuf : NULL) != 0);
|
||||
if (status == 0)
|
||||
status = hold_status;
|
||||
}
|
||||
@@ -4993,7 +5003,7 @@ copy_main (int argc, char *argv[])
|
||||
bfd_boolean formats_info = FALSE;
|
||||
bfd_boolean use_globalize = FALSE;
|
||||
bfd_boolean use_keep_global = FALSE;
|
||||
- int c;
|
||||
+ int c, tmpfd = -1;
|
||||
struct stat statbuf;
|
||||
const bfd_arch_info_type *input_arch = NULL;
|
||||
|
||||
@@ -5839,7 +5849,7 @@ copy_main (int argc, char *argv[])
|
||||
are the same, then create a temp and rename the result into the input. */
|
||||
if (output_filename == NULL
|
||||
|| filename_cmp (input_filename, output_filename) == 0)
|
||||
- tmpname = make_tempname (input_filename);
|
||||
+ tmpname = make_tempname (input_filename, &tmpfd);
|
||||
else
|
||||
tmpname = output_filename;
|
||||
|
||||
@@ -5847,14 +5857,13 @@ copy_main (int argc, char *argv[])
|
||||
fatal (_("warning: could not create temporary file whilst copying '%s', (error: %s)"),
|
||||
input_filename, strerror (errno));
|
||||
|
||||
- copy_file (input_filename, tmpname, input_target, output_target, input_arch);
|
||||
+ copy_file (input_filename, tmpname, tmpfd, input_target, output_target,
|
||||
+ input_arch);
|
||||
if (status == 0)
|
||||
{
|
||||
- if (preserve_dates)
|
||||
- set_times (tmpname, &statbuf);
|
||||
if (tmpname != output_filename)
|
||||
status = (smart_rename (tmpname, input_filename,
|
||||
- preserve_dates) != 0);
|
||||
+ preserve_dates ? &statbuf : NULL) != 0);
|
||||
}
|
||||
else
|
||||
unlink_if_ordinary (tmpname);
|
||||
diff --git a/binutils/rename.c b/binutils/rename.c
|
||||
index bf3b68d0462..07d44d0f314 100644
|
||||
--- a/binutils/rename.c
|
||||
+++ b/binutils/rename.c
|
||||
@@ -24,14 +24,9 @@
|
||||
|
||||
#ifdef HAVE_GOOD_UTIME_H
|
||||
#include <utime.h>
|
||||
-#else /* ! HAVE_GOOD_UTIME_H */
|
||||
-#ifdef HAVE_UTIMES
|
||||
+#elif defined HAVE_UTIMES
|
||||
#include <sys/time.h>
|
||||
-#endif /* HAVE_UTIMES */
|
||||
-#endif /* ! HAVE_GOOD_UTIME_H */
|
||||
-
|
||||
-#if ! defined (_WIN32) || defined (__CYGWIN32__)
|
||||
-static int simple_copy (const char *, const char *);
|
||||
+#endif
|
||||
|
||||
/* The number of bytes to copy at once. */
|
||||
#define COPY_BUF 8192
|
||||
@@ -82,7 +77,6 @@ simple_copy (const char *from, const char *to)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
-#endif /* __CYGWIN32__ or not _WIN32 */
|
||||
|
||||
/* Set the times of the file DESTINATION to be the same as those in
|
||||
STATBUF. */
|
||||
@@ -91,122 +85,52 @@ void
|
||||
set_times (const char *destination, const struct stat *statbuf)
|
||||
{
|
||||
int result;
|
||||
-
|
||||
- {
|
||||
#ifdef HAVE_GOOD_UTIME_H
|
||||
- struct utimbuf tb;
|
||||
-
|
||||
- tb.actime = statbuf->st_atime;
|
||||
- tb.modtime = statbuf->st_mtime;
|
||||
- result = utime (destination, &tb);
|
||||
-#else /* ! HAVE_GOOD_UTIME_H */
|
||||
-#ifndef HAVE_UTIMES
|
||||
- long tb[2];
|
||||
-
|
||||
- tb[0] = statbuf->st_atime;
|
||||
- tb[1] = statbuf->st_mtime;
|
||||
- result = utime (destination, tb);
|
||||
-#else /* HAVE_UTIMES */
|
||||
- struct timeval tv[2];
|
||||
-
|
||||
- tv[0].tv_sec = statbuf->st_atime;
|
||||
- tv[0].tv_usec = 0;
|
||||
- tv[1].tv_sec = statbuf->st_mtime;
|
||||
- tv[1].tv_usec = 0;
|
||||
- result = utimes (destination, tv);
|
||||
-#endif /* HAVE_UTIMES */
|
||||
-#endif /* ! HAVE_GOOD_UTIME_H */
|
||||
- }
|
||||
+ struct utimbuf tb;
|
||||
+
|
||||
+ tb.actime = statbuf->st_atime;
|
||||
+ tb.modtime = statbuf->st_mtime;
|
||||
+ result = utime (destination, &tb);
|
||||
+#elif defined HAVE_UTIMES
|
||||
+ struct timeval tv[2];
|
||||
+
|
||||
+ tv[0].tv_sec = statbuf->st_atime;
|
||||
+ tv[0].tv_usec = 0;
|
||||
+ tv[1].tv_sec = statbuf->st_mtime;
|
||||
+ tv[1].tv_usec = 0;
|
||||
+ result = utimes (destination, tv);
|
||||
+#else
|
||||
+ long tb[2];
|
||||
+
|
||||
+ tb[0] = statbuf->st_atime;
|
||||
+ tb[1] = statbuf->st_mtime;
|
||||
+ result = utime (destination, tb);
|
||||
+#endif
|
||||
|
||||
if (result != 0)
|
||||
non_fatal (_("%s: cannot set time: %s"), destination, strerror (errno));
|
||||
}
|
||||
|
||||
-#ifndef S_ISLNK
|
||||
-#ifdef S_IFLNK
|
||||
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
-#else
|
||||
-#define S_ISLNK(m) 0
|
||||
-#define lstat stat
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
-/* Rename FROM to TO, copying if TO is a link.
|
||||
- Return 0 if ok, -1 if error. */
|
||||
+/* Copy FROM to TO. TARGET_STAT has the file status that, if non-NULL,
|
||||
+ is used to fix up timestamps. Return 0 if ok, -1 if error.
|
||||
+ At one time this function renamed files, but file permissions are
|
||||
+ tricky to update given the number of different schemes used by
|
||||
+ various systems. So now we just copy. */
|
||||
|
||||
int
|
||||
-smart_rename (const char *from, const char *to, int preserve_dates ATTRIBUTE_UNUSED)
|
||||
+smart_rename (const char *from, const char *to,
|
||||
+ struct stat *target_stat)
|
||||
{
|
||||
- bfd_boolean exists;
|
||||
- struct stat s;
|
||||
- int ret = 0;
|
||||
-
|
||||
- exists = lstat (to, &s) == 0;
|
||||
-
|
||||
-#if defined (_WIN32) && !defined (__CYGWIN32__)
|
||||
- /* Win32, unlike unix, will not erase `to' in `rename(from, to)' but
|
||||
- fail instead. Also, chown is not present. */
|
||||
+ int ret;
|
||||
|
||||
- if (exists)
|
||||
- remove (to);
|
||||
-
|
||||
- ret = rename (from, to);
|
||||
+ ret = simple_copy (from, to);
|
||||
if (ret != 0)
|
||||
- {
|
||||
- /* We have to clean up here. */
|
||||
- non_fatal (_("unable to rename '%s'; reason: %s"), to, strerror (errno));
|
||||
- unlink (from);
|
||||
- }
|
||||
-#else
|
||||
- /* Use rename only if TO is not a symbolic link and has
|
||||
- only one hard link, and we have permission to write to it. */
|
||||
- if (! exists
|
||||
- || (!S_ISLNK (s.st_mode)
|
||||
- && S_ISREG (s.st_mode)
|
||||
- && (s.st_mode & S_IWUSR)
|
||||
- && s.st_nlink == 1)
|
||||
- )
|
||||
- {
|
||||
- ret = rename (from, to);
|
||||
- if (ret == 0)
|
||||
- {
|
||||
- if (exists)
|
||||
- {
|
||||
- /* Try to preserve the permission bits and ownership of
|
||||
- TO. First get the mode right except for the setuid
|
||||
- bit. Then change the ownership. Then fix the setuid
|
||||
- bit. We do the chmod before the chown because if the
|
||||
- chown succeeds, and we are a normal user, we won't be
|
||||
- able to do the chmod afterward. We don't bother to
|
||||
- fix the setuid bit first because that might introduce
|
||||
- a fleeting security problem, and because the chown
|
||||
- will clear the setuid bit anyhow. We only fix the
|
||||
- setuid bit if the chown succeeds, because we don't
|
||||
- want to introduce an unexpected setuid file owned by
|
||||
- the user running objcopy. */
|
||||
- chmod (to, s.st_mode & 0777);
|
||||
- if (chown (to, s.st_uid, s.st_gid) >= 0)
|
||||
- chmod (to, s.st_mode & 07777);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* We have to clean up here. */
|
||||
- non_fatal (_("unable to rename '%s'; reason: %s"), to, strerror (errno));
|
||||
- unlink (from);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- ret = simple_copy (from, to);
|
||||
- if (ret != 0)
|
||||
- non_fatal (_("unable to copy file '%s'; reason: %s"), to, strerror (errno));
|
||||
+ non_fatal (_("unable to copy file '%s'; reason: %s"),
|
||||
+ to, strerror (errno));
|
||||
|
||||
- if (preserve_dates)
|
||||
- set_times (to, &s);
|
||||
- unlink (from);
|
||||
- }
|
||||
-#endif /* _WIN32 && !__CYGWIN32__ */
|
||||
+ if (target_stat != NULL)
|
||||
+ set_times (to, target_stat);
|
||||
+ unlink (from);
|
||||
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
83
meta/recipes-devtools/binutils/binutils/CVE-2021-3487.patch
Normal file
83
meta/recipes-devtools/binutils/binutils/CVE-2021-3487.patch
Normal file
@@ -0,0 +1,83 @@
|
||||
From 647cebce12a6b0a26960220caff96ff38978cf24 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu, 26 Nov 2020 17:08:33 +0000
|
||||
Subject: [PATCH] Prevent a memory allocation failure when parsing corrupt
|
||||
DWARF debug sections.
|
||||
|
||||
PR 26946
|
||||
* dwarf2.c (read_section): Check for debug sections with excessive
|
||||
sizes.
|
||||
|
||||
|
||||
Upstream-Status: Backport [
|
||||
https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=647cebce12a6b0a26960220caff96ff38978cf24
|
||||
]
|
||||
CVE: CVE-2021-3487
|
||||
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
|
||||
|
||||
---
|
||||
bfd/dwarf2.c | 25 +++++++++++++++++++------
|
||||
1 files changed, 25 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
|
||||
index 977bf43a6a1..8bbfc81d3e7 100644
|
||||
--- a/bfd/dwarf2.c
|
||||
+++ b/bfd/dwarf2.c
|
||||
@@ -531,22 +531,24 @@ read_section (bfd * abfd,
|
||||
bfd_byte ** section_buffer,
|
||||
bfd_size_type * section_size)
|
||||
{
|
||||
- asection *msec;
|
||||
const char *section_name = sec->uncompressed_name;
|
||||
bfd_byte *contents = *section_buffer;
|
||||
- bfd_size_type amt;
|
||||
|
||||
/* The section may have already been read. */
|
||||
if (contents == NULL)
|
||||
{
|
||||
+ bfd_size_type amt;
|
||||
+ asection *msec;
|
||||
+ ufile_ptr filesize;
|
||||
+
|
||||
msec = bfd_get_section_by_name (abfd, section_name);
|
||||
- if (! msec)
|
||||
+ if (msec == NULL)
|
||||
{
|
||||
section_name = sec->compressed_name;
|
||||
if (section_name != NULL)
|
||||
msec = bfd_get_section_by_name (abfd, section_name);
|
||||
}
|
||||
- if (! msec)
|
||||
+ if (msec == NULL)
|
||||
{
|
||||
_bfd_error_handler (_("DWARF error: can't find %s section."),
|
||||
sec->uncompressed_name);
|
||||
@@ -554,12 +556,23 @@ read_section (bfd * abfd,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- *section_size = msec->rawsize ? msec->rawsize : msec->size;
|
||||
+ amt = bfd_get_section_limit_octets (abfd, msec);
|
||||
+ filesize = bfd_get_file_size (abfd);
|
||||
+ if (amt >= filesize)
|
||||
+ {
|
||||
+ /* PR 26946 */
|
||||
+ _bfd_error_handler (_("DWARF error: section %s is larger than its filesize! (0x%lx vs 0x%lx)"),
|
||||
+ section_name, (long) amt, (long) filesize);
|
||||
+ bfd_set_error (bfd_error_bad_value);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ *section_size = amt;
|
||||
/* Paranoia - alloc one extra so that we can make sure a string
|
||||
section is NUL terminated. */
|
||||
- amt = *section_size + 1;
|
||||
+ amt += 1;
|
||||
if (amt == 0)
|
||||
{
|
||||
+ /* Paranoia - this should never happen. */
|
||||
bfd_set_error (bfd_error_no_memory);
|
||||
return FALSE;
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
SECTION = "devel"
|
||||
|
||||
DEPENDS += "expect-native"
|
||||
RDEPENDS_${PN} = "expect"
|
||||
|
||||
inherit autotools
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ require go-target.inc
|
||||
|
||||
export GOBUILDMODE=""
|
||||
export CGO_ENABLED_riscv64 = ""
|
||||
# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips/riscv
|
||||
# doesn't support -buildmode=pie, so skip the QA checking for mips/riscv and its
|
||||
# variants.
|
||||
# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but
|
||||
# windows/mips/riscv doesn't support -buildmode=pie, so skip the QA checking
|
||||
# for windows/mips/riscv and their variants.
|
||||
python() {
|
||||
if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True):
|
||||
if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True) or 'windows' in d.getVar('TARGET_GOOS', True):
|
||||
d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel")
|
||||
else:
|
||||
d.setVar('GOBUILDMODE', 'pie')
|
||||
|
||||
@@ -17,6 +17,11 @@ SRC_URI[map.sha256sum] = "3149351c8cbc3fb230bbf6188617c7ffda77d9e14333f4f5f0aa1a
|
||||
|
||||
UPSTREAM_CHECK_REGEX = "jquery-(?P<pver>\d+(\.\d+)+)\.js"
|
||||
|
||||
# https://github.com/jquery/jquery/issues/3927
|
||||
# There are ways jquery can expose security issues but any issues are in the apps exposing them
|
||||
# and there is little we can directly do
|
||||
CVE_CHECK_WHITELIST += "CVE-2007-2379"
|
||||
|
||||
inherit allarch
|
||||
|
||||
do_install() {
|
||||
|
||||
@@ -22,6 +22,7 @@ SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
|
||||
file://0001-libtool-Fix-support-for-NIOS2-processor.patch \
|
||||
file://0001-libtool-Check-for-static-libs-for-internal-compiler-.patch \
|
||||
file://0001-Makefile.am-make-sure-autoheader-run-before-autoconf.patch \
|
||||
file://0001-Makefile.am-make-sure-autoheader-run-before-automake.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "addf44b646ddb4e3919805aa88fa7c5e"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From e82c06584f02e3e4487aa73aa05981e2a35dc6d1 Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <mingli.yu@windriver.com>
|
||||
Date: Tue, 13 Apr 2021 07:17:29 +0000
|
||||
Subject: [PATCH] Makefile.am: make sure autoheader run before automake
|
||||
|
||||
When use automake to generate Makefile.in from Makefile.am, there
|
||||
comes below race:
|
||||
| configure.ac:45: error: required file 'config-h.in' not found
|
||||
|
||||
It is because the file config-h.in in updating process by autoheader,
|
||||
so make automake run after autoheader to avoid the above race.
|
||||
|
||||
Upstream-Status: Submitted [libtool-patches@gnu.org maillist]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 2752ecc..29950db 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -328,7 +328,7 @@ EXTRA_DIST += $(lt_aclocal_m4) \
|
||||
$(lt_obsolete_m4) \
|
||||
$(stamp_mk)
|
||||
|
||||
-$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4)
|
||||
+$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4) $(lt_config_h_in)
|
||||
$(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOMAKE) Makefile
|
||||
|
||||
# Don't let unused scripts leak into the libltdl Makefile
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -6,7 +6,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo;branch=oe-core \
|
||||
file://fallback-group \
|
||||
"
|
||||
|
||||
SRCREV = "60e25a36558f1f07dcce1a044fe976b475bec42b"
|
||||
SRCREV = "ee24ebec9e5a11dd5208c9be2870f35eab3b9e20"
|
||||
S = "${WORKDIR}/git"
|
||||
PV = "1.9.0+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ HOMEPAGE = "https://pypi.org/project/Jinja/"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462"
|
||||
|
||||
SRC_URI[sha256sum] = "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"
|
||||
SRC_URI[sha256sum] = "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"
|
||||
|
||||
PYPI_PACKAGE = "Jinja2"
|
||||
|
||||
@@ -54,12 +54,24 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
|
||||
file://CVE-2020-24352.patch \
|
||||
file://CVE-2020-25723.patch \
|
||||
file://CVE-2021-20203.patch \
|
||||
file://CVE-2021-3392.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
|
||||
|
||||
SRC_URI[md5sum] = "278eeb294e4b497e79af7a57e660cb9a"
|
||||
SRC_URI[sha256sum] = "d3481d4108ce211a053ef15be69af1bdd9dde1510fda80d92be0f6c3e98768f0"
|
||||
|
||||
# Applies against virglrender < 0.6.0 and not qemu itself
|
||||
CVE_CHECK_WHITELIST += "CVE-2017-5957"
|
||||
|
||||
# The VNC server can expose host files uder some circumstances. We don't
|
||||
# enable it by default.
|
||||
CVE_CHECK_WHITELIST += "CVE-2007-0998"
|
||||
|
||||
# 'The issues identified by this CVE were determined to not constitute a vulnerability.'
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11
|
||||
CVE_CHECK_WHITELIST += "CVE-2018-18438"
|
||||
|
||||
COMPATIBLE_HOST_mipsarchn32 = "null"
|
||||
COMPATIBLE_HOST_mipsarchn64 = "null"
|
||||
|
||||
|
||||
92
meta/recipes-devtools/qemu/qemu/CVE-2021-3392.patch
Normal file
92
meta/recipes-devtools/qemu/qemu/CVE-2021-3392.patch
Normal file
@@ -0,0 +1,92 @@
|
||||
From 3791642c8d60029adf9b00bcb4e34d7d8a1aea4d Mon Sep 17 00:00:00 2001
|
||||
From: Michael Tokarev <mjt@tls.msk.ru>
|
||||
Date: Mon, 19 Apr 2021 15:42:47 +0200
|
||||
Subject: [PATCH] mptsas: Remove unused MPTSASState 'pending' field
|
||||
(CVE-2021-3392)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=utf8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
While processing SCSI i/o requests in mptsas_process_scsi_io_request(),
|
||||
the Megaraid emulator appends new MPTSASRequest object 'req' to
|
||||
the 's->pending' queue. In case of an error, this same object gets
|
||||
dequeued in mptsas_free_request() only if SCSIRequest object
|
||||
'req->sreq' is initialised. This may lead to a use-after-free issue.
|
||||
|
||||
Since s->pending is actually not used, simply remove it from
|
||||
MPTSASState.
|
||||
|
||||
Cc: qemu-stable@nongnu.org
|
||||
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
|
||||
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Reported-by: Cheolwoo Myung <cwmyung@snu.ac.kr>
|
||||
Message-id: 20210419134247.1467982-1-f4bug@amsat.org
|
||||
Message-Id: <20210416102243.1293871-1-mjt@msgid.tls.msk.ru>
|
||||
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Reported-by: Cheolwoo Myung <cwmyung@snu.ac.kr>
|
||||
BugLink: https://bugs.launchpad.net/qemu/+bug/1914236 (CVE-2021-3392)
|
||||
Fixes: e351b826112 ("hw: Add support for LSI SAS1068 (mptsas) device")
|
||||
[PMD: Reworded description, added more tags]
|
||||
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
|
||||
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
||||
|
||||
Upstream-Status: Backport [ https://git.qemu.org/?p=qemu.git;a=commit;h=3791642c8d60029adf9b00bcb4e34d7d8a1aea4d ]
|
||||
CVE: CVE-2021-3392
|
||||
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
|
||||
---
|
||||
hw/scsi/mptsas.c | 6 ------
|
||||
hw/scsi/mptsas.h | 1 -
|
||||
2 files changed, 7 deletions(-)
|
||||
|
||||
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
|
||||
index 7416e78..db3219e 100644
|
||||
--- a/hw/scsi/mptsas.c
|
||||
+++ b/hw/scsi/mptsas.c
|
||||
@@ -251,13 +251,10 @@ static int mptsas_build_sgl(MPTSASState *s, MPTSASRequest *req, hwaddr addr)
|
||||
|
||||
static void mptsas_free_request(MPTSASRequest *req)
|
||||
{
|
||||
- MPTSASState *s = req->dev;
|
||||
-
|
||||
if (req->sreq != NULL) {
|
||||
req->sreq->hba_private = NULL;
|
||||
scsi_req_unref(req->sreq);
|
||||
req->sreq = NULL;
|
||||
- QTAILQ_REMOVE(&s->pending, req, next);
|
||||
}
|
||||
qemu_sglist_destroy(&req->qsg);
|
||||
g_free(req);
|
||||
@@ -303,7 +300,6 @@ static int mptsas_process_scsi_io_request(MPTSASState *s,
|
||||
}
|
||||
|
||||
req = g_new0(MPTSASRequest, 1);
|
||||
- QTAILQ_INSERT_TAIL(&s->pending, req, next);
|
||||
req->scsi_io = *scsi_io;
|
||||
req->dev = s;
|
||||
|
||||
@@ -1319,8 +1315,6 @@ static void mptsas_scsi_realize(PCIDevice *dev, Error **errp)
|
||||
|
||||
s->request_bh = qemu_bh_new(mptsas_fetch_requests, s);
|
||||
|
||||
- QTAILQ_INIT(&s->pending);
|
||||
-
|
||||
scsi_bus_new(&s->bus, sizeof(s->bus), &dev->qdev, &mptsas_scsi_info, NULL);
|
||||
}
|
||||
|
||||
diff --git a/hw/scsi/mptsas.h b/hw/scsi/mptsas.h
|
||||
index b85ac1a..c046497 100644
|
||||
--- a/hw/scsi/mptsas.h
|
||||
+++ b/hw/scsi/mptsas.h
|
||||
@@ -79,7 +79,6 @@ struct MPTSASState {
|
||||
uint16_t reply_frame_size;
|
||||
|
||||
SCSIBus bus;
|
||||
- QTAILQ_HEAD(, MPTSASRequest) pending;
|
||||
};
|
||||
|
||||
void mptsas_fix_scsi_io_endianness(MPIMsgSCSIIORequest *req);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
117
meta/recipes-devtools/subversion/subversion/CVE-2020-17525.patch
Normal file
117
meta/recipes-devtools/subversion/subversion/CVE-2020-17525.patch
Normal file
@@ -0,0 +1,117 @@
|
||||
Upstream-Status: Backport [ https://subversion.apache.org/security/CVE-2020-17525-advisory.txt ]
|
||||
CVE: CVE-2020-17525
|
||||
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
|
||||
|
||||
Remote unauthenticated denial-of-service in Subversion mod_authz_svn.
|
||||
|
||||
Summary:
|
||||
========
|
||||
|
||||
Subversion's mod_authz_svn module will crash if the server is using
|
||||
in-repository authz rules with the AuthzSVNReposRelativeAccessFile
|
||||
option and a client sends a request for a non-existing repository URL.
|
||||
|
||||
This can lead to disruption for users of the service.
|
||||
|
||||
Known vulnerable:
|
||||
=================
|
||||
|
||||
mod_dav_svn+mod_authz_svn servers 1.9.0 through 1.10.6 (inclusive).
|
||||
mod_dav_svn+mod_authz_svn servers 1.11.0 through 1.14.0 (inclusive).
|
||||
|
||||
Known fixed:
|
||||
============
|
||||
|
||||
mod_dav_svn+mod_authz_svn servers 1.14.1
|
||||
mod_dav_svn+mod_authz_svn servers 1.10.7
|
||||
|
||||
Details:
|
||||
========
|
||||
|
||||
A null-pointer-dereference has been found in mod_authz_svn that results in
|
||||
a remote unauthenticated Denial-of-Service in some server configurations.
|
||||
|
||||
The vulnerability can be triggered by an unauthenticated user if the
|
||||
Apache HTTPD server is configured to use an in-repository authz file,
|
||||
with configuration directives such as:
|
||||
|
||||
AuthzSVNAccessFile "^/authz"
|
||||
AuthzSVNReposRelativeAccessFile "^/authz"
|
||||
|
||||
The problem originates when sending a GET request to a non-existent
|
||||
repository. The mod_authz_svn module will attempt to find authz rules
|
||||
at a path within the requested SVN repository. Upon constructing this
|
||||
path, the function svn_repos_find_root_path will return a NULL pointer
|
||||
since the requested repository does not exist on-disk.
|
||||
A check for this legitimate NULL pointer condition is missing, which
|
||||
results in a segmentation fault when the NULL pointer is used.
|
||||
|
||||
The in-repository authz feature was first introduced in Subversion 1.8:
|
||||
https://subversion.apache.org/docs/release-notes/1.8.html#in-repo-authz
|
||||
|
||||
The missing NULL check was first introduced during refactoring of the
|
||||
authz code during development work leading up to Subversion 1.9.
|
||||
Subversion 1.8 servers are unaffected.
|
||||
|
||||
Severity:
|
||||
=========
|
||||
|
||||
CVSSv3 Base Score: 7.5 (High)
|
||||
|
||||
CVSSv3 Base Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
|
||||
|
||||
Exploitation results in denial of service by crashing the HTTPD worker
|
||||
handling the request. The impact of this differs depending on how the
|
||||
Apache HTTPD server is configured, including the choice of MPM (Multi-
|
||||
Processing-Module). If the worker shares its memory address space with
|
||||
the main thread, as is the case with e.g. the Event MPM, the entire
|
||||
HTTPD server process will terminate. If the pre-fork MPM is used, the
|
||||
worker will terminate but the HTTPD server will stay up, and service
|
||||
availability will depend on how frequently the attacker is able to
|
||||
send malicious requests which target the vulnerability.
|
||||
|
||||
Recommendations:
|
||||
================
|
||||
|
||||
We recommend all users to upgrade to a known fixed release of the
|
||||
Subversion mod_dav_svn server.
|
||||
|
||||
Users who are unable to upgrade may apply the included patches.
|
||||
|
||||
As a workaround, the use of in-repository authz rules files with
|
||||
the AuthzSVNReposRelativeAccessFile can be avoided by switching
|
||||
to an alternative configuration which fetches an authz rules file
|
||||
from the server's filesystem, rather than from an SVN repository.
|
||||
|
||||
References:
|
||||
===========
|
||||
|
||||
CVE-2020-17525 (Subversion)
|
||||
|
||||
Reported by:
|
||||
============
|
||||
|
||||
Thomas Åkesson, simonsoft.se
|
||||
|
||||
Patches:
|
||||
========
|
||||
|
||||
Patch for Subversion 1.10, 1.14:
|
||||
|
||||
[[[
|
||||
Index: subversion/libsvn_repos/config_file.c
|
||||
===================================================================
|
||||
--- a/subversion/libsvn_repos/config_file.c (revision 1883994)
|
||||
+++ b/subversion/libsvn_repos/config_file.c (working copy)
|
||||
@@ -237,6 +237,10 @@ get_repos_config(svn_stream_t **stream,
|
||||
{
|
||||
/* Search for a repository in the full path. */
|
||||
repos_root_dirent = svn_repos_find_root_path(dirent, scratch_pool);
|
||||
+ if (repos_root_dirent == NULL)
|
||||
+ return svn_error_trace(handle_missing_file(stream, checksum, access,
|
||||
+ url, must_exist,
|
||||
+ svn_node_none));
|
||||
|
||||
/* Attempt to open a repository at repos_root_dirent. */
|
||||
SVN_ERR(svn_repos_open3(&access->repos, repos_root_dirent, NULL,
|
||||
]]]
|
||||
@@ -12,6 +12,7 @@ SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
|
||||
file://disable_macos.patch \
|
||||
file://0001-Fix-libtool-name-in-configure.ac.patch \
|
||||
file://serfmacro.patch \
|
||||
file://CVE-2020-17525.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "3004b4dae18bf45a0b6ea4ef8820064d"
|
||||
|
||||
@@ -16,6 +16,9 @@ SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8
|
||||
|
||||
inherit autotools gettext texinfo
|
||||
|
||||
# Issue applies to use of cpio in SUSE/OBS, doesn't apply to us
|
||||
CVE_CHECK_WHITELIST += "CVE-2010-4226"
|
||||
|
||||
EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}"
|
||||
|
||||
do_install () {
|
||||
|
||||
@@ -19,6 +19,10 @@ DEPENDS_class-native = "libpng-native"
|
||||
UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases"
|
||||
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
|
||||
|
||||
# The jpeg issue in the CVE is present in the gs jpeg sources
|
||||
# however we use an external jpeg which doesn't have the issue.
|
||||
CVE_CHECK_WHITELIST += "CVE-2013-6629"
|
||||
|
||||
def gs_verdir(v):
|
||||
return "".join(v.split("."))
|
||||
|
||||
|
||||
@@ -62,6 +62,10 @@ do_install_append() {
|
||||
rm -rf ${D}${bindir}/glilypond
|
||||
rm -rf ${D}${libdir}/groff/glilypond
|
||||
rm -rf ${D}${mandir}/man1/glilypond*
|
||||
|
||||
# not ship /usr/bin/grap2graph and its releated man files
|
||||
rm -rf ${D}${bindir}/grap2graph
|
||||
rm -rf ${D}${mandir}/man1/grap2graph*
|
||||
}
|
||||
|
||||
do_install_append_class-native() {
|
||||
|
||||
@@ -22,6 +22,9 @@ SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz
|
||||
SRC_URI[md5sum] = "afe109afea749c306ff489203fde6beb"
|
||||
SRC_URI[sha256sum] = "491fec9e89f1372f02a0ab66579aa2e9d63cac5178dfa672c204c88e693a908b"
|
||||
|
||||
# These CVEs are debian, gentoo or SUSE specific on the way logrotate was installed/used
|
||||
CVE_CHECK_WHITELIST += "CVE-2011-1548 CVE-2011-1549 CVE-2011-1550"
|
||||
|
||||
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}"
|
||||
|
||||
PACKAGECONFIG[acl] = ",,acl"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
lsb-release maintains it's own copy of help2man. Include the support
|
||||
for specifying SOURCE_DATE_EPOCH from upstream.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
|
||||
|
||||
diff --git a/help2man b/help2man
|
||||
index 13015c2..63439db 100755
|
||||
--- a/help2man
|
||||
+++ b/help2man
|
||||
@@ -173,7 +173,14 @@ my ($help_text, $version_text) = map {
|
||||
or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
|
||||
} qw(help), $opt_version_key;
|
||||
|
||||
-my $date = strftime "%B %Y", localtime;
|
||||
+my $epoch_secs = time;
|
||||
+if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/)
|
||||
+{
|
||||
+ $epoch_secs = $1;
|
||||
+ $ENV{TZ} = 'UTC0';
|
||||
+}
|
||||
+
|
||||
+my $date = strftime "%B %Y", localtime $epoch_secs;
|
||||
(my $program = $ARGV[0]) =~ s!.*/!!;
|
||||
my $package = $program;
|
||||
my $version;
|
||||
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
|
||||
file://0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch \
|
||||
file://0001-Remove-timestamp-from-manpage.patch \
|
||||
file://help2man-reproducibility.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
|
||||
|
||||
133
meta/recipes-extended/tar/tar/CVE-2021-20193.patch
Normal file
133
meta/recipes-extended/tar/tar/CVE-2021-20193.patch
Normal file
@@ -0,0 +1,133 @@
|
||||
From d9d4435692150fa8ff68e1b1a473d187cc3fd777 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Poznyakoff <gray@gnu.org>
|
||||
Date: Sun, 17 Jan 2021 20:41:11 +0200
|
||||
Subject: Fix memory leak in read_header
|
||||
|
||||
Bug reported in https://savannah.gnu.org/bugs/?59897
|
||||
|
||||
* src/list.c (read_header): Don't return directly from the loop.
|
||||
Instead set the status and break. Return the status. Free
|
||||
next_long_name and next_long_link before returning.
|
||||
|
||||
CVE: CVE-2021-20193
|
||||
Upstream-Status: Backport
|
||||
[https://git.savannah.gnu.org/cgit/tar.git/patch/?id=d9d4435692150fa8ff68e1b1a473d187cc3fd777]
|
||||
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
|
||||
|
||||
---
|
||||
src/list.c | 40 ++++++++++++++++++++++++++++------------
|
||||
1 file changed, 28 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/list.c b/src/list.c
|
||||
index e40a5c8..d7ef441 100644
|
||||
--- a/src/list.c
|
||||
+++ b/src/list.c
|
||||
@@ -408,26 +408,27 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||
enum read_header_mode mode)
|
||||
{
|
||||
union block *header;
|
||||
- union block *header_copy;
|
||||
char *bp;
|
||||
union block *data_block;
|
||||
size_t size, written;
|
||||
- union block *next_long_name = 0;
|
||||
- union block *next_long_link = 0;
|
||||
+ union block *next_long_name = NULL;
|
||||
+ union block *next_long_link = NULL;
|
||||
size_t next_long_name_blocks = 0;
|
||||
size_t next_long_link_blocks = 0;
|
||||
-
|
||||
+ enum read_header status = HEADER_SUCCESS;
|
||||
+
|
||||
while (1)
|
||||
{
|
||||
- enum read_header status;
|
||||
-
|
||||
header = find_next_block ();
|
||||
*return_block = header;
|
||||
if (!header)
|
||||
- return HEADER_END_OF_FILE;
|
||||
+ {
|
||||
+ status = HEADER_END_OF_FILE;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
if ((status = tar_checksum (header, false)) != HEADER_SUCCESS)
|
||||
- return status;
|
||||
+ break;
|
||||
|
||||
/* Good block. Decode file size and return. */
|
||||
|
||||
@@ -437,7 +438,10 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||
{
|
||||
info->stat.st_size = OFF_FROM_HEADER (header->header.size);
|
||||
if (info->stat.st_size < 0)
|
||||
- return HEADER_FAILURE;
|
||||
+ {
|
||||
+ status = HEADER_FAILURE;
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (header->header.typeflag == GNUTYPE_LONGNAME
|
||||
@@ -447,10 +451,14 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||
|| header->header.typeflag == SOLARIS_XHDTYPE)
|
||||
{
|
||||
if (mode == read_header_x_raw)
|
||||
- return HEADER_SUCCESS_EXTENDED;
|
||||
+ {
|
||||
+ status = HEADER_SUCCESS_EXTENDED;
|
||||
+ break;
|
||||
+ }
|
||||
else if (header->header.typeflag == GNUTYPE_LONGNAME
|
||||
|| header->header.typeflag == GNUTYPE_LONGLINK)
|
||||
{
|
||||
+ union block *header_copy;
|
||||
size_t name_size = info->stat.st_size;
|
||||
size_t n = name_size % BLOCKSIZE;
|
||||
size = name_size + BLOCKSIZE;
|
||||
@@ -517,7 +525,10 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||
xheader_decode_global (&xhdr);
|
||||
xheader_destroy (&xhdr);
|
||||
if (mode == read_header_x_global)
|
||||
- return HEADER_SUCCESS_EXTENDED;
|
||||
+ {
|
||||
+ status = HEADER_SUCCESS_EXTENDED;
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Loop! */
|
||||
@@ -536,6 +547,7 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||
name = next_long_name->buffer + BLOCKSIZE;
|
||||
recent_long_name = next_long_name;
|
||||
recent_long_name_blocks = next_long_name_blocks;
|
||||
+ next_long_name = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -567,6 +579,7 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||
name = next_long_link->buffer + BLOCKSIZE;
|
||||
recent_long_link = next_long_link;
|
||||
recent_long_link_blocks = next_long_link_blocks;
|
||||
+ next_long_link = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -578,9 +591,12 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||
}
|
||||
assign_string (&info->link_name, name);
|
||||
|
||||
- return HEADER_SUCCESS;
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
+ free (next_long_name);
|
||||
+ free (next_long_link);
|
||||
+ return status;
|
||||
}
|
||||
|
||||
#define ISOCTAL(c) ((c)>='0'&&(c)<='7')
|
||||
--
|
||||
cgit v1.2.1
|
||||
|
||||
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
|
||||
SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \
|
||||
file://musl_dirent.patch \
|
||||
file://CVE-2021-20193.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "17917356fff5cb4bd3cd5a6c3e727b05"
|
||||
|
||||
@@ -32,6 +32,9 @@ UPSTREAM_VERSION_UNKNOWN = "1"
|
||||
SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
|
||||
SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
|
||||
|
||||
# Patch from https://bugzilla.redhat.com/attachment.cgi?id=293893&action=diff applied to 6.0 source
|
||||
CVE_CHECK_WHITELIST += "CVE-2008-0888"
|
||||
|
||||
# exclude version 5.5.2 which triggers a false positive
|
||||
UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz"
|
||||
|
||||
|
||||
@@ -24,3 +24,6 @@ PROVIDES += "libnotify3"
|
||||
RPROVIDES_${PN} += "libnotify3"
|
||||
RCONFLICTS_${PN} += "libnotify3"
|
||||
RREPLACES_${PN} += "libnotify3"
|
||||
|
||||
# -7381 is specific to the NodeJS bindings
|
||||
CVE_CHECK_WHITELIST += "CVE-2013-7381"
|
||||
|
||||
@@ -25,6 +25,9 @@ SRC_URI += "file://gtk-option.patch \
|
||||
|
||||
SRC_URI[archive.sha256sum] = "f7628905f1cada84e87e2b14883ed57d8094dca3281d5bcb24ece4279e9a92ba"
|
||||
|
||||
# Issue only on windows
|
||||
CVE_CHECK_WHITELIST += "CVE-2018-1000041"
|
||||
|
||||
CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
|
||||
|
||||
PACKAGECONFIG ??= "gdkpixbuf"
|
||||
|
||||
@@ -29,3 +29,5 @@ do_install () {
|
||||
chown builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_session.sh
|
||||
}
|
||||
|
||||
# -4178 is an unrelated 'builder'
|
||||
CVE_CHECK_WHITELIST = "CVE-2008-4178"
|
||||
|
||||
60
meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch
Normal file
60
meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
Fix stack buffer overflow.
|
||||
|
||||
CVE: CVE-2020-35492
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Lewin <heiko.lewin@worldiety.de>
|
||||
Date: Tue, 15 Dec 2020 16:48:19 +0100
|
||||
Subject: [PATCH] Fix mask usage in image-compositor
|
||||
|
||||
---
|
||||
src/cairo-image-compositor.c | 8 ++--
|
||||
test/Makefile.sources | 1 +
|
||||
test/bug-image-compositor.c | 39 ++++++++++++++++++++
|
||||
test/reference/bug-image-compositor.ref.png | Bin 0 -> 185 bytes
|
||||
4 files changed, 44 insertions(+), 4 deletions(-)
|
||||
create mode 100644 test/bug-image-compositor.c
|
||||
create mode 100644 test/reference/bug-image-compositor.ref.png
|
||||
|
||||
diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
|
||||
index 79ad69f68..4f8aaed99 100644
|
||||
--- a/src/cairo-image-compositor.c
|
||||
+++ b/src/cairo-image-compositor.c
|
||||
@@ -2601,14 +2601,14 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
|
||||
unsigned num_spans)
|
||||
{
|
||||
cairo_image_span_renderer_t *r = abstract_renderer;
|
||||
- uint8_t *m;
|
||||
+ uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask);
|
||||
int x0;
|
||||
|
||||
if (num_spans == 0)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
x0 = spans[0].x;
|
||||
- m = r->_buf;
|
||||
+ m = base;
|
||||
do {
|
||||
int len = spans[1].x - spans[0].x;
|
||||
if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) {
|
||||
@@ -2655,7 +2655,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
|
||||
spans[0].x, y,
|
||||
spans[1].x - spans[0].x, h);
|
||||
|
||||
- m = r->_buf;
|
||||
+ m = base;
|
||||
x0 = spans[1].x;
|
||||
} else if (spans[0].coverage == 0x0) {
|
||||
if (spans[0].x != x0) {
|
||||
@@ -2684,7 +2684,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
|
||||
#endif
|
||||
}
|
||||
|
||||
- m = r->_buf;
|
||||
+ m = base;
|
||||
x0 = spans[1].x;
|
||||
} else {
|
||||
*m++ = spans[0].coverage;
|
||||
--
|
||||
@@ -27,6 +27,7 @@ SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
|
||||
file://CVE-2018-19876.patch \
|
||||
file://CVE-2019-6461.patch \
|
||||
file://CVE-2019-6462.patch \
|
||||
file://CVE-2020-35492.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552"
|
||||
|
||||
@@ -26,7 +26,6 @@ SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
EXTRA_AUTORECONF += "--install --symlink"
|
||||
EXTRA_OECONF +=" --enable-tools --with-zlib"
|
||||
|
||||
PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
|
||||
|
||||
@@ -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=ef0565762eac313c409567b59dff00b2 \
|
||||
file://WHENCE;md5=e21a8cbddc1612bce56f06fe154a0743 \
|
||||
"
|
||||
|
||||
# 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] = "1bcb1a3944c361507754a7d26ccff40ffc28d1fb93bce711d67da26b33e785b7"
|
||||
SRC_URI[sha256sum] = "a2348f03492713dca9aef202496c6e58f5e63ee5bec6a7bdfcf8b18ce7155e70"
|
||||
|
||||
inherit allarch
|
||||
|
||||
@@ -229,6 +229,7 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
|
||||
${PN}-sd8887 ${PN}-sd8897 ${PN}-sd8997 ${PN}-usb8997 \
|
||||
${PN}-ti-connectivity-license ${PN}-wlcommon ${PN}-wl12xx ${PN}-wl18xx \
|
||||
${PN}-vt6656-license ${PN}-vt6656 \
|
||||
${PN}-rs9113 ${PN}-rs9116 \
|
||||
${PN}-rtl-license ${PN}-rtl8188 ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su ${PN}-rtl8723 ${PN}-rtl8821 \
|
||||
${PN}-rtl8168 \
|
||||
${PN}-cypress-license \
|
||||
@@ -529,6 +530,16 @@ RDEPENDS_${PN}-nvidia-gpu += "${PN}-nvidia-license"
|
||||
RDEPENDS_${PN}-nvidia-tegra += "${PN}-nvidia-license"
|
||||
RDEPENDS_${PN}-nvidia-tegra-k1 += "${PN}-nvidia-license"
|
||||
|
||||
# For RSI RS911x WiFi
|
||||
LICENSE_${PN}-rs9113 = "WHENCE"
|
||||
LICENSE_${PN}-rs9116 = "WHENCE"
|
||||
|
||||
FILES_${PN}-rs9113 = " ${nonarch_base_libdir}/firmware/rsi/rs9113*.rps "
|
||||
FILES_${PN}-rs9116 = " ${nonarch_base_libdir}/firmware/rsi/rs9116*.rps "
|
||||
|
||||
RDEPENDS_${PN}-rs9113 += "${PN}-whence-license"
|
||||
RDEPENDS_${PN}-rs9116 += "${PN}-whence-license"
|
||||
|
||||
# For rtl
|
||||
LICENSE_${PN}-rtl8188 = "Firmware-rtlwifi_firmware"
|
||||
LICENSE_${PN}-rtl8192cu = "Firmware-rtlwifi_firmware"
|
||||
@@ -645,8 +656,8 @@ FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.
|
||||
"
|
||||
FILES_${PN}-bcm4350c2 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350c2-pcie.bin"
|
||||
FILES_${PN}-bcm4350 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350-pcie.bin"
|
||||
FILES_${PN}-bcm4356 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-sdio.bin \
|
||||
${nonarch_base_libdir}/firmware/cypress/cyfmac4356-sdio.bin \
|
||||
FILES_${PN}-bcm4356 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-sdio.* \
|
||||
${nonarch_base_libdir}/firmware/cypress/cyfmac4356-sdio.* \
|
||||
"
|
||||
FILES_${PN}-bcm43569 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43569.bin"
|
||||
FILES_${PN}-bcm43570 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43570-pcie.bin \
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "65bbe689d98a007848008be2c8edeb5fa8066829"
|
||||
SRCREV_meta ?= "19738ca97b999a3b150e2d34232bb44b6537348f"
|
||||
SRCREV_machine ?= "b62ae8bedb024e67e7c5cda51840454a4170c858"
|
||||
SRCREV_meta ?= "b89df7433ea8124d3092805391b78808df4147a7"
|
||||
|
||||
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.4;destsuffix=${KMETA}"
|
||||
|
||||
LINUX_VERSION ?= "5.4.107"
|
||||
LINUX_VERSION ?= "5.4.116"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
|
||||
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
LINUX_VERSION ?= "5.4.107"
|
||||
LINUX_VERSION ?= "5.4.116"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
|
||||
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 ?= "ac3cbab1d6692d4a032dfffe0a604f39a634d18a"
|
||||
SRCREV_machine ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
|
||||
SRCREV_meta ?= "19738ca97b999a3b150e2d34232bb44b6537348f"
|
||||
SRCREV_machine_qemuarm ?= "80bd6016a9bdaed4b66ddffffa8c8e62d7c1f8a6"
|
||||
SRCREV_machine ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
|
||||
SRCREV_meta ?= "b89df7433ea8124d3092805391b78808df4147a7"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -12,16 +12,16 @@ KBRANCH_qemux86 ?= "v5.4/standard/base"
|
||||
KBRANCH_qemux86-64 ?= "v5.4/standard/base"
|
||||
KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine_qemuarm ?= "ea4097dbff5a148265018e1a998e02b5a05e3d27"
|
||||
SRCREV_machine_qemuarm64 ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
|
||||
SRCREV_machine_qemumips ?= "230ca33504faef6f40c5d3b24901aaacb901c9a6"
|
||||
SRCREV_machine_qemuppc ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
|
||||
SRCREV_machine_qemuriscv64 ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
|
||||
SRCREV_machine_qemux86 ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
|
||||
SRCREV_machine_qemux86-64 ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
|
||||
SRCREV_machine_qemumips64 ?= "84e071a893ef9cea8a8ffbcd233b47a2bc9056b5"
|
||||
SRCREV_machine ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
|
||||
SRCREV_meta ?= "19738ca97b999a3b150e2d34232bb44b6537348f"
|
||||
SRCREV_machine_qemuarm ?= "e71df0530eefcac1b3248329e385bcefbad6336e"
|
||||
SRCREV_machine_qemuarm64 ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
|
||||
SRCREV_machine_qemumips ?= "07445052fdd15e60b30dc5ae9d162c2e6bba47d1"
|
||||
SRCREV_machine_qemuppc ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
|
||||
SRCREV_machine_qemuriscv64 ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
|
||||
SRCREV_machine_qemux86 ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
|
||||
SRCREV_machine_qemux86-64 ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
|
||||
SRCREV_machine_qemumips64 ?= "b36d79d6f2aaf9dadec352f611e7b9becf2b9a55"
|
||||
SRCREV_machine ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
|
||||
SRCREV_meta ?= "b89df7433ea8124d3092805391b78808df4147a7"
|
||||
|
||||
# remap qemuarm to qemuarma15 for the 5.4 kernel
|
||||
# KMACHINE_qemuarm ?= "qemuarma15"
|
||||
@@ -30,7 +30,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.4;destsuffix=${KMETA}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
LINUX_VERSION ?= "5.4.107"
|
||||
LINUX_VERSION ?= "5.4.116"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -16,8 +16,10 @@ do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
|
||||
RDEPENDS_${PN}-dev = ""
|
||||
|
||||
DEPENDS += "bc-native bison-native"
|
||||
DEPENDS += "gmp-native"
|
||||
|
||||
EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
|
||||
EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
|
||||
|
||||
# Build some host tools under work-shared. CC, LD, and AR are probably
|
||||
# not used, but this is the historical way of invoking "make scripts".
|
||||
|
||||
@@ -265,7 +265,7 @@ PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python"
|
||||
|
||||
RDEPENDS_${PN} += "elfutils bash"
|
||||
RDEPENDS_${PN}-archive =+ "bash"
|
||||
RDEPENDS_${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python3', '', d)}"
|
||||
RDEPENDS_${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}"
|
||||
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
|
||||
RDEPENDS_${PN}-tests =+ "python3"
|
||||
|
||||
|
||||
@@ -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] = "b4164490d82ff7b0086e812ac42ab27baf57be24324d4c0ee1c5dd6ba27f2a52"
|
||||
SRC_URI[sha256sum] = "9e4c02b2a9710df4dbdb327c39612e8cbbae6495987afeddaebab28c1ea3d8fa"
|
||||
|
||||
inherit bin_package allarch
|
||||
|
||||
@@ -34,6 +34,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
|
||||
X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled"
|
||||
X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled"
|
||||
|
||||
QT5WAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}"
|
||||
|
||||
PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
|
||||
PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
|
||||
PACKAGECONFIG[dv1394] = "-Ddv1394=enabled,-Ddv1394=disabled,libiec61883 libavc1394 libraw1394"
|
||||
@@ -48,7 +50,7 @@ PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng"
|
||||
PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils"
|
||||
PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123"
|
||||
PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio"
|
||||
PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native"
|
||||
PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native ${QT5WAYLANDDEPENDS}"
|
||||
PACKAGECONFIG[soup] = "-Dsoup=enabled,-Dsoup=disabled,libsoup-2.4"
|
||||
PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex"
|
||||
PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib"
|
||||
|
||||
55
meta/recipes-multimedia/libtiff/files/CVE-2020-35523.patch
Normal file
55
meta/recipes-multimedia/libtiff/files/CVE-2020-35523.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
From c8d613ef497058fe653c467fc84c70a62a4a71b2 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Bernard <miniupnp@free.fr>
|
||||
Date: Tue, 10 Nov 2020 01:54:30 +0100
|
||||
Subject: [PATCH] gtTileContig(): check Tile width for overflow
|
||||
|
||||
fixes #211
|
||||
|
||||
Upstream-Status: Backport [ https://gitlab.com/libtiff/libtiff/-/commit/c8d613ef497058fe653c467fc84c70a62a4a71b2 ]
|
||||
CVE: CVE-2020-35523
|
||||
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
|
||||
---
|
||||
libtiff/tif_getimage.c | 17 +++++++++++++----
|
||||
1 file changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c
|
||||
index 4da785d3..96ab1460 100644
|
||||
--- a/libtiff/tif_getimage.c
|
||||
+++ b/libtiff/tif_getimage.c
|
||||
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
#include "tiffiop.h"
|
||||
#include <stdio.h>
|
||||
+#include <limits.h>
|
||||
|
||||
static int gtTileContig(TIFFRGBAImage*, uint32*, uint32, uint32);
|
||||
static int gtTileSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
|
||||
@@ -645,12 +646,20 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
|
||||
flip = setorientation(img);
|
||||
if (flip & FLIP_VERTICALLY) {
|
||||
- y = h - 1;
|
||||
- toskew = -(int32)(tw + w);
|
||||
+ if ((tw + w) > INT_MAX) {
|
||||
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)");
|
||||
+ return (0);
|
||||
+ }
|
||||
+ y = h - 1;
|
||||
+ toskew = -(int32)(tw + w);
|
||||
}
|
||||
else {
|
||||
- y = 0;
|
||||
- toskew = -(int32)(tw - w);
|
||||
+ if (tw > (INT_MAX + w)) {
|
||||
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)");
|
||||
+ return (0);
|
||||
+ }
|
||||
+ y = 0;
|
||||
+ toskew = -(int32)(tw - w);
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
42
meta/recipes-multimedia/libtiff/files/CVE-2020-35524-1.patch
Normal file
42
meta/recipes-multimedia/libtiff/files/CVE-2020-35524-1.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From c6a12721b46f1a72974f91177890301730d7b330 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Bernard <miniupnp@free.fr>
|
||||
Date: Tue, 10 Nov 2020 01:01:59 +0100
|
||||
Subject: [PATCH] tiff2pdf.c: properly calculate datasize when saving to JPEG
|
||||
YCbCr
|
||||
|
||||
fixes #220
|
||||
Upstream-Status: Backport
|
||||
https://gitlab.com/libtiff/libtiff/-/commit/c6a12721b46f1a72974f91177890301730d7b330
|
||||
https://gitlab.com/libtiff/libtiff/-/merge_requests/159/commits
|
||||
CVE: CVE-2021-35524
|
||||
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
|
||||
|
||||
---
|
||||
tools/tiff2pdf.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
|
||||
index 719811ea..dc69d2f9 100644
|
||||
--- a/tools/tiff2pdf.c
|
||||
+++ b/tools/tiff2pdf.c
|
||||
@@ -2087,9 +2087,14 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){
|
||||
#endif
|
||||
(void) 0;
|
||||
}
|
||||
- k = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p);
|
||||
- if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
|
||||
- k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p);
|
||||
+ if(t2p->pdf_compression == T2P_COMPRESS_JPEG
|
||||
+ && t2p->tiff_photometric == PHOTOMETRIC_YCBCR) {
|
||||
+ k = checkMultiply64(TIFFNumberOfStrips(input), TIFFStripSize(input), t2p);
|
||||
+ } else {
|
||||
+ k = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p);
|
||||
+ if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
|
||||
+ k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p);
|
||||
+ }
|
||||
}
|
||||
if (k == 0) {
|
||||
/* Assume we had overflow inside TIFFScanlineSize */
|
||||
--
|
||||
GitLab
|
||||
|
||||
36
meta/recipes-multimedia/libtiff/files/CVE-2020-35524-2.patch
Normal file
36
meta/recipes-multimedia/libtiff/files/CVE-2020-35524-2.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From d74f56e3b7ea55c8a18a03bc247cd5fd0ca288b2 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Bernard <miniupnp@free.fr>
|
||||
Date: Tue, 10 Nov 2020 02:05:05 +0100
|
||||
Subject: [PATCH] Fix for building without JPEG support
|
||||
|
||||
Upstream-Status: Backport
|
||||
https://gitlab.com/libtiff/libtiff/-/commit/d74f56e3b7ea55c8a18a03bc247cd5fd0ca288b2
|
||||
https://gitlab.com/libtiff/libtiff/-/merge_requests/159/commits
|
||||
CVE: CVE-2021-35524
|
||||
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
|
||||
---
|
||||
tools/tiff2pdf.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
|
||||
index dc69d2f9..d0b0ede7 100644
|
||||
--- a/tools/tiff2pdf.c
|
||||
+++ b/tools/tiff2pdf.c
|
||||
@@ -2087,10 +2087,13 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){
|
||||
#endif
|
||||
(void) 0;
|
||||
}
|
||||
+#ifdef JPEG_SUPPORT
|
||||
if(t2p->pdf_compression == T2P_COMPRESS_JPEG
|
||||
&& t2p->tiff_photometric == PHOTOMETRIC_YCBCR) {
|
||||
k = checkMultiply64(TIFFNumberOfStrips(input), TIFFStripSize(input), t2p);
|
||||
- } else {
|
||||
+ } else
|
||||
+#endif
|
||||
+ {
|
||||
k = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p);
|
||||
if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
|
||||
k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p);
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -9,6 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
|
||||
CVE_PRODUCT = "libtiff"
|
||||
|
||||
SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
|
||||
file://CVE-2020-35523.patch \
|
||||
file://CVE-2020-35524-1.patch \
|
||||
file://CVE-2020-35524-2.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "2165e7aba557463acc0664e71a3ed424"
|
||||
SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634"
|
||||
@@ -16,6 +19,10 @@ SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d677
|
||||
# exclude betas
|
||||
UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
|
||||
|
||||
# Tested with check from https://security-tracker.debian.org/tracker/CVE-2015-7313
|
||||
# and 4.1.0 doesn't have the issue
|
||||
CVE_CHECK_WHITELIST += "CVE-2015-7313"
|
||||
|
||||
inherit autotools multilib_header
|
||||
|
||||
CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
|
||||
|
||||
@@ -11,7 +11,7 @@ BOOST_VER = "${@"_".join(d.getVar("PV").split("."))}"
|
||||
BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}"
|
||||
BOOST_P = "boost_${BOOST_VER}"
|
||||
|
||||
SRC_URI = "https://dl.bintray.com/boostorg/release/${PV}/source/${BOOST_P}.tar.bz2"
|
||||
SRC_URI = "https://boostorg.jfrog.io/artifactory/main/release/${PV}/source/${BOOST_P}.tar.bz2"
|
||||
SRC_URI[md5sum] = "cb40943d2a2cb8ce08d42bc48b0f84f0"
|
||||
SRC_URI[sha256sum] = "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722"
|
||||
|
||||
|
||||
@@ -83,8 +83,8 @@ do_install_append_class-native () {
|
||||
SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
|
||||
}
|
||||
|
||||
RDEPENDS_${PN}_class-target = "openssl-bin"
|
||||
RDEPENDS_${PN}_class-native = "openssl-native"
|
||||
RDEPENDS_${PN}_class-nativesdk = "nativesdk-openssl-bin"
|
||||
RDEPENDS_${PN}_append_class-target = " openssl-bin openssl"
|
||||
RDEPENDS_${PN}_append_class-native = " openssl-native"
|
||||
RDEPENDS_${PN}_append_class-nativesdk = " nativesdk-openssl-bin nativesdk-openssl"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
59
meta/recipes-support/curl/curl/CVE-2021-22876.patch
Normal file
59
meta/recipes-support/curl/curl/CVE-2021-22876.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
transfer: strip credentials from the auto-referer header field
|
||||
|
||||
CVE-2021-22876
|
||||
|
||||
Patch taken from Ubuntu curl 7.68.0-1ubuntu2.5.
|
||||
|
||||
Bug: https://curl.se/docs/CVE-2021-22876.html
|
||||
Upstream-Status: backport
|
||||
---
|
||||
lib/transfer.c | 25 +++++++++++++++++++++++--
|
||||
1 file changed, 23 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/transfer.c b/lib/transfer.c
|
||||
index e76834eb3..744e1c00b 100644
|
||||
--- a/lib/transfer.c
|
||||
+++ b/lib/transfer.c
|
||||
@@ -1570,6 +1570,9 @@ CURLcode Curl_follow(struct Curl_easy *data,
|
||||
data->set.followlocation++; /* count location-followers */
|
||||
|
||||
if(data->set.http_auto_referer) {
|
||||
+ CURLU *u;
|
||||
+ char *referer;
|
||||
+
|
||||
/* We are asked to automatically set the previous URL as the referer
|
||||
when we get the next URL. We pick the ->url field, which may or may
|
||||
not be 100% correct */
|
||||
@@ -1579,9 +1582,27 @@ CURLcode Curl_follow(struct Curl_easy *data,
|
||||
data->change.referer_alloc = FALSE;
|
||||
}
|
||||
|
||||
- data->change.referer = strdup(data->change.url);
|
||||
- if(!data->change.referer)
|
||||
+ /* Make a copy of the URL without crenditals and fragment */
|
||||
+ u = curl_url();
|
||||
+ if(!u)
|
||||
+ return CURLE_OUT_OF_MEMORY;
|
||||
+
|
||||
+ uc = curl_url_set(u, CURLUPART_URL, data->change.url, 0);
|
||||
+ if(!uc)
|
||||
+ uc = curl_url_set(u, CURLUPART_FRAGMENT, NULL, 0);
|
||||
+ if(!uc)
|
||||
+ uc = curl_url_set(u, CURLUPART_USER, NULL, 0);
|
||||
+ if(!uc)
|
||||
+ uc = curl_url_set(u, CURLUPART_PASSWORD, NULL, 0);
|
||||
+ if(!uc)
|
||||
+ uc = curl_url_get(u, CURLUPART_URL, &referer, 0);
|
||||
+
|
||||
+ curl_url_cleanup(u);
|
||||
+
|
||||
+ if(uc || referer == NULL)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
+
|
||||
+ data->change.referer = referer;
|
||||
data->change.referer_alloc = TRUE; /* yes, free this later */
|
||||
}
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
||||
464
meta/recipes-support/curl/curl/CVE-2021-22890.patch
Normal file
464
meta/recipes-support/curl/curl/CVE-2021-22890.patch
Normal file
@@ -0,0 +1,464 @@
|
||||
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
|
||||
|
||||
To make sure we set and extract the correct session.
|
||||
|
||||
Patch taken from Ubuntu curl 7.68.0-1ubuntu2.5.
|
||||
|
||||
CVE-2021-22890
|
||||
|
||||
Reported-by: Mingtao Yang
|
||||
Bug: https://curl.se/docs/CVE-2021-22890.html
|
||||
Upstream-Status: backport
|
||||
---
|
||||
lib/vtls/bearssl.c | 9 +++++---
|
||||
lib/vtls/gtls.c | 9 +++++---
|
||||
lib/vtls/mbedtls.c | 8 ++++---
|
||||
lib/vtls/mesalink.c | 9 +++++---
|
||||
lib/vtls/openssl.c | 52 ++++++++++++++++++++++++++++++++++----------
|
||||
lib/vtls/schannel.c | 10 +++++----
|
||||
lib/vtls/sectransp.c | 9 ++++----
|
||||
lib/vtls/vtls.c | 9 ++++++--
|
||||
lib/vtls/vtls.h | 2 ++
|
||||
lib/vtls/wolfssl.c | 8 ++++---
|
||||
10 files changed, 88 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/lib/vtls/bearssl.c b/lib/vtls/bearssl.c
|
||||
index 67f945831..32cb0a4c2 100644
|
||||
--- a/lib/vtls/bearssl.c
|
||||
+++ b/lib/vtls/bearssl.c
|
||||
@@ -372,7 +372,8 @@ static CURLcode bearssl_connect_step1(struct connectdata *conn, int sockindex)
|
||||
void *session;
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- if(!Curl_ssl_getsessionid(conn, &session, NULL, sockindex)) {
|
||||
+ if(!Curl_ssl_getsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ &session, NULL, sockindex)) {
|
||||
br_ssl_engine_set_session_parameters(&BACKEND->ctx.eng, session);
|
||||
infof(data, "BearSSL: re-using session ID\n");
|
||||
}
|
||||
@@ -560,10 +561,12 @@ static CURLcode bearssl_connect_step3(struct connectdata *conn, int sockindex)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
br_ssl_engine_get_session_parameters(&BACKEND->ctx.eng, session);
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- incache = !(Curl_ssl_getsessionid(conn, &oldsession, NULL, sockindex));
|
||||
+ incache = !(Curl_ssl_getsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ &oldsession, NULL, sockindex));
|
||||
if(incache)
|
||||
Curl_ssl_delsessionid(conn, oldsession);
|
||||
- ret = Curl_ssl_addsessionid(conn, session, 0, sockindex);
|
||||
+ ret = Curl_ssl_addsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ session, 0, sockindex);
|
||||
Curl_ssl_sessionid_unlock(conn);
|
||||
if(ret) {
|
||||
free(session);
|
||||
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
|
||||
index 5f740eeba..46e149c7d 100644
|
||||
--- a/lib/vtls/gtls.c
|
||||
+++ b/lib/vtls/gtls.c
|
||||
@@ -937,7 +937,8 @@ gtls_connect_step1(struct connectdata *conn,
|
||||
size_t ssl_idsize;
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, &ssl_idsize, sockindex)) {
|
||||
+ if(!Curl_ssl_getsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ &ssl_sessionid, &ssl_idsize, sockindex)) {
|
||||
/* we got a session id, use it! */
|
||||
gnutls_session_set_data(session, ssl_sessionid, ssl_idsize);
|
||||
|
||||
@@ -1485,7 +1486,8 @@ gtls_connect_step3(struct connectdata *conn,
|
||||
gnutls_session_get_data(session, connect_sessionid, &connect_idsize);
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- incache = !(Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL,
|
||||
+ incache = !(Curl_ssl_getsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ &ssl_sessionid, NULL,
|
||||
sockindex));
|
||||
if(incache) {
|
||||
/* there was one before in the cache, so instead of risking that the
|
||||
@@ -1494,7 +1496,8 @@ gtls_connect_step3(struct connectdata *conn,
|
||||
}
|
||||
|
||||
/* store this session id */
|
||||
- result = Curl_ssl_addsessionid(conn, connect_sessionid, connect_idsize,
|
||||
+ result = Curl_ssl_addsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ connect_sessionid, connect_idsize,
|
||||
sockindex);
|
||||
Curl_ssl_sessionid_unlock(conn);
|
||||
if(result) {
|
||||
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
|
||||
index f057315f3..19df8478e 100644
|
||||
--- a/lib/vtls/mbedtls.c
|
||||
+++ b/lib/vtls/mbedtls.c
|
||||
@@ -453,7 +453,8 @@ mbed_connect_step1(struct connectdata *conn,
|
||||
void *old_session = NULL;
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- if(!Curl_ssl_getsessionid(conn, &old_session, NULL, sockindex)) {
|
||||
+ if(!Curl_ssl_getsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ &old_session, NULL, sockindex)) {
|
||||
ret = mbedtls_ssl_set_session(&BACKEND->ssl, old_session);
|
||||
if(ret) {
|
||||
Curl_ssl_sessionid_unlock(conn);
|
||||
@@ -709,6 +710,7 @@ mbed_connect_step3(struct connectdata *conn,
|
||||
int ret;
|
||||
mbedtls_ssl_session *our_ssl_sessionid;
|
||||
void *old_ssl_sessionid = NULL;
|
||||
+ bool isproxy = SSL_IS_PROXY() ? TRUE : FALSE;
|
||||
|
||||
our_ssl_sessionid = malloc(sizeof(mbedtls_ssl_session));
|
||||
if(!our_ssl_sessionid)
|
||||
@@ -727,10 +729,10 @@ mbed_connect_step3(struct connectdata *conn,
|
||||
|
||||
/* If there's already a matching session in the cache, delete it */
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- if(!Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL, sockindex))
|
||||
+ if(!Curl_ssl_getsessionid(conn, isproxy, &old_ssl_sessionid, NULL, sockindex))
|
||||
Curl_ssl_delsessionid(conn, old_ssl_sessionid);
|
||||
|
||||
- retcode = Curl_ssl_addsessionid(conn, our_ssl_sessionid, 0, sockindex);
|
||||
+ retcode = Curl_ssl_addsessionid(conn, isproxy, our_ssl_sessionid, 0, sockindex);
|
||||
Curl_ssl_sessionid_unlock(conn);
|
||||
if(retcode) {
|
||||
mbedtls_ssl_session_free(our_ssl_sessionid);
|
||||
diff --git a/lib/vtls/mesalink.c b/lib/vtls/mesalink.c
|
||||
index cab1e390b..79d1e3dfa 100644
|
||||
--- a/lib/vtls/mesalink.c
|
||||
+++ b/lib/vtls/mesalink.c
|
||||
@@ -263,7 +263,8 @@ mesalink_connect_step1(struct connectdata *conn, int sockindex)
|
||||
void *ssl_sessionid = NULL;
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) {
|
||||
+ if(!Curl_ssl_getsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ &ssl_sessionid, NULL, sockindex)) {
|
||||
/* we got a session id, use it! */
|
||||
if(!SSL_set_session(BACKEND->handle, ssl_sessionid)) {
|
||||
Curl_ssl_sessionid_unlock(conn);
|
||||
@@ -347,12 +348,14 @@ mesalink_connect_step3(struct connectdata *conn, int sockindex)
|
||||
bool incache;
|
||||
SSL_SESSION *our_ssl_sessionid;
|
||||
void *old_ssl_sessionid = NULL;
|
||||
+ bool inproxy = SSL_IS_PROXY() ? TRUE : FALSE;
|
||||
|
||||
our_ssl_sessionid = SSL_get_session(BACKEND->handle);
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
incache =
|
||||
- !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL, sockindex));
|
||||
+ !(Curl_ssl_getsessionid(conn, isproxy, &old_ssl_sessionid,
|
||||
+ NULL, sockindex));
|
||||
if(incache) {
|
||||
if(old_ssl_sessionid != our_ssl_sessionid) {
|
||||
infof(data, "old SSL session ID is stale, removing\n");
|
||||
@@ -363,7 +366,7 @@ mesalink_connect_step3(struct connectdata *conn, int sockindex)
|
||||
|
||||
if(!incache) {
|
||||
result = Curl_ssl_addsessionid(
|
||||
- conn, our_ssl_sessionid, 0 /* unknown size */, sockindex);
|
||||
+ conn, isproxy, our_ssl_sessionid, 0 /* unknown size */, sockindex);
|
||||
if(result) {
|
||||
Curl_ssl_sessionid_unlock(conn);
|
||||
failf(data, "failed to store ssl session");
|
||||
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
|
||||
index 1d09cadca..64f43605a 100644
|
||||
--- a/lib/vtls/openssl.c
|
||||
+++ b/lib/vtls/openssl.c
|
||||
@@ -422,12 +422,23 @@ static int ossl_get_ssl_conn_index(void)
|
||||
*/
|
||||
static int ossl_get_ssl_sockindex_index(void)
|
||||
{
|
||||
- static int ssl_ex_data_sockindex_index = -1;
|
||||
- if(ssl_ex_data_sockindex_index < 0) {
|
||||
- ssl_ex_data_sockindex_index = SSL_get_ex_new_index(0, NULL, NULL, NULL,
|
||||
- NULL);
|
||||
+ static int sockindex_index = -1;
|
||||
+ if(sockindex_index < 0) {
|
||||
+ sockindex_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
- return ssl_ex_data_sockindex_index;
|
||||
+ return sockindex_index;
|
||||
+}
|
||||
+
|
||||
+/* Return an extra data index for proxy boolean.
|
||||
+ * This index can be used with SSL_get_ex_data() and SSL_set_ex_data().
|
||||
+ */
|
||||
+static int ossl_get_proxy_index(void)
|
||||
+{
|
||||
+ static int proxy_index = -1;
|
||||
+ if(proxy_index < 0) {
|
||||
+ proxy_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
|
||||
+ }
|
||||
+ return proxy_index;
|
||||
}
|
||||
|
||||
static int passwd_callback(char *buf, int num, int encrypting,
|
||||
@@ -1079,7 +1090,8 @@ static int Curl_ossl_init(void)
|
||||
#endif
|
||||
|
||||
/* Initialize the extra data indexes */
|
||||
- if(ossl_get_ssl_conn_index() < 0 || ossl_get_ssl_sockindex_index() < 0)
|
||||
+ if(ossl_get_ssl_conn_index() < 0 || ossl_get_ssl_sockindex_index() < 0 ||
|
||||
+ ossl_get_proxy_index() < 0)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
@@ -2341,8 +2353,10 @@ static int ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
|
||||
curl_socket_t *sockindex_ptr;
|
||||
int connectdata_idx = ossl_get_ssl_conn_index();
|
||||
int sockindex_idx = ossl_get_ssl_sockindex_index();
|
||||
+ int proxy_idx = ossl_get_proxy_index();
|
||||
+ bool isproxy;
|
||||
|
||||
- if(connectdata_idx < 0 || sockindex_idx < 0)
|
||||
+ if(connectdata_idx < 0 || sockindex_idx < 0 || proxy_idx < 0)
|
||||
return 0;
|
||||
|
||||
conn = (struct connectdata*) SSL_get_ex_data(ssl, connectdata_idx);
|
||||
@@ -2355,13 +2369,18 @@ static int ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
|
||||
sockindex_ptr = (curl_socket_t*) SSL_get_ex_data(ssl, sockindex_idx);
|
||||
sockindex = (int)(sockindex_ptr - conn->sock);
|
||||
|
||||
+ isproxy = SSL_get_ex_data(ssl, proxy_idx) ? TRUE : FALSE;
|
||||
+
|
||||
if(SSL_SET_OPTION(primary.sessionid)) {
|
||||
bool incache;
|
||||
void *old_ssl_sessionid = NULL;
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL,
|
||||
- sockindex));
|
||||
+ if(isproxy)
|
||||
+ incache = FALSE;
|
||||
+ else
|
||||
+ incache = !(Curl_ssl_getsessionid(conn, isproxy,
|
||||
+ &old_ssl_sessionid, NULL, sockindex));
|
||||
if(incache) {
|
||||
if(old_ssl_sessionid != ssl_sessionid) {
|
||||
infof(data, "old SSL session ID is stale, removing\n");
|
||||
@@ -2371,7 +2390,7 @@ static int ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
|
||||
}
|
||||
|
||||
if(!incache) {
|
||||
- if(!Curl_ssl_addsessionid(conn, ssl_sessionid,
|
||||
+ if(!Curl_ssl_addsessionid(conn, isproxy, ssl_sessionid,
|
||||
0 /* unknown size */, sockindex)) {
|
||||
/* the session has been put into the session cache */
|
||||
res = 1;
|
||||
@@ -2868,16 +2887,25 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
|
||||
void *ssl_sessionid = NULL;
|
||||
int connectdata_idx = ossl_get_ssl_conn_index();
|
||||
int sockindex_idx = ossl_get_ssl_sockindex_index();
|
||||
+ int proxy_idx = ossl_get_proxy_index();
|
||||
|
||||
- if(connectdata_idx >= 0 && sockindex_idx >= 0) {
|
||||
+ if(connectdata_idx >= 0 && sockindex_idx >= 0 && proxy_idx >= 0) {
|
||||
/* Store the data needed for the "new session" callback.
|
||||
* The sockindex is stored as a pointer to an array element. */
|
||||
SSL_set_ex_data(BACKEND->handle, connectdata_idx, conn);
|
||||
SSL_set_ex_data(BACKEND->handle, sockindex_idx, conn->sock + sockindex);
|
||||
+#ifndef CURL_DISABLE_PROXY
|
||||
+ SSL_set_ex_data(BACKEND->handle, proxy_idx, SSL_IS_PROXY() ? (void *) 1:
|
||||
+ NULL);
|
||||
+#else
|
||||
+ SSL_set_ex_data(BACKEND->handle, proxy_idx, NULL);
|
||||
+#endif
|
||||
+
|
||||
}
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) {
|
||||
+ if(!Curl_ssl_getsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ &ssl_sessionid, NULL, sockindex)) {
|
||||
/* we got a session id, use it! */
|
||||
if(!SSL_set_session(BACKEND->handle, ssl_sessionid)) {
|
||||
Curl_ssl_sessionid_unlock(conn);
|
||||
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
|
||||
index f665ee340..a354ce95d 100644
|
||||
--- a/lib/vtls/schannel.c
|
||||
+++ b/lib/vtls/schannel.c
|
||||
@@ -487,7 +487,8 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
|
||||
/* check for an existing re-usable credential handle */
|
||||
if(SSL_SET_OPTION(primary.sessionid)) {
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- if(!Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL, sockindex)) {
|
||||
+ if(!Curl_ssl_getsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ (void **)&old_cred, NULL, sockindex)) {
|
||||
BACKEND->cred = old_cred;
|
||||
DEBUGF(infof(data, "schannel: re-using existing credential handle\n"));
|
||||
|
||||
@@ -1193,8 +1194,9 @@ schannel_connect_step3(struct connectdata *conn, int sockindex)
|
||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||
SECURITY_STATUS sspi_status = SEC_E_OK;
|
||||
CERT_CONTEXT *ccert_context = NULL;
|
||||
+ bool isproxy = SSL_IS_PROXY();
|
||||
#ifdef DEBUGBUILD
|
||||
- const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
||||
+ const char * const hostname = isproxy ? conn->http_proxy.host.name :
|
||||
conn->host.name;
|
||||
#endif
|
||||
#ifdef HAS_ALPN
|
||||
@@ -1268,7 +1270,7 @@ schannel_connect_step3(struct connectdata *conn, int sockindex)
|
||||
struct curl_schannel_cred *old_cred = NULL;
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- incache = !(Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL,
|
||||
+ incache = !(Curl_ssl_getsessionid(conn, isproxy, (void **)&old_cred, NULL,
|
||||
sockindex));
|
||||
if(incache) {
|
||||
if(old_cred != BACKEND->cred) {
|
||||
@@ -1280,7 +1282,7 @@ schannel_connect_step3(struct connectdata *conn, int sockindex)
|
||||
}
|
||||
}
|
||||
if(!incache) {
|
||||
- result = Curl_ssl_addsessionid(conn, (void *)BACKEND->cred,
|
||||
+ result = Curl_ssl_addsessionid(conn, isproxy, (void *)BACKEND->cred,
|
||||
sizeof(struct curl_schannel_cred),
|
||||
sockindex);
|
||||
if(result) {
|
||||
diff --git a/lib/vtls/sectransp.c b/lib/vtls/sectransp.c
|
||||
index 7dd028fb7..9c67d465a 100644
|
||||
--- a/lib/vtls/sectransp.c
|
||||
+++ b/lib/vtls/sectransp.c
|
||||
@@ -1376,7 +1376,8 @@ static CURLcode sectransp_connect_step1(struct connectdata *conn,
|
||||
const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile);
|
||||
const bool verifypeer = SSL_CONN_CONFIG(verifypeer);
|
||||
char * const ssl_cert = SSL_SET_OPTION(cert);
|
||||
- const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
||||
+ bool isproxy = SSL_IS_PROXY();
|
||||
+ const char * const hostname = isproxy ? conn->http_proxy.host.name :
|
||||
conn->host.name;
|
||||
const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
|
||||
#ifdef ENABLE_IPV6
|
||||
@@ -1584,7 +1585,7 @@ static CURLcode sectransp_connect_step1(struct connectdata *conn,
|
||||
|
||||
#ifdef USE_NGHTTP2
|
||||
if(data->set.httpversion >= CURL_HTTP_VERSION_2 &&
|
||||
- (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)) {
|
||||
+ (!isproxy || !conn->bits.tunnel_proxy)) {
|
||||
CFArrayAppendValue(alpnArr, CFSTR(NGHTTP2_PROTO_VERSION_ID));
|
||||
infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
|
||||
}
|
||||
@@ -1916,7 +1917,7 @@ static CURLcode sectransp_connect_step1(struct connectdata *conn,
|
||||
size_t ssl_sessionid_len;
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- if(!Curl_ssl_getsessionid(conn, (void **)&ssl_sessionid,
|
||||
+ if(!Curl_ssl_getsessionid(conn, isproxy, (void **)&ssl_sessionid,
|
||||
&ssl_sessionid_len, sockindex)) {
|
||||
/* we got a session id, use it! */
|
||||
err = SSLSetPeerID(BACKEND->ssl_ctx, ssl_sessionid, ssl_sessionid_len);
|
||||
@@ -1944,7 +1945,7 @@ static CURLcode sectransp_connect_step1(struct connectdata *conn,
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
|
||||
- result = Curl_ssl_addsessionid(conn, ssl_sessionid, ssl_sessionid_len,
|
||||
+ result = Curl_ssl_addsessionid(conn, isproxy, ssl_sessionid, ssl_sessionid_len,
|
||||
sockindex);
|
||||
Curl_ssl_sessionid_unlock(conn);
|
||||
if(result) {
|
||||
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
|
||||
index dfefa1bd5..aaf73ef8f 100644
|
||||
--- a/lib/vtls/vtls.c
|
||||
+++ b/lib/vtls/vtls.c
|
||||
@@ -305,6 +305,7 @@ void Curl_ssl_sessionid_unlock(struct connectdata *conn)
|
||||
* there's one suitable, it is provided. Returns TRUE when no entry matched.
|
||||
*/
|
||||
bool Curl_ssl_getsessionid(struct connectdata *conn,
|
||||
+ const bool isProxy,
|
||||
void **ssl_sessionid,
|
||||
size_t *idsize, /* set 0 if unknown */
|
||||
int sockindex)
|
||||
@@ -315,7 +316,6 @@ bool Curl_ssl_getsessionid(struct connectdata *conn,
|
||||
long *general_age;
|
||||
bool no_match = TRUE;
|
||||
|
||||
- const bool isProxy = CONNECT_PROXY_SSL();
|
||||
struct ssl_primary_config * const ssl_config = isProxy ?
|
||||
&conn->proxy_ssl_config :
|
||||
&conn->ssl_config;
|
||||
@@ -324,6 +324,11 @@ bool Curl_ssl_getsessionid(struct connectdata *conn,
|
||||
int port = isProxy ? (int)conn->port : conn->remote_port;
|
||||
*ssl_sessionid = NULL;
|
||||
|
||||
+#ifdef CURL_DISABLE_PROXY
|
||||
+ if(isProxy)
|
||||
+ return TRUE;
|
||||
+#endif
|
||||
+
|
||||
DEBUGASSERT(SSL_SET_OPTION(primary.sessionid));
|
||||
|
||||
if(!SSL_SET_OPTION(primary.sessionid))
|
||||
@@ -411,6 +416,7 @@ void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid)
|
||||
* later on.
|
||||
*/
|
||||
CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
|
||||
+ bool isProxy,
|
||||
void *ssl_sessionid,
|
||||
size_t idsize,
|
||||
int sockindex)
|
||||
@@ -423,7 +429,6 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
|
||||
char *clone_conn_to_host;
|
||||
int conn_to_port;
|
||||
long *general_age;
|
||||
- const bool isProxy = CONNECT_PROXY_SSL();
|
||||
struct ssl_primary_config * const ssl_config = isProxy ?
|
||||
&conn->proxy_ssl_config :
|
||||
&conn->ssl_config;
|
||||
diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h
|
||||
index a81b2f22d..a5e348752 100644
|
||||
--- a/lib/vtls/vtls.h
|
||||
+++ b/lib/vtls/vtls.h
|
||||
@@ -202,6 +202,7 @@ void Curl_ssl_sessionid_unlock(struct connectdata *conn);
|
||||
* under sessionid mutex).
|
||||
*/
|
||||
bool Curl_ssl_getsessionid(struct connectdata *conn,
|
||||
+ const bool isproxy,
|
||||
void **ssl_sessionid,
|
||||
size_t *idsize, /* set 0 if unknown */
|
||||
int sockindex);
|
||||
@@ -211,6 +212,7 @@ bool Curl_ssl_getsessionid(struct connectdata *conn,
|
||||
* object with cache (e.g. incrementing refcount on success)
|
||||
*/
|
||||
CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
|
||||
+ const bool isProxy,
|
||||
void *ssl_sessionid,
|
||||
size_t idsize,
|
||||
int sockindex);
|
||||
diff --git a/lib/vtls/wolfssl.c b/lib/vtls/wolfssl.c
|
||||
index 8c2d3f4a2..dd9f907ff 100644
|
||||
--- a/lib/vtls/wolfssl.c
|
||||
+++ b/lib/vtls/wolfssl.c
|
||||
@@ -392,7 +392,8 @@ wolfssl_connect_step1(struct connectdata *conn,
|
||||
void *ssl_sessionid = NULL;
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) {
|
||||
+ if(!Curl_ssl_getsessionid(conn, SSL_IS_PROXY() ? TRUE : FALSE,
|
||||
+ &ssl_sessionid, NULL, sockindex)) {
|
||||
/* we got a session id, use it! */
|
||||
if(!SSL_set_session(BACKEND->handle, ssl_sessionid)) {
|
||||
char error_buffer[WOLFSSL_MAX_ERROR_SZ];
|
||||
@@ -618,9 +619,10 @@ wolfssl_connect_step3(struct connectdata *conn,
|
||||
void *old_ssl_sessionid = NULL;
|
||||
|
||||
our_ssl_sessionid = SSL_get_session(BACKEND->handle);
|
||||
+ bool isproxy = SSL_IS_PROXY() ? TRUE : FALSE;
|
||||
|
||||
Curl_ssl_sessionid_lock(conn);
|
||||
- incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL,
|
||||
+ incache = !(Curl_ssl_getsessionid(conn, isproxy, &old_ssl_sessionid, NULL,
|
||||
sockindex));
|
||||
if(incache) {
|
||||
if(old_ssl_sessionid != our_ssl_sessionid) {
|
||||
@@ -631,7 +633,7 @@ wolfssl_connect_step3(struct connectdata *conn,
|
||||
}
|
||||
|
||||
if(!incache) {
|
||||
- result = Curl_ssl_addsessionid(conn, our_ssl_sessionid,
|
||||
+ result = Curl_ssl_addsessionid(conn, isproxy, our_ssl_sessionid,
|
||||
0 /* unknown size */, sockindex);
|
||||
if(result) {
|
||||
Curl_ssl_sessionid_unlock(conn);
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -17,6 +17,8 @@ SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \
|
||||
file://CVE-2020-8284.patch \
|
||||
file://CVE-2020-8285.patch \
|
||||
file://CVE-2020-8286.patch \
|
||||
file://CVE-2021-22876.patch \
|
||||
file://CVE-2021-22890.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "ec5fc263f898a3dfef08e805f1ecca42"
|
||||
|
||||
@@ -15,7 +15,7 @@ HOMEPAGE = "https://www.oracle.com/database/technologies/related/berkeleydb.html
|
||||
LICENSE = "Sleepycat"
|
||||
RCONFLICTS_${PN} = "db3"
|
||||
|
||||
CVE_PRODUCT = "oracle_berkeley_db"
|
||||
CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
|
||||
CVE_VERSION = "11.2.${PV}"
|
||||
|
||||
PR = "r1"
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
SUMMARY = "in-depth comparison of files, archives, and directories"
|
||||
DESCRIPTION = "Tries to get to the bottom of what makes files or directories \
|
||||
different. It will recursively unpack archives of many kinds and transform \
|
||||
various binary formats into more human-readable form to compare them. \
|
||||
It can compare two tarballs, ISO images, or PDF just as easily."
|
||||
HOMEPAGE = "https://diffoscope.org/"
|
||||
BUGTRACKER = "https://salsa.debian.org/reproducible-builds/diffoscope/-/issues"
|
||||
LICENSE = "GPL-3.0+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
|
||||
PYPI_PACKAGE = "diffoscope"
|
||||
|
||||
inherit pypi setuptools3
|
||||
|
||||
SRC_URI[md5sum] = "c84d8d308a40176ba2f5dc4abdbf6f73"
|
||||
SRC_URI[sha256sum] = "0d6486d6eb6e0445ba21fee2e8bdd3a366ce786bfac98e00e5a95038b7815f15"
|
||||
|
||||
RDEPENDS_${PN} += "binutils vim squashfs-tools python3-libarchive-c python3-magic"
|
||||
|
||||
# Dependencies don't build for musl
|
||||
COMPATIBLE_HOST_libc-musl = 'null'
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
25
meta/recipes-support/diffoscope/diffoscope_172.bb
Normal file
25
meta/recipes-support/diffoscope/diffoscope_172.bb
Normal file
@@ -0,0 +1,25 @@
|
||||
SUMMARY = "in-depth comparison of files, archives, and directories"
|
||||
HOMEPAGE = "https://diffoscope.org/"
|
||||
LICENSE = "GPL-3.0+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
|
||||
PYPI_PACKAGE = "diffoscope"
|
||||
|
||||
inherit pypi setuptools3
|
||||
|
||||
SRC_URI[sha256sum] = "5ffe7f38555c6409bc7e7edc277ed77dd78641fe1306fc38d153dbbe445ddea4"
|
||||
|
||||
RDEPENDS_${PN} += "binutils vim squashfs-tools python3-libarchive-c python3-magic"
|
||||
|
||||
# Dependencies don't build for musl
|
||||
COMPATIBLE_HOST_libc-musl = 'null'
|
||||
|
||||
do_install_append_class-native() {
|
||||
create_wrapper ${D}${bindir}/diffoscope \
|
||||
MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
|
||||
RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
|
||||
LD_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
|
||||
RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE}
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user