mirror of
https://git.yoctoproject.org/poky
synced 2026-01-31 13:58:42 +01:00
Compare commits
103 Commits
dizzy-12.0
...
dizzy
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58863ad092 | ||
|
|
fb8bf6a75e | ||
|
|
c282df8993 | ||
|
|
204ad23574 | ||
|
|
14a42e2719 | ||
|
|
dae5ee4e5e | ||
|
|
bebaaf1d21 | ||
|
|
aefcb6b115 | ||
|
|
79e4cc8954 | ||
|
|
faf6ada4f2 | ||
|
|
a779191033 | ||
|
|
1930286e3f | ||
|
|
d4db68ae6b | ||
|
|
3beebd9447 | ||
|
|
aa10f103e1 | ||
|
|
d54de3ebc0 | ||
|
|
fc3d4ce07d | ||
|
|
217d56ec31 | ||
|
|
6fd01ed845 | ||
|
|
767142c1ba | ||
|
|
eca2b438bc | ||
|
|
2d569edae2 | ||
|
|
2ad71d0ae8 | ||
|
|
73a04a266c | ||
|
|
b3269fc2e6 | ||
|
|
0facda51ce | ||
|
|
8cf47f82b9 | ||
|
|
8ef55cc0da | ||
|
|
6d34267e0a | ||
|
|
9d6d902326 | ||
|
|
0d8ed50877 | ||
|
|
b38454c2e3 | ||
|
|
19f07a31a6 | ||
|
|
03666c8a74 | ||
|
|
85f6cf736b | ||
|
|
a01280b7ab | ||
|
|
800a3dc9b0 | ||
|
|
bdfee8758e | ||
|
|
915498e230 | ||
|
|
8897773fe4 | ||
|
|
2e6494e55a | ||
|
|
55fbde1fde | ||
|
|
3a2725e5d9 | ||
|
|
adcc476412 | ||
|
|
ab4cc02bf8 | ||
|
|
01c1167336 | ||
|
|
c1803b774a | ||
|
|
d526b3f9ac | ||
|
|
e74c4a5ff4 | ||
|
|
1a99652a88 | ||
|
|
20db29fb4d | ||
|
|
f7b041121e | ||
|
|
7a263b2e60 | ||
|
|
117d9b2f45 | ||
|
|
a4162fa9fa | ||
|
|
5a3899981c | ||
|
|
db031c40bb | ||
|
|
b64eae5767 | ||
|
|
0e6473ad75 | ||
|
|
27fc73496c | ||
|
|
012e1a4431 | ||
|
|
137f52ac3a | ||
|
|
ebe3096910 | ||
|
|
f1c45d15c2 | ||
|
|
fd35017edf | ||
|
|
e07aa344ee | ||
|
|
112839bebe | ||
|
|
f48d1a75e1 | ||
|
|
4d41954e94 | ||
|
|
53b0be3761 | ||
|
|
ca052426a6 | ||
|
|
540b92736c | ||
|
|
a93005e6d0 | ||
|
|
cfc5952b11 | ||
|
|
1b492dfcdd | ||
|
|
bf3ee430a4 | ||
|
|
abd315bc05 | ||
|
|
1e6d987374 | ||
|
|
38a334ad84 | ||
|
|
00fce45b55 | ||
|
|
fcd25c6d2e | ||
|
|
9f363a9c8a | ||
|
|
19bce8f5c6 | ||
|
|
1d909fb8da | ||
|
|
d19d976bf5 | ||
|
|
ea2e7dbcd7 | ||
|
|
215c4d948d | ||
|
|
9ae261263a | ||
|
|
22690105da | ||
|
|
3054c73445 | ||
|
|
c5a583e8bd | ||
|
|
7113efd02d | ||
|
|
b469799103 | ||
|
|
0891b8789d | ||
|
|
b8b7df8304 | ||
|
|
0c1c0877e8 | ||
|
|
c930052636 | ||
|
|
6d307e9b0c | ||
|
|
d0315a6cdf | ||
|
|
5f0d25152b | ||
|
|
9c4ff467f6 | ||
|
|
6adbd2deb9 | ||
|
|
9fd145d27e |
@@ -263,6 +263,7 @@ def start_server(servermodule, configParams, configuration, features):
|
||||
logger.handle(event)
|
||||
raise exc_info[1], None, exc_info[2]
|
||||
server.detach()
|
||||
cooker.lock.close()
|
||||
return server
|
||||
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
<ulink url="http://www.mail-archive.com/yocto@yoctoproject.org/msg09379.html">Mailing List post - The BitBake equivalent of "Hello, World!"</ulink>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<ulink url="http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/">Hambedded Linux blog post - From Bitbake Hello World to an Image</ulink>
|
||||
<ulink url="https://web.archive.org/web/20150325165911/http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/">Hambedded Linux blog post - From Bitbake Hello World to an Image</ulink>
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</note>
|
||||
@@ -270,7 +270,7 @@
|
||||
and define some key BitBake variables.
|
||||
For more information on the <filename>bitbake.conf</filename>,
|
||||
see
|
||||
<ulink url='http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/#an-overview-of-bitbakeconf'></ulink>
|
||||
<ulink url='https://web.archive.org/web/20150325165911/http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/#an-overview-of-bitbakeconf'></ulink>
|
||||
</para>
|
||||
<para>Use the following commands to create the <filename>conf</filename>
|
||||
directory in the project directory:
|
||||
@@ -355,7 +355,7 @@ ERROR: Unable to parse base: ParseError in configuration INHERITs: Could not inh
|
||||
supporting.
|
||||
For more information on the <filename>base.bbclass</filename> file,
|
||||
you can look at
|
||||
<ulink url='http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/#tasks'></ulink>.
|
||||
<ulink url='https://web.archive.org/web/20150325165911/http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/#tasks'></ulink>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Run Bitbake:</emphasis>
|
||||
After making sure that the <filename>classes/base.bbclass</filename>
|
||||
@@ -377,7 +377,7 @@ ERROR: Unable to parse base: ParseError in configuration INHERITs: Could not inh
|
||||
Thus, this example creates and uses a layer called "mylayer".
|
||||
<note>
|
||||
You can find additional information on adding a layer at
|
||||
<ulink url='http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/#adding-an-example-layer'></ulink>.
|
||||
<ulink url='https://web.archive.org/web/20150325165911/http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/#adding-an-example-layer'></ulink>.
|
||||
</note>
|
||||
</para>
|
||||
<para>Minimally, you need a recipe file and a layer configuration
|
||||
|
||||
@@ -38,6 +38,8 @@ import bb, bb.exceptions, bb.command
|
||||
from bb import utils, data, parse, event, cache, providers, taskdata, runqueue
|
||||
import Queue
|
||||
import signal
|
||||
import subprocess
|
||||
import errno
|
||||
import prserv.serv
|
||||
import pyinotify
|
||||
|
||||
@@ -1442,6 +1444,33 @@ class BBCooker:
|
||||
def post_serve(self):
|
||||
prserv.serv.auto_shutdown(self.data)
|
||||
bb.event.fire(CookerExit(), self.event_data)
|
||||
lockfile = self.lock.name
|
||||
self.lock.close()
|
||||
self.lock = None
|
||||
|
||||
while not self.lock:
|
||||
with bb.utils.timeout(3):
|
||||
self.lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=True)
|
||||
if not self.lock:
|
||||
# Some systems may not have lsof available
|
||||
procs = None
|
||||
try:
|
||||
procs = subprocess.check_output(["lsof", '-w', lockfile], stderr=subprocess.STDOUT)
|
||||
except OSError as e:
|
||||
if e.errno != errno.ENOENT:
|
||||
raise
|
||||
if procs is None:
|
||||
# Fall back to fuser if lsof is unavailable
|
||||
try:
|
||||
procs = subprocess.check_output(["fuser", '-v', lockfile], stderr=subprocess.STDOUT)
|
||||
except OSError as e:
|
||||
if e.errno != errno.ENOENT:
|
||||
raise
|
||||
|
||||
msg = "Delaying shutdown due to active processes which appear to be holding bitbake.lock"
|
||||
if procs:
|
||||
msg += ":\n%s" % str(procs)
|
||||
print(msg)
|
||||
|
||||
def shutdown(self, force = False):
|
||||
if force:
|
||||
@@ -1490,6 +1519,7 @@ class CookerExit(bb.event.Event):
|
||||
class CookerCollectFiles(object):
|
||||
def __init__(self, priorities):
|
||||
self.appendlist = {}
|
||||
self.bbappends = []
|
||||
self.appliedappendlist = []
|
||||
self.bbfile_config_priorities = priorities
|
||||
|
||||
@@ -1584,6 +1614,7 @@ class CookerCollectFiles(object):
|
||||
# Build a list of .bbappend files for each .bb file
|
||||
for f in bbappend:
|
||||
base = os.path.basename(f).replace('.bbappend', '.bb')
|
||||
self.bbappends.append((base, f))
|
||||
if not base in self.appendlist:
|
||||
self.appendlist[base] = []
|
||||
if f not in self.appendlist[base]:
|
||||
@@ -1609,11 +1640,11 @@ class CookerCollectFiles(object):
|
||||
"""
|
||||
filelist = []
|
||||
f = os.path.basename(fn)
|
||||
for bbappend in self.appendlist:
|
||||
for b in self.bbappends:
|
||||
(bbappend, filename) = b
|
||||
if (bbappend == f) or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])):
|
||||
self.appliedappendlist.append(bbappend)
|
||||
for filename in self.appendlist[bbappend]:
|
||||
filelist.append(filename)
|
||||
filelist.append(filename)
|
||||
return filelist
|
||||
|
||||
def collection_priorities(self, pkgfns):
|
||||
@@ -1633,10 +1664,10 @@ class CookerCollectFiles(object):
|
||||
unmatched.add(regex)
|
||||
|
||||
def findmatch(regex):
|
||||
for bbfile in self.appendlist:
|
||||
for append in self.appendlist[bbfile]:
|
||||
if regex.match(append):
|
||||
return True
|
||||
for b in self.bbappends:
|
||||
(bbfile, append) = b
|
||||
if regex.match(append):
|
||||
return True
|
||||
return False
|
||||
|
||||
for unmatch in unmatched.copy():
|
||||
|
||||
@@ -1242,6 +1242,8 @@ class RunQueue:
|
||||
prevh = __find_md5__.search(latestmatch).group(0)
|
||||
output = bb.siggen.compare_sigfiles(latestmatch, match, recursecb)
|
||||
bb.plain("\nTask %s:%s couldn't be used from the cache because:\n We need hash %s, closest matching task was %s\n " % (pn, taskname, h, prevh) + '\n '.join(output))
|
||||
else:
|
||||
bb.plain("Error, can't find multiple tasks at divergence point? Was there a previously run task?")
|
||||
|
||||
class RunQueueExecute:
|
||||
|
||||
|
||||
@@ -84,6 +84,11 @@ class Tinfoil:
|
||||
else:
|
||||
self.parseRecipes()
|
||||
|
||||
def shutdown(self):
|
||||
self.cooker.shutdown(force=True)
|
||||
self.cooker.post_serve()
|
||||
self.cooker.unlockBitbake()
|
||||
|
||||
class TinfoilConfigParameters(ConfigParameters):
|
||||
|
||||
def __init__(self, **options):
|
||||
|
||||
@@ -536,24 +536,29 @@ def main(server, eventHandler, params, tf = TerminalFilter):
|
||||
if not params.observe_only:
|
||||
_, error = server.runCommand(["stateForceShutdown"])
|
||||
main.shutdown = 2
|
||||
summary = ""
|
||||
if taskfailures:
|
||||
summary += pluralise("\nSummary: %s task failed:",
|
||||
"\nSummary: %s tasks failed:", len(taskfailures))
|
||||
for failure in taskfailures:
|
||||
summary += "\n %s" % failure
|
||||
if warnings:
|
||||
summary += pluralise("\nSummary: There was %s WARNING message shown.",
|
||||
"\nSummary: There were %s WARNING messages shown.", warnings)
|
||||
if return_value and errors:
|
||||
summary += pluralise("\nSummary: There was %s ERROR message shown, returning a non-zero exit code.",
|
||||
"\nSummary: There were %s ERROR messages shown, returning a non-zero exit code.", errors)
|
||||
if summary:
|
||||
print(summary)
|
||||
try:
|
||||
summary = ""
|
||||
if taskfailures:
|
||||
summary += pluralise("\nSummary: %s task failed:",
|
||||
"\nSummary: %s tasks failed:", len(taskfailures))
|
||||
for failure in taskfailures:
|
||||
summary += "\n %s" % failure
|
||||
if warnings:
|
||||
summary += pluralise("\nSummary: There was %s WARNING message shown.",
|
||||
"\nSummary: There were %s WARNING messages shown.", warnings)
|
||||
if return_value and errors:
|
||||
summary += pluralise("\nSummary: There was %s ERROR message shown, returning a non-zero exit code.",
|
||||
"\nSummary: There were %s ERROR messages shown, returning a non-zero exit code.", errors)
|
||||
if summary:
|
||||
print(summary)
|
||||
|
||||
if interrupted:
|
||||
print("Execution was interrupted, returning a non-zero exit code.")
|
||||
if return_value == 0:
|
||||
return_value = 1
|
||||
if interrupted:
|
||||
print("Execution was interrupted, returning a non-zero exit code.")
|
||||
if return_value == 0:
|
||||
return_value = 1
|
||||
except IOError as e:
|
||||
import errno
|
||||
if e.errno == errno.EPIPE:
|
||||
pass
|
||||
|
||||
return return_value
|
||||
|
||||
@@ -31,6 +31,7 @@ import subprocess
|
||||
import glob
|
||||
import traceback
|
||||
import errno
|
||||
import signal
|
||||
from commands import getstatusoutput
|
||||
from contextlib import contextmanager
|
||||
|
||||
@@ -386,10 +387,30 @@ def fileslocked(files):
|
||||
for lock in locks:
|
||||
bb.utils.unlockfile(lock)
|
||||
|
||||
def lockfile(name, shared=False, retry=True):
|
||||
@contextmanager
|
||||
def timeout(seconds):
|
||||
def timeout_handler(signum, frame):
|
||||
pass
|
||||
|
||||
original_handler = signal.signal(signal.SIGALRM, timeout_handler)
|
||||
|
||||
try:
|
||||
signal.alarm(seconds)
|
||||
yield
|
||||
finally:
|
||||
signal.alarm(0)
|
||||
signal.signal(signal.SIGALRM, original_handler)
|
||||
|
||||
def lockfile(name, shared=False, retry=True, block=False):
|
||||
"""
|
||||
Use the file fn as a lock file, return when the lock has been acquired.
|
||||
Returns a variable to pass to unlockfile().
|
||||
Use the specified file as a lock file, return when the lock has
|
||||
been acquired. Returns a variable to pass to unlockfile().
|
||||
Parameters:
|
||||
retry: True to re-try locking if it fails, False otherwise
|
||||
block: True to block until the lock succeeds, False otherwise
|
||||
The retry and block parameters are kind of equivalent unless you
|
||||
consider the possibility of sending a signal to the process to break
|
||||
out - at which point you want block=True rather than retry=True.
|
||||
"""
|
||||
dirname = os.path.dirname(name)
|
||||
mkdirhier(dirname)
|
||||
@@ -402,7 +423,7 @@ def lockfile(name, shared=False, retry=True):
|
||||
op = fcntl.LOCK_EX
|
||||
if shared:
|
||||
op = fcntl.LOCK_SH
|
||||
if not retry:
|
||||
if not retry and not block:
|
||||
op = op | fcntl.LOCK_NB
|
||||
|
||||
while True:
|
||||
|
||||
@@ -77,12 +77,15 @@ class PRServer(SimpleXMLRPCServer):
|
||||
|
||||
"""
|
||||
iter_count = 1
|
||||
# With 60 iterations between syncs and a 0.5 second timeout between
|
||||
# iterations, this will sync if dirty every ~30 seconds.
|
||||
# 60 iterations between syncs or sync if dirty every ~30 seconds
|
||||
iterations_between_sync = 60
|
||||
|
||||
while True:
|
||||
(request, client_address) = self.requestqueue.get()
|
||||
while not self.quit:
|
||||
try:
|
||||
(request, client_address) = self.requestqueue.get(True, 30)
|
||||
except Queue.Empty:
|
||||
self.table.sync_if_dirty()
|
||||
continue
|
||||
try:
|
||||
self.finish_request(request, client_address)
|
||||
self.shutdown_request(request)
|
||||
@@ -93,6 +96,7 @@ class PRServer(SimpleXMLRPCServer):
|
||||
self.handle_error(request, client_address)
|
||||
self.shutdown_request(request)
|
||||
self.table.sync()
|
||||
self.table.sync_if_dirty()
|
||||
|
||||
def process_request(self, request, client_address):
|
||||
self.requestqueue.put((request, client_address))
|
||||
@@ -137,7 +141,7 @@ class PRServer(SimpleXMLRPCServer):
|
||||
self.handlerthread.start()
|
||||
while not self.quit:
|
||||
self.handle_request()
|
||||
|
||||
self.handlerthread.join()
|
||||
self.table.sync()
|
||||
logger.info("PRServer: stopping...")
|
||||
self.server_close()
|
||||
|
||||
@@ -91,6 +91,11 @@
|
||||
<date>June 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.3</revnumber>
|
||||
<date>November 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.3 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -103,6 +103,11 @@
|
||||
<date>June 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.3</revnumber>
|
||||
<date>November 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.3 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<chapter id='dev-manual-intro'>
|
||||
|
||||
<title>The Yocto Project Development Manual</title>
|
||||
<section id='intro'>
|
||||
<section id='dev-intro'>
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>
|
||||
|
||||
@@ -81,6 +81,11 @@
|
||||
<date>June 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.3</revnumber>
|
||||
<date>November 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.3 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -66,6 +66,11 @@
|
||||
<date>June 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.3</revnumber>
|
||||
<date>November 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.3 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<!ENTITY DISTRO "1.7.2">
|
||||
<!ENTITY DISTRO_COMPRESSED "172">
|
||||
<!ENTITY DISTRO "1.7.3">
|
||||
<!ENTITY DISTRO_COMPRESSED "173">
|
||||
<!ENTITY DISTRO_NAME "dizzy">
|
||||
<!ENTITY YOCTO_DOC_VERSION "1.7.2">
|
||||
<!ENTITY POKYVERSION "12.0.2">
|
||||
<!ENTITY POKYVERSION_COMPRESSED "1202">
|
||||
<!ENTITY YOCTO_DOC_VERSION "1.7.3">
|
||||
<!ENTITY POKYVERSION "12.0.3">
|
||||
<!ENTITY POKYVERSION_COMPRESSED "1203">
|
||||
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
||||
<!ENTITY COPYRIGHT_YEAR "2010-2015">
|
||||
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<chapter id='profile-manual-intro'>
|
||||
|
||||
<title>Yocto Project Profiling and Tracing Manual</title>
|
||||
<section id='intro'>
|
||||
<section id='prof-intro'>
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>
|
||||
|
||||
@@ -66,6 +66,11 @@
|
||||
<date>June 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.3</revnumber>
|
||||
<date>November 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.3 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
||||
|
||||
<chapter id='intro'>
|
||||
<chapter id='ref-intro'>
|
||||
<title>Introduction</title>
|
||||
|
||||
<section id='intro-welcome'>
|
||||
|
||||
@@ -97,6 +97,11 @@
|
||||
<date>June 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.7.3</revnumber>
|
||||
<date>November 2015</date>
|
||||
<revremark>Released with the Yocto Project 1.7.3 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
|
||||
@@ -2,30 +2,30 @@
|
||||
# This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
|
||||
# This is the old way that did it. Can't do that now that we have "bitbake-user-manual" strings
|
||||
# in the mega-manual.
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
|
||||
|
||||
# Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
|
||||
# it is not included in the mega-manual.
|
||||
# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
|
||||
# This was the one-liner that worked before we introduced the BitBake User Manual, which is
|
||||
# not in the mega-manual.
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
|
||||
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
|
||||
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
|
||||
|
||||
# Process cases where just an external manual is referenced without an id anchor
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
|
||||
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.3\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
DISTRO_VERSION = "1.7.2"
|
||||
DISTRO_VERSION = "1.7.3"
|
||||
DISTRO_CODENAME = "dizzy"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
|
||||
|
||||
@@ -27,6 +27,10 @@ python () {
|
||||
d.setVar("PACKAGE_EXTRA_ARCHS", "")
|
||||
d.setVar("SDK_ARCH", "none")
|
||||
d.setVar("SDK_CC_ARCH", "none")
|
||||
d.setVar("TARGET_CPPFLAGS", "none")
|
||||
d.setVar("TARGET_CFLAGS", "none")
|
||||
d.setVar("TARGET_CXXFLAGS", "none")
|
||||
d.setVar("TARGET_LDFLAGS", "none")
|
||||
|
||||
# Avoid this being unnecessarily different due to nuances of
|
||||
# the target machine that aren't important for "all" arch
|
||||
|
||||
@@ -105,7 +105,7 @@ autotools_preconfigure() {
|
||||
if [ "${S}" != "${B}" ]; then
|
||||
echo "Previously configured separate build directory detected, cleaning ${B}"
|
||||
rm -rf ${B}
|
||||
mkdir ${B}
|
||||
mkdir -p ${B}
|
||||
else
|
||||
# At least remove the .la files since automake won't automatically
|
||||
# regenerate them even if CFLAGS/LDFLAGS are different
|
||||
|
||||
@@ -434,12 +434,30 @@ python () {
|
||||
bad_licenses = map(lambda l: canonical_license(d, l), bad_licenses)
|
||||
|
||||
whitelist = []
|
||||
incompatwl = []
|
||||
htincompatwl = []
|
||||
for lic in bad_licenses:
|
||||
spdx_license = return_spdx(d, lic)
|
||||
for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]:
|
||||
whitelist.extend((d.getVar(w + lic, True) or "").split())
|
||||
spdx_license = return_spdx(d, lic)
|
||||
if spdx_license:
|
||||
whitelist.extend((d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split())
|
||||
if spdx_license:
|
||||
whitelist.extend((d.getVar(w + spdx_license, True) or "").split())
|
||||
'''
|
||||
We need to track what we are whitelisting and why. If pn is
|
||||
incompatible and is not HOSTTOOLS_WHITELIST_ we need to be
|
||||
able to note that the image that is created may infact
|
||||
contain incompatible licenses despite INCOMPATIBLE_LICENSE
|
||||
being set.
|
||||
'''
|
||||
if "HOSTTOOLS" in w:
|
||||
htincompatwl.extend((d.getVar(w + lic, True) or "").split())
|
||||
if spdx_license:
|
||||
htincompatwl.extend((d.getVar(w + spdx_license, True) or "").split())
|
||||
else:
|
||||
incompatwl.extend((d.getVar(w + lic, True) or "").split())
|
||||
if spdx_license:
|
||||
incompatwl.extend((d.getVar(w + spdx_license, True) or "").split())
|
||||
|
||||
if not pn in whitelist:
|
||||
recipe_license = d.getVar('LICENSE', True)
|
||||
pkgs = d.getVar('PACKAGES', True).split()
|
||||
@@ -460,6 +478,11 @@ python () {
|
||||
elif all_skipped or incompatible_license(d, bad_licenses):
|
||||
bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, recipe_license))
|
||||
raise bb.parse.SkipPackage("incompatible with license %s" % recipe_license)
|
||||
elif pn in whitelist:
|
||||
if pn in incompatwl:
|
||||
bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted")
|
||||
elif pn in htincompatwl:
|
||||
bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted for HOSTTOOLS")
|
||||
|
||||
srcuri = d.getVar('SRC_URI', True)
|
||||
# Svn packages should DEPEND on subversion-native
|
||||
|
||||
@@ -9,12 +9,23 @@ inherit qemu
|
||||
FONT_PACKAGES ??= "${PN}"
|
||||
FONT_EXTRA_RDEPENDS ?= "fontconfig-utils"
|
||||
FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
|
||||
FONTCONFIG_CACHE_PARAMS ?= "-v"
|
||||
# You can change this to e.g. FC_DEBUG=16 to debug fc-cache issues,
|
||||
# something has to be set, because qemuwrapper is using this variable after -E
|
||||
# multiple variables aren't allowed because for qemu they are separated
|
||||
# by comma and in -n "$D" case they should be separated by space
|
||||
FONTCONFIG_CACHE_ENV ?= "FC_DEBUG=1"
|
||||
fontcache_common() {
|
||||
if [ "x$D" != "x" ] ; then
|
||||
$INTERCEPT_DIR/postinst_intercept update_font_cache ${PKG} mlprefix=${MLPREFIX} bindir=${bindir} \
|
||||
libdir=${libdir} base_libdir=${base_libdir} fontconfigcachedir=${FONTCONFIG_CACHE_DIR}
|
||||
if [ -n "$D" ] ; then
|
||||
$INTERCEPT_DIR/postinst_intercept update_font_cache ${PKG} mlprefix=${MLPREFIX} \
|
||||
'bindir="${bindir}"' \
|
||||
'libdir="${libdir}"' \
|
||||
'base_libdir="${base_libdir}"' \
|
||||
'fontconfigcachedir="${FONTCONFIG_CACHE_DIR}"' \
|
||||
'fontconfigcacheparams="${FONTCONFIG_CACHE_PARAMS}"' \
|
||||
'fontconfigcacheenv="${FONTCONFIG_CACHE_ENV}"'
|
||||
else
|
||||
fc-cache
|
||||
${FONTCONFIG_CACHE_ENV} fc-cache ${FONTCONFIG_CACHE_PARAMS}
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1 @@
|
||||
inherit gnomebase gtk-icon-cache gconf mime
|
||||
|
||||
EXTRA_OECONF += "--disable-introspection"
|
||||
|
||||
UNKNOWN_CONFIGURE_WHITELIST += "--disable-introspection"
|
||||
|
||||
@@ -28,3 +28,6 @@ do_install_append() {
|
||||
rm -f ${D}${datadir}/applications/*.cache
|
||||
}
|
||||
|
||||
EXTRA_OECONF += "--disable-introspection"
|
||||
|
||||
UNKNOWN_CONFIGURE_WHITELIST += "--disable-introspection"
|
||||
|
||||
@@ -94,7 +94,7 @@ def rootfs_variables(d):
|
||||
'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS','SDK_OS',
|
||||
'SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT','SDKTARGETSYSROOT','MULTILIBRE_ALLOW_REP',
|
||||
'MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS','PACKAGE_ARCHS',
|
||||
'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','BUILDNAME','USE_DEVFS',
|
||||
'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS',
|
||||
'STAGING_KERNEL_DIR','COMPRESSIONTYPES']
|
||||
variables.extend(command_variables(d))
|
||||
variables.extend(variable_depends(d))
|
||||
|
||||
@@ -49,24 +49,25 @@ license_create_manifest() {
|
||||
|
||||
pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
|
||||
pkged_name="$(basename $(readlink ${filename}))"
|
||||
pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
|
||||
if [ -z ${pkged_lic} ]; then
|
||||
pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; p }" ${filename})"
|
||||
if [ -z "${pkged_lic}" ]; then
|
||||
# fallback checking value of LICENSE
|
||||
pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
|
||||
pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})"
|
||||
fi
|
||||
|
||||
echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
|
||||
echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
|
||||
echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
|
||||
printf "LICENSE:" >> ${LICENSE_MANIFEST}
|
||||
for lic in ${pkged_lic}; do
|
||||
echo "LICENSE:" ${pkged_lic} >> ${LICENSE_MANIFEST}
|
||||
echo "" >> ${LICENSE_MANIFEST}
|
||||
|
||||
lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/ */ /g" )"
|
||||
for lic in ${lics}; do
|
||||
# to reference a license file trim trailing + symbol
|
||||
if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
|
||||
bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
|
||||
fi
|
||||
printf " ${lic}" >> ${LICENSE_MANIFEST}
|
||||
done
|
||||
printf "\n\n" >> ${LICENSE_MANIFEST}
|
||||
done
|
||||
|
||||
# Two options here:
|
||||
@@ -314,7 +315,8 @@ def incompatible_license(d, dont_want_licenses, package=None):
|
||||
# Handles an "or" or two license sets provided by
|
||||
# flattened_licenses(), pick one that works if possible.
|
||||
def choose_lic_set(a, b):
|
||||
return a if all(license_ok(lic) for lic in a) else b
|
||||
return a if all(license_ok(canonical_license(d, lic)) for lic in a) \
|
||||
else b
|
||||
|
||||
try:
|
||||
licenses = oe.license.flattened_licenses(license, choose_lic_set)
|
||||
@@ -389,6 +391,8 @@ do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
|
||||
|
||||
ROOTFS_POSTPROCESS_COMMAND_prepend = "write_package_manifest; license_create_manifest; "
|
||||
|
||||
do_populate_lic_setscene[dirs] = "${LICSSTATEDIR}/${PN}"
|
||||
do_populate_lic_setscene[cleandirs] = "${LICSSTATEDIR}"
|
||||
python do_populate_lic_setscene () {
|
||||
sstate_setscene(d)
|
||||
}
|
||||
|
||||
@@ -815,8 +815,8 @@ python split_and_strip_files () {
|
||||
#
|
||||
elffiles = {}
|
||||
symlinks = {}
|
||||
hardlinks = {}
|
||||
kernmods = []
|
||||
inodes = {}
|
||||
libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True))
|
||||
baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True))
|
||||
if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
|
||||
@@ -854,6 +854,7 @@ python split_and_strip_files () {
|
||||
#bb.note("Sym: %s (%d)" % (ltarget, isELF(ltarget)))
|
||||
symlinks[file] = target
|
||||
continue
|
||||
|
||||
# It's a file (or hardlink), not a link
|
||||
# ...but is it ELF, and is it already stripped?
|
||||
elf_file = isELF(file)
|
||||
@@ -865,28 +866,30 @@ python split_and_strip_files () {
|
||||
msg = "File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn)
|
||||
package_qa_handle_error("already-stripped", msg, d)
|
||||
continue
|
||||
# Check if it's a hard link to something else
|
||||
if s.st_nlink > 1:
|
||||
file_reference = "%d_%d" % (s.st_dev, s.st_ino)
|
||||
# Hard link to something else
|
||||
hardlinks[file] = file_reference
|
||||
continue
|
||||
elffiles[file] = elf_file
|
||||
|
||||
# At this point we have an unstripped elf file. We need to:
|
||||
# a) Make sure any file we strip is not hardlinked to anything else outside this tree
|
||||
# b) Only strip any hardlinked file once (no races)
|
||||
# c) Track any hardlinks between files so that we can reconstruct matching debug file hardlinks
|
||||
|
||||
# Use a reference of device ID and inode number to indentify files
|
||||
file_reference = "%d_%d" % (s.st_dev, s.st_ino)
|
||||
if file_reference in inodes:
|
||||
os.unlink(file)
|
||||
os.link(inodes[file_reference][0], file)
|
||||
inodes[file_reference].append(file)
|
||||
else:
|
||||
inodes[file_reference] = [file]
|
||||
# break hardlink
|
||||
bb.utils.copyfile(file, file)
|
||||
elffiles[file] = elf_file
|
||||
# Modified the file so clear the cache
|
||||
cpath.updatecache(file)
|
||||
|
||||
#
|
||||
# First lets process debug splitting
|
||||
#
|
||||
if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1'):
|
||||
hardlinkmap = {}
|
||||
# For hardlinks, process only one of the files
|
||||
for file in hardlinks:
|
||||
file_reference = hardlinks[file]
|
||||
if file_reference not in hardlinkmap:
|
||||
# If this is a new file, add it as a reference, and
|
||||
# update it's type, so we can fall through and split
|
||||
elffiles[file] = isELF(file)
|
||||
hardlinkmap[file_reference] = file
|
||||
|
||||
for file in elffiles:
|
||||
src = file[len(dvar):]
|
||||
dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
|
||||
@@ -899,13 +902,14 @@ python split_and_strip_files () {
|
||||
splitdebuginfo(file, fpath, debugsrcdir, sourcefile, d)
|
||||
|
||||
# Hardlink our debug symbols to the other hardlink copies
|
||||
for file in hardlinks:
|
||||
if file not in elffiles:
|
||||
for ref in inodes:
|
||||
if len(inodes[ref]) == 1:
|
||||
continue
|
||||
for file in inodes[ref][1:]:
|
||||
src = file[len(dvar):]
|
||||
dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
|
||||
fpath = dvar + dest
|
||||
file_reference = hardlinks[file]
|
||||
target = hardlinkmap[file_reference][len(dvar):]
|
||||
target = inodes[ref][0][len(dvar):]
|
||||
ftarget = dvar + debuglibdir + os.path.dirname(target) + debugdir + "/" + os.path.basename(target) + debugappend
|
||||
bb.utils.mkdirhier(os.path.dirname(fpath))
|
||||
#bb.note("Link %s -> %s" % (fpath, ftarget))
|
||||
|
||||
@@ -42,16 +42,6 @@ EXTRA_STAGING_FIXMES ?= ""
|
||||
|
||||
SIGGEN_LOCKEDSIGS_CHECK_LEVEL ?= 'error'
|
||||
|
||||
# Specify dirs in which the shell function is executed and don't use ${B}
|
||||
# as default dirs to avoid possible race about ${B} with other task.
|
||||
sstate_create_package[dirs] = "${SSTATE_BUILDDIR}"
|
||||
sstate_unpack_package[dirs] = "${SSTATE_INSTDIR}"
|
||||
|
||||
# Do not run sstate_hardcode_path() in ${B}:
|
||||
# the ${B} maybe removed by cmake_do_configure() while
|
||||
# sstate_hardcode_path() running.
|
||||
sstate_hardcode_path[dirs] = "${SSTATE_BUILDDIR}"
|
||||
|
||||
python () {
|
||||
if bb.data.inherits_class('native', d):
|
||||
d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH'))
|
||||
@@ -144,6 +134,8 @@ def sstate_install(ss, d):
|
||||
shareddirs = []
|
||||
bb.utils.mkdirhier(d.expand("${SSTATE_MANIFESTS}"))
|
||||
|
||||
sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['task'])
|
||||
|
||||
d2 = d.createCopy()
|
||||
extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
|
||||
if extrainf:
|
||||
@@ -237,7 +229,8 @@ def sstate_install(ss, d):
|
||||
oe.path.copyhardlinktree(state[1], state[2])
|
||||
|
||||
for postinst in (d.getVar('SSTATEPOSTINSTFUNCS', True) or '').split():
|
||||
bb.build.exec_func(postinst, d)
|
||||
# All hooks should run in the SSTATE_INSTDIR
|
||||
bb.build.exec_func(postinst, d, (sstateinst,))
|
||||
|
||||
for lock in locks:
|
||||
bb.utils.unlockfile(lock)
|
||||
@@ -273,7 +266,8 @@ def sstate_installpkg(ss, d):
|
||||
d.setVar('SSTATE_PKG', sstatepkg)
|
||||
|
||||
for f in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split() + ['sstate_unpack_package'] + (d.getVar('SSTATEPOSTUNPACKFUNCS', True) or '').split():
|
||||
bb.build.exec_func(f, d)
|
||||
# All hooks should run in the SSTATE_INSTDIR
|
||||
bb.build.exec_func(f, d, (sstateinst,))
|
||||
|
||||
for state in ss['dirs']:
|
||||
prepdir(state[1])
|
||||
@@ -545,8 +539,9 @@ def sstate_package(ss, d):
|
||||
|
||||
for f in (d.getVar('SSTATECREATEFUNCS', True) or '').split() + ['sstate_create_package'] + \
|
||||
(d.getVar('SSTATEPOSTCREATEFUNCS', True) or '').split():
|
||||
bb.build.exec_func(f, d)
|
||||
|
||||
# All hooks should run in SSTATE_BUILDDIR.
|
||||
bb.build.exec_func(f, d, (sstatebuild,))
|
||||
|
||||
bb.siggen.dump_this_task(sstatepkg + ".siginfo", d)
|
||||
|
||||
return
|
||||
@@ -567,7 +562,7 @@ def pstaging_fetch(sstatefetch, sstatepkg, d):
|
||||
bb.utils.mkdirhier(dldir)
|
||||
|
||||
localdata.delVar('MIRRORS')
|
||||
localdata.delVar('FILESPATH')
|
||||
localdata.setVar('FILESPATH', dldir)
|
||||
localdata.setVar('DL_DIR', dldir)
|
||||
localdata.setVar('PREMIRRORS', mirrors)
|
||||
|
||||
@@ -604,19 +599,22 @@ python sstate_task_prefunc () {
|
||||
shared_state = sstate_state_fromvars(d)
|
||||
sstate_clean(shared_state, d)
|
||||
}
|
||||
sstate_task_prefunc[dirs] = "${WORKDIR}"
|
||||
|
||||
python sstate_task_postfunc () {
|
||||
shared_state = sstate_state_fromvars(d)
|
||||
|
||||
sstate_install(shared_state, d)
|
||||
for intercept in shared_state['interceptfuncs']:
|
||||
bb.build.exec_func(intercept, d)
|
||||
bb.build.exec_func(intercept, d, (d.getVar("WORKDIR", True),))
|
||||
omask = os.umask(002)
|
||||
if omask != 002:
|
||||
bb.note("Using umask 002 (not %0o) for sstate packaging" % omask)
|
||||
sstate_package(shared_state, d)
|
||||
os.umask(omask)
|
||||
}
|
||||
|
||||
sstate_task_postfunc[dirs] = "${WORKDIR}"
|
||||
|
||||
|
||||
#
|
||||
# Shell function to generate a sstate package from a directory
|
||||
@@ -698,6 +696,8 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
dldir = localdata.expand("${SSTATE_DIR}")
|
||||
localdata.delVar('MIRRORS')
|
||||
localdata.setVar('FILESPATH', dldir)
|
||||
localdata.setVar('DL_DIR', dldir)
|
||||
localdata.setVar('PREMIRRORS', mirrors)
|
||||
|
||||
|
||||
@@ -43,5 +43,16 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
|
||||
gcc-cross-${TARGET_ARCH}->musl \
|
||||
gcc-cross-${TARGET_ARCH}->uclibc \
|
||||
gcc-cross-${TARGET_ARCH}->linux-libc-headers \
|
||||
ppp-dialin->ppp \
|
||||
resolvconf->bash \
|
||||
docbook-xsl-stylesheets->perl \
|
||||
initramfs-framework->busybox \
|
||||
initramfs-framework->systemd \
|
||||
initramfs-framework->udev \
|
||||
liberation-fonts->fontconfig \
|
||||
gnome-icon-theme->librsvg \
|
||||
font-alias->font-util \
|
||||
weston-init->weston \
|
||||
weston-init->kbd \
|
||||
"
|
||||
|
||||
|
||||
@@ -30,8 +30,7 @@ def runstrip(arg):
|
||||
elif elftype & 8 or elftype & 4:
|
||||
extraflags = "--remove-section=.comment --remove-section=.note"
|
||||
|
||||
# Use mv to break hardlinks
|
||||
stripcmd = "'%s' %s '%s' -o '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file)
|
||||
stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
|
||||
bb.debug(1, "runstrip: %s" % stripcmd)
|
||||
|
||||
ret = subprocess.call(stripcmd, shell=True)
|
||||
|
||||
@@ -77,6 +77,9 @@ class Rootfs(object):
|
||||
pre_process_cmds = self.d.getVar("ROOTFS_PREPROCESS_COMMAND", True)
|
||||
post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND", True)
|
||||
|
||||
postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR", True)
|
||||
if not postinst_intercepts_dir:
|
||||
postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts")
|
||||
intercepts_dir = os.path.join(self.d.getVar('WORKDIR', True),
|
||||
"intercept_scripts")
|
||||
|
||||
@@ -86,8 +89,7 @@ class Rootfs(object):
|
||||
|
||||
bb.utils.mkdirhier(self.deploy_dir_image)
|
||||
|
||||
shutil.copytree(self.d.expand("${COREBASE}/scripts/postinst-intercepts"),
|
||||
intercepts_dir)
|
||||
shutil.copytree(postinst_intercepts_dir, intercepts_dir)
|
||||
|
||||
shutil.copy(self.d.expand("${COREBASE}/meta/files/deploydir_readme.txt"),
|
||||
self.deploy_dir_image +
|
||||
@@ -181,7 +183,7 @@ class Rootfs(object):
|
||||
bb.note("> Executing %s intercept ..." % script)
|
||||
|
||||
try:
|
||||
subprocess.check_output(script_full)
|
||||
subprocess.check_call(script_full)
|
||||
except subprocess.CalledProcessError as e:
|
||||
bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details!" %
|
||||
(script, e.returncode))
|
||||
|
||||
@@ -97,6 +97,9 @@ class BitbakeTests(oeSelfTest):
|
||||
def test_invalid_recipe_src_uri(self):
|
||||
data = 'SRC_URI = "file://invalid"'
|
||||
self.write_recipeinc('man', data)
|
||||
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
|
||||
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
|
||||
""")
|
||||
bitbake('-ccleanall man')
|
||||
result = bitbake('-c fetch man', ignore_status=True)
|
||||
bitbake('-ccleanall man')
|
||||
@@ -107,6 +110,9 @@ class BitbakeTests(oeSelfTest):
|
||||
|
||||
@testcase(171)
|
||||
def test_rename_downloaded_file(self):
|
||||
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
|
||||
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
|
||||
""")
|
||||
data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"'
|
||||
self.write_recipeinc('aspell', data)
|
||||
bitbake('-ccleanall aspell')
|
||||
@@ -169,6 +175,9 @@ class BitbakeTests(oeSelfTest):
|
||||
|
||||
@testcase(1035)
|
||||
def test_continue(self):
|
||||
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
|
||||
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
|
||||
""")
|
||||
self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
|
||||
runCmd('bitbake -c cleanall man xcursor-transparent-theme')
|
||||
result = runCmd('bitbake man xcursor-transparent-theme -k', ignore_status=True)
|
||||
|
||||
@@ -17,12 +17,15 @@ class ImageOptionsTests(oeSelfTest):
|
||||
self.write_config('INC_RPM_IMAGE_GEN = "1"')
|
||||
self.append_config('IMAGE_FEATURES += "ssh-server-openssh"')
|
||||
bitbake("core-image-minimal")
|
||||
res = runCmd("grep 'Installing openssh-sshd' %s" % (os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")), ignore_status=True)
|
||||
log_data_file = os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")
|
||||
log_data_created = ftools.read_file(log_data_file)
|
||||
incremental_created = re.search("NOTE: load old install solution for incremental install\nNOTE: old install solution not exist\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: Installing the following packages:.*packagegroup-core-ssh-openssh", log_data_created)
|
||||
self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
|
||||
self.assertEqual(0, res.status, msg="No match for openssh-sshd in log.do_rootfs")
|
||||
self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % log_data_created)
|
||||
bitbake("core-image-minimal")
|
||||
res = runCmd("grep 'Removing openssh-sshd' %s" %(os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")),ignore_status=True)
|
||||
self.assertEqual(0, res.status, msg="openssh-sshd was not removed from image")
|
||||
log_data_removed = ftools.read_file(log_data_file)
|
||||
incremental_removed = re.search("NOTE: load old install solution for incremental install\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: incremental removed:.*openssh-sshd-.*", log_data_removed)
|
||||
self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
|
||||
|
||||
@testcase(925)
|
||||
def test_rm_old_image(self):
|
||||
|
||||
@@ -12,7 +12,9 @@ import signal
|
||||
import re
|
||||
import socket
|
||||
import select
|
||||
import bb
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger("BitBake.QemuRunner")
|
||||
|
||||
class QemuRunner:
|
||||
|
||||
@@ -37,9 +39,6 @@ class QemuRunner:
|
||||
|
||||
self.runqemutime = 60
|
||||
|
||||
self.create_socket()
|
||||
|
||||
|
||||
def create_socket(self):
|
||||
|
||||
self.bootlog = ''
|
||||
@@ -51,10 +50,12 @@ class QemuRunner:
|
||||
self.server_socket.bind(("127.0.0.1",0))
|
||||
self.server_socket.listen(2)
|
||||
self.serverport = self.server_socket.getsockname()[1]
|
||||
bb.note("Created listening socket for qemu serial console on: 127.0.0.1:%s" % self.serverport)
|
||||
logger.info("Created listening socket for qemu serial console on: 127.0.0.1:%s" % self.serverport)
|
||||
return True
|
||||
except socket.error, msg:
|
||||
self.server_socket.close()
|
||||
bb.fatal("Failed to create listening socket: %s" %msg[1])
|
||||
logger.error("Failed to create listening socket: %s" % msg[1])
|
||||
return False
|
||||
|
||||
|
||||
def log(self, msg):
|
||||
@@ -63,26 +64,28 @@ class QemuRunner:
|
||||
f.write("%s" % msg)
|
||||
|
||||
def start(self, qemuparams = None):
|
||||
|
||||
if self.display:
|
||||
os.environ["DISPLAY"] = self.display
|
||||
else:
|
||||
bb.error("To start qemu I need a X desktop, please set DISPLAY correctly (e.g. DISPLAY=:1)")
|
||||
logger.error("To start qemu I need a X desktop, please set DISPLAY correctly (e.g. DISPLAY=:1)")
|
||||
return False
|
||||
if not os.path.exists(self.rootfs):
|
||||
bb.error("Invalid rootfs %s" % self.rootfs)
|
||||
logger.error("Invalid rootfs %s" % self.rootfs)
|
||||
return False
|
||||
if not os.path.exists(self.tmpdir):
|
||||
bb.error("Invalid TMPDIR path %s" % self.tmpdir)
|
||||
logger.error("Invalid TMPDIR path %s" % self.tmpdir)
|
||||
return False
|
||||
else:
|
||||
os.environ["OE_TMPDIR"] = self.tmpdir
|
||||
if not os.path.exists(self.deploy_dir_image):
|
||||
bb.error("Invalid DEPLOY_DIR_IMAGE path %s" % self.deploy_dir_image)
|
||||
logger.error("Invalid DEPLOY_DIR_IMAGE path %s" % self.deploy_dir_image)
|
||||
return False
|
||||
else:
|
||||
os.environ["DEPLOY_DIR_IMAGE"] = self.deploy_dir_image
|
||||
|
||||
if not self.create_socket():
|
||||
return False
|
||||
|
||||
# Set this flag so that Qemu doesn't do any grabs as SDL grabs interact
|
||||
# badly with screensavers.
|
||||
os.environ["QEMU_DONT_GRAB"] = "1"
|
||||
@@ -93,28 +96,31 @@ class QemuRunner:
|
||||
launch_cmd = 'runqemu %s %s %s' % (self.machine, self.rootfs, self.qemuparams)
|
||||
self.runqemu = subprocess.Popen(launch_cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT,preexec_fn=os.setpgrp)
|
||||
|
||||
bb.note("runqemu started, pid is %s" % self.runqemu.pid)
|
||||
bb.note("waiting at most %s seconds for qemu pid" % self.runqemutime)
|
||||
logger.info("runqemu started, pid is %s" % self.runqemu.pid)
|
||||
logger.info("waiting at most %s seconds for qemu pid" % self.runqemutime)
|
||||
endtime = time.time() + self.runqemutime
|
||||
while not self.is_alive() and time.time() < endtime:
|
||||
time.sleep(1)
|
||||
|
||||
if self.is_alive():
|
||||
bb.note("qemu started - qemu procces pid is %s" % self.qemupid)
|
||||
logger.info("qemu started - qemu procces pid is %s" % self.qemupid)
|
||||
cmdline = ''
|
||||
with open('/proc/%s/cmdline' % self.qemupid) as p:
|
||||
cmdline = p.read()
|
||||
ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
|
||||
if not ips or len(ips) != 3:
|
||||
bb.note("Couldn't get ip from qemu process arguments! Here is the qemu command line used: %s" % cmdline)
|
||||
try:
|
||||
ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
|
||||
if not ips or len(ips) != 3:
|
||||
raise ValueError
|
||||
else:
|
||||
self.ip = ips[0]
|
||||
self.server_ip = ips[1]
|
||||
except IndexError, ValueError:
|
||||
logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used: %s" % cmdline)
|
||||
self.stop()
|
||||
return False
|
||||
else:
|
||||
self.ip = ips[0]
|
||||
self.server_ip = ips[1]
|
||||
bb.note("Target IP: %s" % self.ip)
|
||||
bb.note("Server IP: %s" % self.server_ip)
|
||||
bb.note("Waiting at most %d seconds for login banner" % self.boottime )
|
||||
logger.info("Target IP: %s" % self.ip)
|
||||
logger.info("Server IP: %s" % self.server_ip)
|
||||
logger.info("Waiting at most %d seconds for login banner" % self.boottime)
|
||||
endtime = time.time() + self.boottime
|
||||
socklist = [self.server_socket]
|
||||
reachedlogin = False
|
||||
@@ -127,7 +133,7 @@ class QemuRunner:
|
||||
self.qemusock.setblocking(0)
|
||||
socklist.append(self.qemusock)
|
||||
socklist.remove(self.server_socket)
|
||||
bb.note("Connection from %s:%s" % addr)
|
||||
logger.info("Connection from %s:%s" % addr)
|
||||
else:
|
||||
data = sock.recv(1024)
|
||||
if data:
|
||||
@@ -136,24 +142,24 @@ class QemuRunner:
|
||||
if re.search("qemu.* login:", self.bootlog):
|
||||
stopread = True
|
||||
reachedlogin = True
|
||||
bb.note("Reached login banner")
|
||||
logger.info("Reached login banner")
|
||||
else:
|
||||
socklist.remove(sock)
|
||||
sock.close()
|
||||
stopread = True
|
||||
|
||||
if not reachedlogin:
|
||||
bb.note("Target didn't reached login boot in %d seconds" % self.boottime)
|
||||
logger.info("Target didn't reached login boot in %d seconds" % self.boottime)
|
||||
lines = "\n".join(self.bootlog.splitlines()[-5:])
|
||||
bb.note("Last 5 lines of text:\n%s" % lines)
|
||||
bb.note("Check full boot log: %s" % self.logfile)
|
||||
logger.info("Last 5 lines of text:\n%s" % lines)
|
||||
logger.info("Check full boot log: %s" % self.logfile)
|
||||
self.stop()
|
||||
return False
|
||||
else:
|
||||
bb.note("Qemu pid didn't appeared in %s seconds" % self.runqemutime)
|
||||
logger.info("Qemu pid didn't appeared in %s seconds" % self.runqemutime)
|
||||
output = self.runqemu.stdout
|
||||
self.stop()
|
||||
bb.note("Output from runqemu:\n%s" % output.read())
|
||||
logger.info("Output from runqemu:\n%s" % output.read())
|
||||
return False
|
||||
|
||||
return self.is_alive()
|
||||
@@ -161,13 +167,13 @@ class QemuRunner:
|
||||
def stop(self):
|
||||
|
||||
if self.runqemu:
|
||||
bb.note("Sending SIGTERM to runqemu")
|
||||
logger.info("Sending SIGTERM to runqemu")
|
||||
os.killpg(self.runqemu.pid, signal.SIGTERM)
|
||||
endtime = time.time() + self.runqemutime
|
||||
while self.runqemu.poll() is None and time.time() < endtime:
|
||||
time.sleep(1)
|
||||
if self.runqemu.poll() is None:
|
||||
bb.note("Sending SIGKILL to runqemu")
|
||||
logger.info("Sending SIGKILL to runqemu")
|
||||
os.killpg(self.runqemu.pid, signal.SIGKILL)
|
||||
self.runqemu = None
|
||||
if self.server_socket:
|
||||
@@ -177,10 +183,9 @@ class QemuRunner:
|
||||
self.ip = None
|
||||
|
||||
def restart(self, qemuparams = None):
|
||||
bb.note("Restarting qemu process")
|
||||
logger.info("Restarting qemu process")
|
||||
if self.runqemu.poll() is None:
|
||||
self.stop()
|
||||
self.create_socket()
|
||||
if self.start(qemuparams):
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
Upstream-Status: Accepted
|
||||
Signed-off-by: Awais Belal <awais_belal@mentor.com>
|
||||
|
||||
From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
|
||||
From: Hector Marco-Gisbert <hecmargi@upv.es>
|
||||
Date: Wed, 16 Dec 2015 04:57:18 +0000
|
||||
Subject: Fix security issue when reading username and password
|
||||
|
||||
This patch fixes two integer underflows at:
|
||||
* grub-core/lib/crypto.c
|
||||
* grub-core/normal/auth.c
|
||||
|
||||
CVE-2015-8370
|
||||
|
||||
Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
|
||||
Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
|
||||
Also-By: Andrey Borzenkov <arvidjaar@gmail.com>
|
||||
---
|
||||
Index: grub-2.00/grub-core/lib/crypto.c
|
||||
===================================================================
|
||||
--- grub-2.00.orig/grub-core/lib/crypto.c
|
||||
+++ grub-2.00/grub-core/lib/crypto.c
|
||||
@@ -458,7 +458,8 @@ grub_password_get (char buf[], unsigned
|
||||
|
||||
if (key == '\b')
|
||||
{
|
||||
- cur_len--;
|
||||
+ if (cur_len)
|
||||
+ cur_len--;
|
||||
continue;
|
||||
}
|
||||
|
||||
Index: grub-2.00/grub-core/normal/auth.c
|
||||
===================================================================
|
||||
--- grub-2.00.orig/grub-core/normal/auth.c
|
||||
+++ grub-2.00/grub-core/normal/auth.c
|
||||
@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned
|
||||
|
||||
if (key == '\b')
|
||||
{
|
||||
- cur_len--;
|
||||
- grub_printf ("\b");
|
||||
+ if (cur_len)
|
||||
+ {
|
||||
+ cur_len--;
|
||||
+ grub_printf ("\b");
|
||||
+ }
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
Upstream-Status: Backport
|
||||
|
||||
Original commit: http://git.savannah.gnu.org/cgit/grub.git/commit/grub-core/net/bootp.c?id=f06c2172c0b32052f22e37523445cf8e7affaea3
|
||||
|
||||
From 149d2a14f4723778ced23f439487201ccbf1a2c9 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 23 Apr 2015 07:03:34 +0000
|
||||
Subject: [PATCH] parse_dhcp_vendor: Add missing const qualifiers.
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
grub-core/net/bootp.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
|
||||
index bc07d53..44131ed 100644
|
||||
--- a/grub-core/net/bootp.c
|
||||
+++ b/grub-core/net/bootp.c
|
||||
@@ -52,9 +52,9 @@ set_env_limn_ro (const char *intername, const char *suffix,
|
||||
}
|
||||
|
||||
static void
|
||||
-parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
|
||||
+parse_dhcp_vendor (const char *name, const void *vend, int limit, int *mask)
|
||||
{
|
||||
- grub_uint8_t *ptr, *ptr0;
|
||||
+ const grub_uint8_t *ptr, *ptr0;
|
||||
|
||||
ptr = ptr0 = vend;
|
||||
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -29,6 +29,8 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
|
||||
file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
|
||||
file://grub-2.00-add-oe-kernel.patch \
|
||||
file://grub-efi-fix-with-glibc-2.20.patch \
|
||||
file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
|
||||
file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
|
||||
SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
|
||||
|
||||
@@ -24,6 +24,8 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
|
||||
file://grub-2.00-add-oe-kernel.patch \
|
||||
file://fix-endianness-problem.patch \
|
||||
file://grub2-remove-sparc64-setup-from-x86-builds.patch \
|
||||
file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
|
||||
file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
|
||||
|
||||
60
meta/recipes-connectivity/bind/bind/CVE-2015-1349.patch
Normal file
60
meta/recipes-connectivity/bind/bind/CVE-2015-1349.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
CVE-2015-1349 bind: issue in trust anchor management can cause named to crash
|
||||
|
||||
commit 2e9d79f169663c9aff5f0dcdc626a2cd2dbb5892
|
||||
Author: Evan Hunt <each@isc.org>
|
||||
Date: Tue Feb 3 18:30:38 2015 -0800
|
||||
|
||||
[v9_9_6_patch] avoid crash due to managed-key rollover
|
||||
|
||||
4053. [security] Revoking a managed trust anchor and supplying
|
||||
an untrusted replacement could cause named
|
||||
to crash with an assertion failure.
|
||||
(CVE-2015-1349) [RT #38344]
|
||||
|
||||
Upstream Status: Backport from Redhat
|
||||
|
||||
https://bugzilla.redhat.com/attachment.cgi?id=993045
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
Index: bind-9.9.5/CHANGES
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/CHANGES
|
||||
+++ bind-9.9.5/CHANGES
|
||||
@@ -1,3 +1,10 @@
|
||||
+ --- 9.9.6-P2 released ---
|
||||
+
|
||||
+4053. [security] Revoking a managed trust anchor and supplying
|
||||
+ an untrusted replacement could cause named
|
||||
+ to crash with an assertion failure.
|
||||
+ (CVE-2015-1349) [RT #38344]
|
||||
+
|
||||
--- 9.9.5 released ---
|
||||
|
||||
--- 9.9.5rc2 released ---
|
||||
Index: bind-9.9.5/lib/dns/zone.c
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/zone.c
|
||||
+++ bind-9.9.5/lib/dns/zone.c
|
||||
@@ -8496,6 +8496,12 @@ keyfetch_done(isc_task_t *task, isc_even
|
||||
namebuf, tag);
|
||||
trustkey = ISC_TRUE;
|
||||
}
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * No previously known key, and the key is not
|
||||
+ * secure, so skip it.
|
||||
+ */
|
||||
+ continue;
|
||||
}
|
||||
|
||||
/* Delete old version */
|
||||
@@ -8544,7 +8550,7 @@ keyfetch_done(isc_task_t *task, isc_even
|
||||
trust_key(zone, keyname, &dnskey, mctx);
|
||||
}
|
||||
|
||||
- if (!deletekey)
|
||||
+ if (secure && !deletekey)
|
||||
set_refreshkeytimer(zone, &keydata, now);
|
||||
}
|
||||
|
||||
36
meta/recipes-connectivity/bind/bind/CVE-2015-4620.patch
Normal file
36
meta/recipes-connectivity/bind/bind/CVE-2015-4620.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
CVE-2015-4620 bind: abort DoS caused by uninitialized value use in isselfsigned()
|
||||
|
||||
issue introduced by git commit
|
||||
|
||||
https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=commitdiff;h=44f175a90a855326725439b2f1178f0dcca8f67d
|
||||
|
||||
which is in this version of bind.
|
||||
|
||||
Upstream Status: Backport from Redhat
|
||||
|
||||
https://bugzilla.redhat.com/attachment.cgi?id=1044719
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
Index: bind-9.9.5/lib/dns/validator.c
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/validator.c
|
||||
+++ bind-9.9.5/lib/dns/validator.c
|
||||
@@ -1406,7 +1406,6 @@ compute_keytag(dns_rdata_t *rdata, dns_r
|
||||
*/
|
||||
static isc_boolean_t
|
||||
isselfsigned(dns_validator_t *val) {
|
||||
- dns_fixedname_t fixed;
|
||||
dns_rdataset_t *rdataset, *sigrdataset;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dns_rdata_t sigrdata = DNS_RDATA_INIT;
|
||||
@@ -1462,8 +1461,7 @@ isselfsigned(dns_validator_t *val) {
|
||||
result = dns_dnssec_verify3(name, rdataset, dstkey,
|
||||
ISC_TRUE,
|
||||
val->view->maxbits,
|
||||
- mctx, &sigrdata,
|
||||
- dns_fixedname_name(&fixed));
|
||||
+ mctx, &sigrdata, NULL);
|
||||
dst_key_free(&dstkey);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
continue;
|
||||
490
meta/recipes-connectivity/bind/bind/CVE-2015-5722.patch
Normal file
490
meta/recipes-connectivity/bind/bind/CVE-2015-5722.patch
Normal file
@@ -0,0 +1,490 @@
|
||||
CVE-2015-5722 bind: malformed DNSSEC key failed assertion denial of service
|
||||
|
||||
Upstream Status: Backport from Redhat
|
||||
|
||||
https://bugzilla.redhat.com/attachment.cgi?id=1069245
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
Index: bind-9.9.5/lib/dns/hmac_link.c
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/hmac_link.c
|
||||
+++ bind-9.9.5/lib/dns/hmac_link.c
|
||||
@@ -76,7 +76,7 @@ hmacmd5_createctx(dst_key_t *key, dst_co
|
||||
hmacmd5ctx = isc_mem_get(dctx->mctx, sizeof(isc_hmacmd5_t));
|
||||
if (hmacmd5ctx == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
- isc_hmacmd5_init(hmacmd5ctx, hkey->key, ISC_SHA1_BLOCK_LENGTH);
|
||||
+ isc_hmacmd5_init(hmacmd5ctx, hkey->key, ISC_MD5_BLOCK_LENGTH);
|
||||
dctx->ctxdata.hmacmd5ctx = hmacmd5ctx;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
@@ -139,7 +139,7 @@ hmacmd5_compare(const dst_key_t *key1, c
|
||||
else if (hkey1 == NULL || hkey2 == NULL)
|
||||
return (ISC_FALSE);
|
||||
|
||||
- if (isc_safe_memcmp(hkey1->key, hkey2->key, ISC_SHA1_BLOCK_LENGTH))
|
||||
+ if (isc_safe_memcmp(hkey1->key, hkey2->key, ISC_MD5_BLOCK_LENGTH))
|
||||
return (ISC_TRUE);
|
||||
else
|
||||
return (ISC_FALSE);
|
||||
@@ -150,17 +150,17 @@ hmacmd5_generate(dst_key_t *key, int pse
|
||||
isc_buffer_t b;
|
||||
isc_result_t ret;
|
||||
unsigned int bytes;
|
||||
- unsigned char data[ISC_SHA1_BLOCK_LENGTH];
|
||||
+ unsigned char data[ISC_MD5_BLOCK_LENGTH];
|
||||
|
||||
UNUSED(callback);
|
||||
|
||||
bytes = (key->key_size + 7) / 8;
|
||||
- if (bytes > ISC_SHA1_BLOCK_LENGTH) {
|
||||
- bytes = ISC_SHA1_BLOCK_LENGTH;
|
||||
- key->key_size = ISC_SHA1_BLOCK_LENGTH * 8;
|
||||
+ if (bytes > ISC_MD5_BLOCK_LENGTH) {
|
||||
+ bytes = ISC_MD5_BLOCK_LENGTH;
|
||||
+ key->key_size = ISC_MD5_BLOCK_LENGTH * 8;
|
||||
}
|
||||
|
||||
- memset(data, 0, ISC_SHA1_BLOCK_LENGTH);
|
||||
+ memset(data, 0, ISC_MD5_BLOCK_LENGTH);
|
||||
ret = dst__entropy_getdata(data, bytes, ISC_TF(pseudorandom_ok != 0));
|
||||
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
@@ -169,7 +169,7 @@ hmacmd5_generate(dst_key_t *key, int pse
|
||||
isc_buffer_init(&b, data, bytes);
|
||||
isc_buffer_add(&b, bytes);
|
||||
ret = hmacmd5_fromdns(key, &b);
|
||||
- memset(data, 0, ISC_SHA1_BLOCK_LENGTH);
|
||||
+ memset(data, 0, ISC_MD5_BLOCK_LENGTH);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ hmacmd5_fromdns(dst_key_t *key, isc_buff
|
||||
|
||||
memset(hkey->key, 0, sizeof(hkey->key));
|
||||
|
||||
- if (r.length > ISC_SHA1_BLOCK_LENGTH) {
|
||||
+ if (r.length > ISC_MD5_BLOCK_LENGTH) {
|
||||
isc_md5_init(&md5ctx);
|
||||
isc_md5_update(&md5ctx, r.base, r.length);
|
||||
isc_md5_final(&md5ctx, hkey->key);
|
||||
@@ -236,6 +236,8 @@ hmacmd5_fromdns(dst_key_t *key, isc_buff
|
||||
key->key_size = keylen * 8;
|
||||
key->keydata.hmacmd5 = hkey;
|
||||
|
||||
+ isc_buffer_forward(data, r.length);
|
||||
+
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -512,6 +514,8 @@ hmacsha1_fromdns(dst_key_t *key, isc_buf
|
||||
key->key_size = keylen * 8;
|
||||
key->keydata.hmacsha1 = hkey;
|
||||
|
||||
+ isc_buffer_forward(data, r.length);
|
||||
+
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -790,6 +794,8 @@ hmacsha224_fromdns(dst_key_t *key, isc_b
|
||||
key->key_size = keylen * 8;
|
||||
key->keydata.hmacsha224 = hkey;
|
||||
|
||||
+ isc_buffer_forward(data, r.length);
|
||||
+
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -1068,6 +1074,8 @@ hmacsha256_fromdns(dst_key_t *key, isc_b
|
||||
key->key_size = keylen * 8;
|
||||
key->keydata.hmacsha256 = hkey;
|
||||
|
||||
+ isc_buffer_forward(data, r.length);
|
||||
+
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -1346,6 +1354,8 @@ hmacsha384_fromdns(dst_key_t *key, isc_b
|
||||
key->key_size = keylen * 8;
|
||||
key->keydata.hmacsha384 = hkey;
|
||||
|
||||
+ isc_buffer_forward(data, r.length);
|
||||
+
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -1624,6 +1634,8 @@ hmacsha512_fromdns(dst_key_t *key, isc_b
|
||||
key->key_size = keylen * 8;
|
||||
key->keydata.hmacsha512 = hkey;
|
||||
|
||||
+ isc_buffer_forward(data, r.length);
|
||||
+
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
Index: bind-9.9.5/lib/dns/include/dst/dst.h
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/include/dst/dst.h
|
||||
+++ bind-9.9.5/lib/dns/include/dst/dst.h
|
||||
@@ -69,6 +69,7 @@ typedef struct dst_context dst_context_
|
||||
#define DST_ALG_HMACSHA256 163 /* XXXMPA */
|
||||
#define DST_ALG_HMACSHA384 164 /* XXXMPA */
|
||||
#define DST_ALG_HMACSHA512 165 /* XXXMPA */
|
||||
+#define DST_ALG_INDIRECT 252
|
||||
#define DST_ALG_PRIVATE 254
|
||||
#define DST_ALG_EXPAND 255
|
||||
#define DST_MAX_ALGS 255
|
||||
Index: bind-9.9.5/lib/dns/ncache.c
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/ncache.c
|
||||
+++ bind-9.9.5/lib/dns/ncache.c
|
||||
@@ -614,13 +614,11 @@ dns_ncache_getsigrdataset(dns_rdataset_t
|
||||
dns_name_fromregion(&tname, &remaining);
|
||||
INSIST(remaining.length >= tname.length);
|
||||
isc_buffer_forward(&source, tname.length);
|
||||
- remaining.length -= tname.length;
|
||||
- remaining.base += tname.length;
|
||||
+ isc_region_consume(&remaining, tname.length);
|
||||
|
||||
INSIST(remaining.length >= 2);
|
||||
type = isc_buffer_getuint16(&source);
|
||||
- remaining.length -= 2;
|
||||
- remaining.base += 2;
|
||||
+ isc_region_consume(&remaining, 2);
|
||||
|
||||
if (type != dns_rdatatype_rrsig ||
|
||||
!dns_name_equal(&tname, name)) {
|
||||
@@ -632,8 +630,7 @@ dns_ncache_getsigrdataset(dns_rdataset_t
|
||||
INSIST(remaining.length >= 1);
|
||||
trust = isc_buffer_getuint8(&source);
|
||||
INSIST(trust <= dns_trust_ultimate);
|
||||
- remaining.length -= 1;
|
||||
- remaining.base += 1;
|
||||
+ isc_region_consume(&remaining, 1);
|
||||
|
||||
raw = remaining.base;
|
||||
count = raw[0] * 256 + raw[1];
|
||||
Index: bind-9.9.5/lib/dns/openssldh_link.c
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/openssldh_link.c
|
||||
+++ bind-9.9.5/lib/dns/openssldh_link.c
|
||||
@@ -266,8 +266,10 @@ openssldh_destroy(dst_key_t *key) {
|
||||
|
||||
static void
|
||||
uint16_toregion(isc_uint16_t val, isc_region_t *region) {
|
||||
- *region->base++ = (val & 0xff00) >> 8;
|
||||
- *region->base++ = (val & 0x00ff);
|
||||
+ *region->base = (val & 0xff00) >> 8;
|
||||
+ isc_region_consume(region, 1);
|
||||
+ *region->base = (val & 0x00ff);
|
||||
+ isc_region_consume(region, 1);
|
||||
}
|
||||
|
||||
static isc_uint16_t
|
||||
@@ -278,7 +280,8 @@ uint16_fromregion(isc_region_t *region)
|
||||
val = ((unsigned int)(cp[0])) << 8;
|
||||
val |= ((unsigned int)(cp[1]));
|
||||
|
||||
- region->base += 2;
|
||||
+ isc_region_consume(region, 2);
|
||||
+
|
||||
return (val);
|
||||
}
|
||||
|
||||
@@ -319,16 +322,16 @@ openssldh_todns(const dst_key_t *key, is
|
||||
}
|
||||
else
|
||||
BN_bn2bin(dh->p, r.base);
|
||||
- r.base += plen;
|
||||
+ isc_region_consume(&r, plen);
|
||||
|
||||
uint16_toregion(glen, &r);
|
||||
if (glen > 0)
|
||||
BN_bn2bin(dh->g, r.base);
|
||||
- r.base += glen;
|
||||
+ isc_region_consume(&r, glen);
|
||||
|
||||
uint16_toregion(publen, &r);
|
||||
BN_bn2bin(dh->pub_key, r.base);
|
||||
- r.base += publen;
|
||||
+ isc_region_consume(&r, publen);
|
||||
|
||||
isc_buffer_add(data, dnslen);
|
||||
|
||||
@@ -369,10 +372,12 @@ openssldh_fromdns(dst_key_t *key, isc_bu
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
if (plen == 1 || plen == 2) {
|
||||
- if (plen == 1)
|
||||
- special = *r.base++;
|
||||
- else
|
||||
+ if (plen == 1) {
|
||||
+ special = *r.base;
|
||||
+ isc_region_consume(&r, 1);
|
||||
+ } else {
|
||||
special = uint16_fromregion(&r);
|
||||
+ }
|
||||
switch (special) {
|
||||
case 1:
|
||||
dh->p = &bn768;
|
||||
@@ -387,10 +392,9 @@ openssldh_fromdns(dst_key_t *key, isc_bu
|
||||
DH_free(dh);
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
- }
|
||||
- else {
|
||||
+ } else {
|
||||
dh->p = BN_bin2bn(r.base, plen, NULL);
|
||||
- r.base += plen;
|
||||
+ isc_region_consume(&r, plen);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -421,15 +425,14 @@ openssldh_fromdns(dst_key_t *key, isc_bu
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
}
|
||||
- }
|
||||
- else {
|
||||
+ } else {
|
||||
if (glen == 0) {
|
||||
DH_free(dh);
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
dh->g = BN_bin2bn(r.base, glen, NULL);
|
||||
}
|
||||
- r.base += glen;
|
||||
+ isc_region_consume(&r, glen);
|
||||
|
||||
if (r.length < 2) {
|
||||
DH_free(dh);
|
||||
@@ -441,7 +444,7 @@ openssldh_fromdns(dst_key_t *key, isc_bu
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
dh->pub_key = BN_bin2bn(r.base, publen, NULL);
|
||||
- r.base += publen;
|
||||
+ isc_region_consume(&r, publen);
|
||||
|
||||
key->key_size = BN_num_bits(dh->p);
|
||||
|
||||
Index: bind-9.9.5/lib/dns/openssldsa_link.c
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/openssldsa_link.c
|
||||
+++ bind-9.9.5/lib/dns/openssldsa_link.c
|
||||
@@ -29,8 +29,6 @@
|
||||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-/* $Id$ */
|
||||
-
|
||||
#ifdef OPENSSL
|
||||
#ifndef USE_EVP
|
||||
#define USE_EVP 1
|
||||
@@ -137,6 +135,7 @@ openssldsa_sign(dst_context_t *dctx, isc
|
||||
DSA *dsa = key->keydata.dsa;
|
||||
isc_region_t r;
|
||||
DSA_SIG *dsasig;
|
||||
+ unsigned int klen;
|
||||
#if USE_EVP
|
||||
EVP_MD_CTX *evp_md_ctx = dctx->ctxdata.evp_md_ctx;
|
||||
EVP_PKEY *pkey;
|
||||
@@ -188,6 +187,7 @@ openssldsa_sign(dst_context_t *dctx, isc
|
||||
ISC_R_FAILURE));
|
||||
}
|
||||
free(sigbuf);
|
||||
+
|
||||
#elif 0
|
||||
/* Only use EVP for the Digest */
|
||||
if (!EVP_DigestFinal_ex(evp_md_ctx, digest, &siglen)) {
|
||||
@@ -209,11 +209,17 @@ openssldsa_sign(dst_context_t *dctx, isc
|
||||
"DSA_do_sign",
|
||||
DST_R_SIGNFAILURE));
|
||||
#endif
|
||||
- *r.base++ = (key->key_size - 512)/64;
|
||||
+
|
||||
+ klen = (key->key_size - 512)/64;
|
||||
+ if (klen > 255)
|
||||
+ return (ISC_R_FAILURE);
|
||||
+ *r.base = klen;
|
||||
+ isc_region_consume(&r, 1);
|
||||
+
|
||||
BN_bn2bin_fixed(dsasig->r, r.base, ISC_SHA1_DIGESTLENGTH);
|
||||
- r.base += ISC_SHA1_DIGESTLENGTH;
|
||||
+ isc_region_consume(&r, ISC_SHA1_DIGESTLENGTH);
|
||||
BN_bn2bin_fixed(dsasig->s, r.base, ISC_SHA1_DIGESTLENGTH);
|
||||
- r.base += ISC_SHA1_DIGESTLENGTH;
|
||||
+ isc_region_consume(&r, ISC_SHA1_DIGESTLENGTH);
|
||||
DSA_SIG_free(dsasig);
|
||||
isc_buffer_add(sig, ISC_SHA1_DIGESTLENGTH * 2 + 1);
|
||||
|
||||
@@ -446,15 +452,16 @@ openssldsa_todns(const dst_key_t *key, i
|
||||
if (r.length < (unsigned int) dnslen)
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
- *r.base++ = t;
|
||||
+ *r.base = t;
|
||||
+ isc_region_consume(&r, 1);
|
||||
BN_bn2bin_fixed(dsa->q, r.base, ISC_SHA1_DIGESTLENGTH);
|
||||
- r.base += ISC_SHA1_DIGESTLENGTH;
|
||||
+ isc_region_consume(&r, ISC_SHA1_DIGESTLENGTH);
|
||||
BN_bn2bin_fixed(dsa->p, r.base, key->key_size/8);
|
||||
- r.base += p_bytes;
|
||||
+ isc_region_consume(&r, p_bytes);
|
||||
BN_bn2bin_fixed(dsa->g, r.base, key->key_size/8);
|
||||
- r.base += p_bytes;
|
||||
+ isc_region_consume(&r, p_bytes);
|
||||
BN_bn2bin_fixed(dsa->pub_key, r.base, key->key_size/8);
|
||||
- r.base += p_bytes;
|
||||
+ isc_region_consume(&r, p_bytes);
|
||||
|
||||
isc_buffer_add(data, dnslen);
|
||||
|
||||
@@ -479,29 +486,30 @@ openssldsa_fromdns(dst_key_t *key, isc_b
|
||||
return (ISC_R_NOMEMORY);
|
||||
dsa->flags &= ~DSA_FLAG_CACHE_MONT_P;
|
||||
|
||||
- t = (unsigned int) *r.base++;
|
||||
+ t = (unsigned int) *r.base;
|
||||
+ isc_region_consume(&r, 1);
|
||||
if (t > 8) {
|
||||
DSA_free(dsa);
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
p_bytes = 64 + 8 * t;
|
||||
|
||||
- if (r.length < 1 + ISC_SHA1_DIGESTLENGTH + 3 * p_bytes) {
|
||||
+ if (r.length < ISC_SHA1_DIGESTLENGTH + 3 * p_bytes) {
|
||||
DSA_free(dsa);
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
|
||||
dsa->q = BN_bin2bn(r.base, ISC_SHA1_DIGESTLENGTH, NULL);
|
||||
- r.base += ISC_SHA1_DIGESTLENGTH;
|
||||
+ isc_region_consume(&r, ISC_SHA1_DIGESTLENGTH);
|
||||
|
||||
dsa->p = BN_bin2bn(r.base, p_bytes, NULL);
|
||||
- r.base += p_bytes;
|
||||
+ isc_region_consume(&r, p_bytes);
|
||||
|
||||
dsa->g = BN_bin2bn(r.base, p_bytes, NULL);
|
||||
- r.base += p_bytes;
|
||||
+ isc_region_consume(&r, p_bytes);
|
||||
|
||||
dsa->pub_key = BN_bin2bn(r.base, p_bytes, NULL);
|
||||
- r.base += p_bytes;
|
||||
+ isc_region_consume(&r, p_bytes);
|
||||
|
||||
key->key_size = p_bytes * 8;
|
||||
|
||||
Index: bind-9.9.5/lib/dns/opensslecdsa_link.c
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/opensslecdsa_link.c
|
||||
+++ bind-9.9.5/lib/dns/opensslecdsa_link.c
|
||||
@@ -14,8 +14,6 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-/* $Id$ */
|
||||
-
|
||||
#include <config.h>
|
||||
|
||||
#ifdef HAVE_OPENSSL_ECDSA
|
||||
@@ -159,9 +157,9 @@ opensslecdsa_sign(dst_context_t *dctx, i
|
||||
"ECDSA_do_sign",
|
||||
DST_R_SIGNFAILURE));
|
||||
BN_bn2bin_fixed(ecdsasig->r, r.base, siglen / 2);
|
||||
- r.base += siglen / 2;
|
||||
+ isc_region_consume(&r, siglen / 2);
|
||||
BN_bn2bin_fixed(ecdsasig->s, r.base, siglen / 2);
|
||||
- r.base += siglen / 2;
|
||||
+ isc_region_consume(&r, siglen / 2);
|
||||
ECDSA_SIG_free(ecdsasig);
|
||||
isc_buffer_add(sig, siglen);
|
||||
ret = ISC_R_SUCCESS;
|
||||
Index: bind-9.9.5/lib/dns/opensslrsa_link.c
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/opensslrsa_link.c
|
||||
+++ bind-9.9.5/lib/dns/opensslrsa_link.c
|
||||
@@ -965,6 +965,7 @@ opensslrsa_fromdns(dst_key_t *key, isc_b
|
||||
RSA *rsa;
|
||||
isc_region_t r;
|
||||
unsigned int e_bytes;
|
||||
+ unsigned int length;
|
||||
#if USE_EVP
|
||||
EVP_PKEY *pkey;
|
||||
#endif
|
||||
@@ -972,6 +973,7 @@ opensslrsa_fromdns(dst_key_t *key, isc_b
|
||||
isc_buffer_remainingregion(data, &r);
|
||||
if (r.length == 0)
|
||||
return (ISC_R_SUCCESS);
|
||||
+ length = r.length;
|
||||
|
||||
rsa = RSA_new();
|
||||
if (rsa == NULL)
|
||||
@@ -982,17 +984,18 @@ opensslrsa_fromdns(dst_key_t *key, isc_b
|
||||
RSA_free(rsa);
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
- e_bytes = *r.base++;
|
||||
- r.length--;
|
||||
+ e_bytes = *r.base;
|
||||
+ isc_region_consume(&r, 1);
|
||||
|
||||
if (e_bytes == 0) {
|
||||
if (r.length < 2) {
|
||||
RSA_free(rsa);
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
- e_bytes = ((*r.base++) << 8);
|
||||
- e_bytes += *r.base++;
|
||||
- r.length -= 2;
|
||||
+ e_bytes = (*r.base) << 8;
|
||||
+ isc_region_consume(&r, 1);
|
||||
+ e_bytes += *r.base;
|
||||
+ isc_region_consume(&r, 1);
|
||||
}
|
||||
|
||||
if (r.length < e_bytes) {
|
||||
@@ -1000,14 +1003,13 @@ opensslrsa_fromdns(dst_key_t *key, isc_b
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
}
|
||||
rsa->e = BN_bin2bn(r.base, e_bytes, NULL);
|
||||
- r.base += e_bytes;
|
||||
- r.length -= e_bytes;
|
||||
+ isc_region_consume(&r, e_bytes);
|
||||
|
||||
rsa->n = BN_bin2bn(r.base, r.length, NULL);
|
||||
|
||||
key->key_size = BN_num_bits(rsa->n);
|
||||
|
||||
- isc_buffer_forward(data, r.length);
|
||||
+ isc_buffer_forward(data, length);
|
||||
|
||||
#if USE_EVP
|
||||
pkey = EVP_PKEY_new();
|
||||
Index: bind-9.9.5/lib/dns/resolver.c
|
||||
===================================================================
|
||||
--- bind-9.9.5.orig/lib/dns/resolver.c
|
||||
+++ bind-9.9.5/lib/dns/resolver.c
|
||||
@@ -8937,6 +8937,12 @@ dns_resolver_algorithm_supported(dns_res
|
||||
|
||||
REQUIRE(VALID_RESOLVER(resolver));
|
||||
|
||||
+ /*
|
||||
+ * DH is unsupported for DNSKEYs, see RFC 4034 sec. A.1.
|
||||
+ */
|
||||
+ if ((alg == DST_ALG_DH) || (alg == DST_ALG_INDIRECT))
|
||||
+ return (ISC_FALSE);
|
||||
+
|
||||
#if USE_ALGLOCK
|
||||
RWLOCK(&resolver->alglock, isc_rwlocktype_read);
|
||||
#endif
|
||||
@@ -8956,6 +8962,7 @@ dns_resolver_algorithm_supported(dns_res
|
||||
#endif
|
||||
if (found)
|
||||
return (ISC_FALSE);
|
||||
+
|
||||
return (dst_algorithm_supported(alg));
|
||||
}
|
||||
|
||||
194
meta/recipes-connectivity/bind/bind/CVE-2015-8000.patch
Normal file
194
meta/recipes-connectivity/bind/bind/CVE-2015-8000.patch
Normal file
@@ -0,0 +1,194 @@
|
||||
responses with a malformed class attribute can trigger an
|
||||
assertion failure in db.c
|
||||
|
||||
[security]
|
||||
Insufficient testing when parsing a message allowed records with
|
||||
an incorrect class to be be accepted, triggering a REQUIRE failure
|
||||
when those records were subsequently cached. (CVE-2015-8000) [RT#4098]
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
[The patch is taken from BIND 9.9.4:
|
||||
https://bugzilla.redhat.com/attachment.cgi?id=1105581]
|
||||
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
---
|
||||
diff --git a/lib/dns/include/dns/message.h b/lib/dns/include/dns/message.h
|
||||
index a6862fa..d999e75 100644
|
||||
--- a/lib/dns/include/dns/message.h
|
||||
+++ b/lib/dns/include/dns/message.h
|
||||
@@ -210,6 +210,8 @@ struct dns_message {
|
||||
unsigned int verify_attempted : 1;
|
||||
unsigned int free_query : 1;
|
||||
unsigned int free_saved : 1;
|
||||
+ unsigned int tkey : 1;
|
||||
+ unsigned int rdclass_set : 1;
|
||||
|
||||
unsigned int opt_reserved;
|
||||
unsigned int sig_reserved;
|
||||
@@ -1374,6 +1376,15 @@ dns_message_buildopt(dns_message_t *msg, dns_rdataset_t **opt,
|
||||
* \li other.
|
||||
*/
|
||||
|
||||
+void
|
||||
+dns_message_setclass(dns_message_t *msg, dns_rdataclass_t rdclass);
|
||||
+/*%<
|
||||
+ * Set the expected class of records in the response.
|
||||
+ *
|
||||
+ * Requires:
|
||||
+ * \li msg be a valid message with parsing intent.
|
||||
+ */
|
||||
+
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_MESSAGE_H */
|
||||
diff --git a/lib/dns/message.c b/lib/dns/message.c
|
||||
index 53efc5a..73def73 100644
|
||||
--- a/lib/dns/message.c
|
||||
+++ b/lib/dns/message.c
|
||||
@@ -436,6 +436,8 @@ msginit(dns_message_t *m) {
|
||||
m->saved.base = NULL;
|
||||
m->saved.length = 0;
|
||||
m->free_saved = 0;
|
||||
+ m->tkey = 0;
|
||||
+ m->rdclass_set = 0;
|
||||
m->querytsig = NULL;
|
||||
}
|
||||
|
||||
@@ -1086,13 +1088,19 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
||||
* If this class is different than the one we already read,
|
||||
* this is an error.
|
||||
*/
|
||||
- if (msg->state == DNS_SECTION_ANY) {
|
||||
- msg->state = DNS_SECTION_QUESTION;
|
||||
+ if (msg->rdclass_set == 0) {
|
||||
msg->rdclass = rdclass;
|
||||
+ msg->rdclass_set = 1;
|
||||
} else if (msg->rdclass != rdclass)
|
||||
DO_FORMERR;
|
||||
|
||||
/*
|
||||
+ * Is this a TKEY query?
|
||||
+ */
|
||||
+ if (rdtype == dns_rdatatype_tkey)
|
||||
+ msg->tkey = 1;
|
||||
+
|
||||
+ /*
|
||||
* Can't ask the same question twice.
|
||||
*/
|
||||
result = dns_message_find(name, rdclass, rdtype, 0, NULL);
|
||||
@@ -1236,12 +1244,12 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
||||
* If there was no question section, we may not yet have
|
||||
* established a class. Do so now.
|
||||
*/
|
||||
- if (msg->state == DNS_SECTION_ANY &&
|
||||
+ if (msg->rdclass_set == 0 &&
|
||||
rdtype != dns_rdatatype_opt && /* class is UDP SIZE */
|
||||
rdtype != dns_rdatatype_tsig && /* class is ANY */
|
||||
rdtype != dns_rdatatype_tkey) { /* class is undefined */
|
||||
msg->rdclass = rdclass;
|
||||
- msg->state = DNS_SECTION_QUESTION;
|
||||
+ msg->rdclass_set = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1251,7 +1259,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
||||
if (msg->opcode != dns_opcode_update
|
||||
&& rdtype != dns_rdatatype_tsig
|
||||
&& rdtype != dns_rdatatype_opt
|
||||
- && rdtype != dns_rdatatype_dnskey /* in a TKEY query */
|
||||
+ && rdtype != dns_rdatatype_key /* in a TKEY query */
|
||||
&& rdtype != dns_rdatatype_sig /* SIG(0) */
|
||||
&& rdtype != dns_rdatatype_tkey /* Win2000 TKEY */
|
||||
&& msg->rdclass != dns_rdataclass_any
|
||||
@@ -1259,6 +1267,16 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
||||
DO_FORMERR;
|
||||
|
||||
/*
|
||||
+ * If this is not a TKEY query/response then the KEY
|
||||
+ * record's class needs to match.
|
||||
+ */
|
||||
+ if (msg->opcode != dns_opcode_update && !msg->tkey &&
|
||||
+ rdtype == dns_rdatatype_key &&
|
||||
+ msg->rdclass != dns_rdataclass_any &&
|
||||
+ msg->rdclass != rdclass)
|
||||
+ DO_FORMERR;
|
||||
+
|
||||
+ /*
|
||||
* Special type handling for TSIG, OPT, and TKEY.
|
||||
*/
|
||||
if (rdtype == dns_rdatatype_tsig) {
|
||||
@@ -1372,6 +1390,10 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
||||
skip_name_search = ISC_TRUE;
|
||||
skip_type_search = ISC_TRUE;
|
||||
issigzero = ISC_TRUE;
|
||||
+ } else {
|
||||
+ if (msg->rdclass != dns_rdataclass_any &&
|
||||
+ msg->rdclass != rdclass)
|
||||
+ DO_FORMERR;
|
||||
}
|
||||
} else
|
||||
covers = 0;
|
||||
@@ -1610,6 +1632,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
|
||||
msg->counts[DNS_SECTION_ADDITIONAL] = isc_buffer_getuint16(source);
|
||||
|
||||
msg->header_ok = 1;
|
||||
+ msg->state = DNS_SECTION_QUESTION;
|
||||
|
||||
/*
|
||||
* -1 means no EDNS.
|
||||
@@ -3550,3 +3573,15 @@ dns_message_buildopt(dns_message_t *message, dns_rdataset_t **rdatasetp,
|
||||
dns_message_puttemprdatalist(message, &rdatalist);
|
||||
return (result);
|
||||
}
|
||||
+
|
||||
+void
|
||||
+dns_message_setclass(dns_message_t *msg, dns_rdataclass_t rdclass) {
|
||||
+
|
||||
+ REQUIRE(DNS_MESSAGE_VALID(msg));
|
||||
+ REQUIRE(msg->from_to_wire == DNS_MESSAGE_INTENTPARSE);
|
||||
+ REQUIRE(msg->state == DNS_SECTION_ANY);
|
||||
+ REQUIRE(msg->rdclass_set == 0);
|
||||
+
|
||||
+ msg->rdclass = rdclass;
|
||||
+ msg->rdclass_set = 1;
|
||||
+}
|
||||
diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
|
||||
index aa23b11..d220986 100644
|
||||
--- a/lib/dns/resolver.c
|
||||
+++ b/lib/dns/resolver.c
|
||||
@@ -6964,6 +6964,8 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
+ dns_message_setclass(message, fctx->res->rdclass);
|
||||
+
|
||||
result = dns_message_parse(message, &devent->buffer, 0);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
switch (result) {
|
||||
@@ -7036,6 +7038,12 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
|
||||
*/
|
||||
log_packet(message, ISC_LOG_DEBUG(10), fctx->res->mctx);
|
||||
|
||||
+ if (message->rdclass != fctx->res->rdclass) {
|
||||
+ resend = ISC_TRUE;
|
||||
+ FCTXTRACE("bad class");
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Process receive opt record.
|
||||
*/
|
||||
diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c
|
||||
index 9ad8960..938373a 100644
|
||||
--- a/lib/dns/xfrin.c
|
||||
+++ b/lib/dns/xfrin.c
|
||||
@@ -1241,6 +1241,8 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
|
||||
msg->tsigctx = xfr->tsigctx;
|
||||
xfr->tsigctx = NULL;
|
||||
|
||||
+ dns_message_setclass(msg, xfr->rdclass);
|
||||
+
|
||||
if (xfr->nmsg > 0)
|
||||
msg->tcp_continuation = 1;
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From dbb064aa7972ef918d9a235b713108a4846cbb62 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Andrews <marka@isc.org>
|
||||
Date: Tue, 14 Jul 2015 14:48:42 +1000
|
||||
Subject: [PATCH] 4165. [bug] An failure to reset a value to NULL
|
||||
in tkey.c could result in an assertion failure.
|
||||
(CVE-2015-5477) [RT #40046]
|
||||
|
||||
Upstream-Status: Backport
|
||||
[CHANGES file has been edited manually to add CVE-2015-5477 and
|
||||
an already applied CVE (CVE-2014-8500)].
|
||||
|
||||
Referenc: https://kb.isc.org/article/AA-01272
|
||||
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
|
||||
diff -ruN a/CHANGES b/CHANGES
|
||||
--- a/CHANGES 2014-01-27 19:58:24.000000000 +0100
|
||||
+++ b/CHANGES 2015-07-30 11:03:18.871670769 +0200
|
||||
@@ -1,4 +1,15 @@
|
||||
--- 9.9.5 released ---
|
||||
+4165. [security] An failure to reset a value to NULL in tkey.c could
|
||||
+ result in an assertion failure. (CVE-2015-5477)
|
||||
+ [RT #40046]
|
||||
+
|
||||
+4006. [security] A flaw in delegation handling could be exploited
|
||||
+ to put named into an infinite loop. This has
|
||||
+ been addressed by placing limits on the number
|
||||
+ of levels of recursion named will allow (default 7),
|
||||
+ and the number of iterative queries that it will
|
||||
+ send (default 50) before terminating a recursive
|
||||
+ query (CVE-2014-8500).
|
||||
|
||||
--- 9.9.5rc2 released ---
|
||||
|
||||
diff -ruN a/lib/dns/tkey.c b/lib/dns/tkey.c
|
||||
--- a/lib/dns/tkey.c 2014-01-27 19:58:24.000000000 +0100
|
||||
+++ b/lib/dns/tkey.c 2015-07-30 10:58:30.647945942 +0200
|
||||
@@ -650,6 +650,7 @@
|
||||
* Try the answer section, since that's where Win2000
|
||||
* puts it.
|
||||
*/
|
||||
+ name = NULL;
|
||||
if (dns_message_findname(msg, DNS_SECTION_ANSWER, qname,
|
||||
dns_rdatatype_tkey, 0, &name,
|
||||
&tkeyset) != ISC_R_SUCCESS) {
|
||||
@@ -18,6 +18,11 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
|
||||
file://bind9 \
|
||||
file://init.d-add-support-for-read-only-rootfs.patch \
|
||||
file://bind9_9_5-CVE-2014-8500.patch \
|
||||
file://bind9_9_5-CVE-2015-5477.patch \
|
||||
file://CVE-2015-1349.patch \
|
||||
file://CVE-2015-4620.patch \
|
||||
file://CVE-2015-5722.patch \
|
||||
file://CVE-2015-8000.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "e676c65cad5234617ee22f48e328c24e"
|
||||
|
||||
@@ -4,9 +4,9 @@ network interface for a qemu machine."
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
|
||||
|
||||
SRC_URI_append_qemuall = "file://wired.config \
|
||||
file://wired-setup \
|
||||
"
|
||||
SRC_URI_append_qemuall = " file://wired.config \
|
||||
file://wired-setup \
|
||||
"
|
||||
PR = "r2"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
@@ -21,7 +21,7 @@ do_install() {
|
||||
do_install_append() {
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/init.d/
|
||||
sed "s:@installpath@:${libexecdir}:" ${WORKDIR}/neard.in \
|
||||
sed "s:@installpath@:${libexecdir}/nfc:" ${WORKDIR}/neard.in \
|
||||
> ${D}${sysconfdir}/init.d/neard
|
||||
chmod 0755 ${D}${sysconfdir}/init.d/neard
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
CVE-2015-6563
|
||||
|
||||
Don't resend username to PAM; it already has it.
|
||||
Pointed out by Moritz Jodeit; ok dtucker@
|
||||
|
||||
Upstream-Status: Backport
|
||||
https://github.com/openssh/openssh-portable/commit/d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
Index: openssh-6.7p1/monitor.c
|
||||
===================================================================
|
||||
--- openssh-6.7p1.orig/monitor.c
|
||||
+++ openssh-6.7p1/monitor.c
|
||||
@@ -1046,9 +1046,7 @@ extern KbdintDevice sshpam_device;
|
||||
int
|
||||
mm_answer_pam_init_ctx(int sock, Buffer *m)
|
||||
{
|
||||
-
|
||||
debug3("%s", __func__);
|
||||
- authctxt->user = buffer_get_string(m, NULL);
|
||||
sshpam_ctxt = (sshpam_device.init_ctx)(authctxt);
|
||||
sshpam_authok = NULL;
|
||||
buffer_clear(m);
|
||||
Index: openssh-6.7p1/monitor_wrap.c
|
||||
===================================================================
|
||||
--- openssh-6.7p1.orig/monitor_wrap.c
|
||||
+++ openssh-6.7p1/monitor_wrap.c
|
||||
@@ -826,7 +826,6 @@ mm_sshpam_init_ctx(Authctxt *authctxt)
|
||||
|
||||
debug3("%s", __func__);
|
||||
buffer_init(&m);
|
||||
- buffer_put_cstring(&m, authctxt->user);
|
||||
mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_INIT_CTX, &m);
|
||||
debug3("%s: waiting for MONITOR_ANS_PAM_INIT_CTX", __func__);
|
||||
mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_INIT_CTX, &m);
|
||||
@@ -0,0 +1,34 @@
|
||||
CVE-2015-6564
|
||||
|
||||
set sshpam_ctxt to NULL after free
|
||||
|
||||
Avoids use-after-free in monitor when privsep child is compromised.
|
||||
Reported by Moritz Jodeit; ok dtucker@
|
||||
|
||||
Upstream-Status: Backport
|
||||
https://github.com/openssh/openssh-portable/commit/5e75f5198769056089fb06c4d738ab0e5abc66f7
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
Index: openssh-6.7p1/monitor.c
|
||||
===================================================================
|
||||
--- openssh-6.7p1.orig/monitor.c
|
||||
+++ openssh-6.7p1/monitor.c
|
||||
@@ -1128,14 +1128,16 @@ mm_answer_pam_respond(int sock, Buffer *
|
||||
int
|
||||
mm_answer_pam_free_ctx(int sock, Buffer *m)
|
||||
{
|
||||
+ int r = sshpam_authok != NULL && sshpam_authok == sshpam_ctxt;
|
||||
|
||||
debug3("%s", __func__);
|
||||
(sshpam_device.free_ctx)(sshpam_ctxt);
|
||||
+ sshpam_ctxt = sshpam_authok = NULL;
|
||||
buffer_clear(m);
|
||||
mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m);
|
||||
auth_method = "keyboard-interactive";
|
||||
auth_submethod = "pam";
|
||||
- return (sshpam_authok == sshpam_ctxt);
|
||||
+ return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
CVE-2015-6565 openssh: Incorrectly set TTYs to be world-writable
|
||||
|
||||
fix pty permissions; patch from Nikolay Edigaryev; ok deraadt
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
merged two changes into one.
|
||||
[1] https://anongit.mindrot.org/openssh.git/commit/sshpty.c?id=a5883d4eccb94b16c355987f58f86a7dee17a0c2
|
||||
tighten permissions on pty when the "tty" group does not exist; pointed out by Corinna Vinschen; ok markus
|
||||
|
||||
[2] https://anongit.mindrot.org/openssh.git/commit/sshpty.c?id=6f941396b6835ad18018845f515b0c4fe20be21a
|
||||
fix pty permissions; patch from Nikolay Edigaryev; ok deraadt
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
Index: openssh-6.7p1/sshpty.c
|
||||
===================================================================
|
||||
--- openssh-6.7p1.orig/sshpty.c
|
||||
+++ openssh-6.7p1/sshpty.c
|
||||
@@ -196,13 +196,8 @@ pty_setowner(struct passwd *pw, const ch
|
||||
|
||||
/* Determine the group to make the owner of the tty. */
|
||||
grp = getgrnam("tty");
|
||||
- if (grp) {
|
||||
- gid = grp->gr_gid;
|
||||
- mode = S_IRUSR | S_IWUSR | S_IWGRP;
|
||||
- } else {
|
||||
- gid = pw->pw_gid;
|
||||
- mode = S_IRUSR | S_IWUSR | S_IWGRP | S_IWOTH;
|
||||
- }
|
||||
+ gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid;
|
||||
+ mode = (grp != NULL) ? 0620 : 0600;
|
||||
|
||||
/*
|
||||
* Change owner and mode of the tty as required.
|
||||
@@ -25,7 +25,10 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.
|
||||
file://run-ptest \
|
||||
file://openssh-CVE-2014-2532.patch \
|
||||
file://openssh-CVE-2014-2653.patch \
|
||||
file://auth2-none.c-avoid-authenticate-empty-passwords-to-m.patch"
|
||||
file://CVE-2015-6563.patch \
|
||||
file://CVE-2015-6564.patch \
|
||||
file://CVE-2015-6565.patch \
|
||||
"
|
||||
|
||||
PAM_SRC_URI = "file://sshd"
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From d8541d7e9e63bf5f343af24644046c8d96498c17 Mon Sep 17 00:00:00 2001
|
||||
From: "Dr. Stephen Henson" <steve@openssl.org>
|
||||
Date: Fri, 2 Oct 2015 13:10:29 +0100
|
||||
Subject:Add PSS parameter check.
|
||||
|
||||
Avoid seg fault by checking mgf1 parameter is not NULL. This can be
|
||||
triggered during certificate verification so could be a DoS attack
|
||||
against a client or a server enabling client authentication.
|
||||
|
||||
Thanks to Loïc Jonas Etienne (Qnective AG) for discovering this bug.
|
||||
|
||||
CVE-2015-3194
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Reviewed-by: Matt Caswell <matt@openssl.org>
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
---
|
||||
crypto/rsa/rsa_ameth.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c
|
||||
index 93e071d..c7f1148 100644
|
||||
--- a/crypto/rsa/rsa_ameth.c
|
||||
+++ b/crypto/rsa/rsa_ameth.c
|
||||
@@ -279,7 +279,7 @@ static RSA_PSS_PARAMS *rsa_pss_decode(const X509_ALGOR *alg,
|
||||
if (pss->maskGenAlgorithm) {
|
||||
ASN1_TYPE *param = pss->maskGenAlgorithm->parameter;
|
||||
if (OBJ_obj2nid(pss->maskGenAlgorithm->algorithm) == NID_mgf1
|
||||
- && param->type == V_ASN1_SEQUENCE) {
|
||||
+ && param && param->type == V_ASN1_SEQUENCE) {
|
||||
p = param->value.sequence->data;
|
||||
plen = param->value.sequence->length;
|
||||
*pmaskHash = d2i_X509_ALGOR(NULL, &p, plen);
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
commit b29ffa392e839d05171206523e84909146f7a77c
|
||||
Author: Dr. Stephen Henson <steve@openssl.org>
|
||||
Date: Tue, 10 Nov 2015 19:03:07 +0000
|
||||
Subject: Fix leak with ASN.1 combine.
|
||||
|
||||
When parsing a combined structure pass a flag to the decode routine
|
||||
so on error a pointer to the parent structure is not zeroed as
|
||||
this will leak any additional components in the parent.
|
||||
|
||||
This can leak memory in any application parsing PKCS#7 or CMS structures.
|
||||
|
||||
CVE-2015-3195.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using
|
||||
libFuzzer.
|
||||
|
||||
PR#4131
|
||||
|
||||
Reviewed-by: Richard Levitte <levitte@openssl.org>
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
---
|
||||
crypto/asn1/tasn_dec.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c
|
||||
index febf605..9256049 100644
|
||||
--- a/crypto/asn1/tasn_dec.c
|
||||
+++ b/crypto/asn1/tasn_dec.c
|
||||
@@ -180,6 +180,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
||||
int otag;
|
||||
int ret = 0;
|
||||
ASN1_VALUE **pchptr, *ptmpval;
|
||||
+ int combine = aclass & ASN1_TFLG_COMBINE;
|
||||
+ aclass &= ~ASN1_TFLG_COMBINE;
|
||||
if (!pval)
|
||||
return 0;
|
||||
if (aux && aux->asn1_cb)
|
||||
@@ -500,7 +502,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
||||
auxerr:
|
||||
ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_AUX_ERROR);
|
||||
err:
|
||||
- ASN1_item_ex_free(pval, it);
|
||||
+ if (combine == 0)
|
||||
+ ASN1_item_ex_free(pval, it);
|
||||
if (errtt)
|
||||
ERR_add_error_data(4, "Field=", errtt->field_name,
|
||||
", Type=", it->sname);
|
||||
@@ -689,7 +692,7 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
|
||||
} else {
|
||||
/* Nothing special */
|
||||
ret = ASN1_item_ex_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item),
|
||||
- -1, 0, opt, ctx);
|
||||
+ -1, tt->flags & ASN1_TFLG_COMBINE, opt, ctx);
|
||||
if (!ret) {
|
||||
ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, ERR_R_NESTED_ASN1_ERROR);
|
||||
goto err;
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
From aabfb6f78af8e337d3239142117ba303fce55e7e Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||
Date: Thu, 22 Sep 2011 08:55:26 +0200
|
||||
Subject: [PATCH] fix the parallel build regarding shared libraries.
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
.../openssl-1.0.0e/Makefile.org | 8 ++++----
|
||||
1 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile.org
|
||||
index 3c7aea1..6326cd6 100644
|
||||
--- a/Makefile.org
|
||||
+++ b/Makefile.org
|
||||
@@ -243,13 +243,13 @@ build_libs: build_crypto build_ssl build_engines
|
||||
|
||||
build_crypto:
|
||||
@dir=crypto; target=all; $(BUILD_ONE_CMD)
|
||||
-build_ssl:
|
||||
+build_ssl: build_crypto
|
||||
@dir=ssl; target=all; $(BUILD_ONE_CMD)
|
||||
-build_engines:
|
||||
+build_engines: build_crypto
|
||||
@dir=engines; target=all; $(BUILD_ONE_CMD)
|
||||
-build_apps:
|
||||
+build_apps: build_crypto build_ssl
|
||||
@dir=apps; target=all; $(BUILD_ONE_CMD)
|
||||
-build_tests:
|
||||
+build_tests: build_crypto build_ssl
|
||||
@dir=test; target=all; $(BUILD_ONE_CMD)
|
||||
build_tools:
|
||||
@dir=tools; target=all; $(BUILD_ONE_CMD)
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -15,7 +15,6 @@ SRC_URI += "file://configure-targets.patch \
|
||||
file://shared-libs.patch \
|
||||
file://oe-ldflags.patch \
|
||||
file://engines-install-in-libdir-ssl.patch \
|
||||
file://openssl-fix-link.patch \
|
||||
file://debian/version-script.patch \
|
||||
file://debian/pic.patch \
|
||||
file://debian/c_rehash-compat.patch \
|
||||
@@ -35,10 +34,12 @@ SRC_URI += "file://configure-targets.patch \
|
||||
file://Makefiles-ptest.patch \
|
||||
file://ptest-deps.patch \
|
||||
file://run-ptest \
|
||||
file://CVE-2015-3194-Add-PSS-parameter-check.patch \
|
||||
file://CVE-2015-3195-Fix-leak-with-ASN.1-combine.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "d143d1555d842a069cb7cc34ba745a06"
|
||||
SRC_URI[sha256sum] = "095f0b7b09116c0c5526422088058dc7e6e000aa14d22acca6a4e2babcdfef74"
|
||||
SRC_URI[md5sum] = "7563e92327199e0067ccd0f79f436976"
|
||||
SRC_URI[sha256sum] = "bd5ee6803165c0fb60bbecbacacf244f1f90d2aa0d71353af610c29121e9b2f1"
|
||||
|
||||
PACKAGES =+ " \
|
||||
${PN}-engines \
|
||||
29
meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch
Normal file
29
meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
ppp: Buffer overflow in radius plugin
|
||||
|
||||
From: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=782450
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
On systems with more than 65535 processes running, pppd aborts when
|
||||
sending a "start" accounting message to the RADIUS server because of a
|
||||
buffer overflow in rc_mksid.
|
||||
|
||||
The process id is used in rc_mksid to generate a pseudo-unique string,
|
||||
assuming that the hex representation of the pid will be at most 4
|
||||
characters (FFFF). __sprintf_chk(), used when compiling with
|
||||
optimization levels greater than 0 and FORTIFY_SOURCE, detects the
|
||||
buffer overflow and makes pppd crash.
|
||||
|
||||
The following patch fixes the problem.
|
||||
|
||||
--- ppp-2.4.6.orig/pppd/plugins/radius/util.c
|
||||
+++ ppp-2.4.6/pppd/plugins/radius/util.c
|
||||
@@ -77,7 +77,7 @@ rc_mksid (void)
|
||||
static unsigned short int cnt = 0;
|
||||
sprintf (buf, "%08lX%04X%02hX",
|
||||
(unsigned long int) time (NULL),
|
||||
- (unsigned int) getpid (),
|
||||
+ (unsigned int) getpid () % 65535,
|
||||
cnt & 0xFF);
|
||||
cnt++;
|
||||
return buf;
|
||||
@@ -29,6 +29,7 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
|
||||
file://provider \
|
||||
file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
|
||||
file://ppp@.service \
|
||||
file://fix-CVE-2015-3310.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "3434d2cc9327167a0723aaaa8670083b"
|
||||
|
||||
@@ -17,6 +17,7 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
|
||||
file://dbus-1.init \
|
||||
file://os-test.patch \
|
||||
file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
|
||||
file://CVE-2015-0245-prevent-forged-ActivationFailure.patch \
|
||||
"
|
||||
|
||||
inherit useradd autotools pkgconfig gettext update-rc.d
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
CVE-2015-0245: prevent forged ActivationFailure from non-root processes
|
||||
|
||||
Upstream has fixed this in code but suggests using this as a easily
|
||||
backportable fix: https://bugs.freedesktop.org/show_bug.cgi?id=88811
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
||||
|
||||
|
||||
|
||||
From 91eb2ea3362630190e08c1c777c47bae065ac828 Mon Sep 17 00:00:00 2001
|
||||
From: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
||||
Date: Mon, 26 Jan 2015 20:09:56 +0000
|
||||
Subject: [PATCH 1/3] CVE-2015-0245: prevent forged ActivationFailure from
|
||||
non-root processes
|
||||
|
||||
Without either this rule or better checking in dbus-daemon, non-systemd
|
||||
processes can make dbus-daemon think systemd failed to activate a system
|
||||
service, resulting in an error reply back to the requester.
|
||||
|
||||
This is redundant with the fix in the C code (which I consider to be
|
||||
the real solution), but is likely to be easier to backport.
|
||||
---
|
||||
bus/system.conf.in | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/bus/system.conf.in b/bus/system.conf.in
|
||||
index 92f4cc4..851b9e6 100644
|
||||
--- a/bus/system.conf.in
|
||||
+++ b/bus/system.conf.in
|
||||
@@ -68,6 +68,14 @@
|
||||
<deny send_destination="org.freedesktop.DBus"
|
||||
send_interface="org.freedesktop.DBus"
|
||||
send_member="UpdateActivationEnvironment"/>
|
||||
+ <deny send_destination="org.freedesktop.DBus"
|
||||
+ send_interface="org.freedesktop.systemd1.Activator"/>
|
||||
+ </policy>
|
||||
+
|
||||
+ <!-- Only systemd, which runs as root, may report activation failures. -->
|
||||
+ <policy user="root">
|
||||
+ <allow send_destination="org.freedesktop.DBus"
|
||||
+ send_interface="org.freedesktop.systemd1.Activator"/>
|
||||
</policy>
|
||||
|
||||
<!-- Config files are placed here that among other things, punch
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -39,7 +39,7 @@ SRCREV_localedef = "c833367348d39dad7ba018990bfdaffaec8e9ed3"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
EXTRA_OECONF = "--with-glibc=${S}"
|
||||
CFLAGS += "-DNOT_IN_libc=1"
|
||||
CFLAGS += "-fgnu89-inline -std=gnu99 -DNOT_IN_libc=1"
|
||||
|
||||
do_configure () {
|
||||
${S}/localedef/configure ${EXTRA_OECONF}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
CVE-2015-1472: wscanf allocates too little memory
|
||||
|
||||
BZ #16618
|
||||
|
||||
Under certain conditions wscanf can allocate too little memory for the
|
||||
to-be-scanned arguments and overflow the allocated buffer. The
|
||||
implementation now correctly computes the required buffer size when
|
||||
using malloc.
|
||||
|
||||
A regression test was added to tst-sscanf.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
The patch is from (Paul Pluzhnikov <ppluzhnikov@google.com>):
|
||||
[https://sourceware.org/git/?p=glibc.git;a=patch;h=5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06]
|
||||
|
||||
diff -ruN a/ChangeLog b/ChangeLog
|
||||
--- a/ChangeLog 2015-09-22 10:20:14.399408389 +0200
|
||||
+++ b/ChangeLog 2015-09-22 10:33:07.374388595 +0200
|
||||
@@ -1,3 +1,12 @@
|
||||
+2015-02-05 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
+
|
||||
+ [BZ #16618] CVE-2015-1472
|
||||
+ * stdio-common/tst-sscanf.c (main): Test for buffer overflow.
|
||||
+ * stdio-common/vfscanf.c (_IO_vfscanf_internal): Compute needed
|
||||
+ size in bytes. Store needed elements in wpmax. Use needed size
|
||||
+ in bytes for extend_alloca.
|
||||
+
|
||||
+
|
||||
2014-12-16 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
[BZ #17630]
|
||||
diff -ruN a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c
|
||||
--- a/stdio-common/tst-sscanf.c 2015-09-22 10:20:09.995596201 +0200
|
||||
+++ b/stdio-common/tst-sscanf.c 2015-09-22 10:21:39.211791399 +0200
|
||||
@@ -233,5 +233,38 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ /* BZ #16618
|
||||
+ The test will segfault during SSCANF if the buffer overflow
|
||||
+ is not fixed. The size of `s` is such that it forces the use
|
||||
+ of malloc internally and this triggers the incorrect computation.
|
||||
+ Thus the value for SIZE is arbitrariy high enough that malloc
|
||||
+ is used. */
|
||||
+ {
|
||||
+#define SIZE 131072
|
||||
+ CHAR *s = malloc ((SIZE + 1) * sizeof (*s));
|
||||
+ if (s == NULL)
|
||||
+ abort ();
|
||||
+ for (size_t i = 0; i < SIZE; i++)
|
||||
+ s[i] = L('0');
|
||||
+ s[SIZE] = L('\0');
|
||||
+ int i = 42;
|
||||
+ /* Scan multi-digit zero into `i`. */
|
||||
+ if (SSCANF (s, L("%d"), &i) != 1)
|
||||
+ {
|
||||
+ printf ("FAIL: bug16618: SSCANF did not read one input item.\n");
|
||||
+ result = 1;
|
||||
+ }
|
||||
+ if (i != 0)
|
||||
+ {
|
||||
+ printf ("FAIL: bug16618: Value of `i` was not zero as expected.\n");
|
||||
+ result = 1;
|
||||
+ }
|
||||
+ free (s);
|
||||
+ if (result != 1)
|
||||
+ printf ("PASS: bug16618: Did not crash.\n");
|
||||
+#undef SIZE
|
||||
+ }
|
||||
+
|
||||
+
|
||||
return result;
|
||||
}
|
||||
diff -ruN a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
|
||||
--- a/stdio-common/vfscanf.c 2015-09-22 10:20:14.051423230 +0200
|
||||
+++ b/stdio-common/vfscanf.c 2015-09-22 10:21:39.215791228 +0200
|
||||
@@ -279,9 +279,10 @@
|
||||
if (__glibc_unlikely (wpsize == wpmax)) \
|
||||
{ \
|
||||
CHAR_T *old = wp; \
|
||||
- size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \
|
||||
- ? UCHAR_MAX + 1 : 2 * wpmax); \
|
||||
- if (use_malloc || !__libc_use_alloca (newsize)) \
|
||||
+ bool fits = __glibc_likely (wpmax <= SIZE_MAX / sizeof (CHAR_T) / 2); \
|
||||
+ size_t wpneed = MAX (UCHAR_MAX + 1, 2 * wpmax); \
|
||||
+ size_t newsize = fits ? wpneed * sizeof (CHAR_T) : SIZE_MAX; \
|
||||
+ if (!__libc_use_alloca (newsize)) \
|
||||
{ \
|
||||
wp = realloc (use_malloc ? wp : NULL, newsize); \
|
||||
if (wp == NULL) \
|
||||
@@ -293,14 +294,13 @@
|
||||
} \
|
||||
if (! use_malloc) \
|
||||
MEMCPY (wp, old, wpsize); \
|
||||
- wpmax = newsize; \
|
||||
+ wpmax = wpneed; \
|
||||
use_malloc = true; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
size_t s = wpmax * sizeof (CHAR_T); \
|
||||
- wp = (CHAR_T *) extend_alloca (wp, s, \
|
||||
- newsize * sizeof (CHAR_T)); \
|
||||
+ wp = (CHAR_T *) extend_alloca (wp, s, newsize); \
|
||||
wpmax = s / sizeof (CHAR_T); \
|
||||
if (old != NULL) \
|
||||
MEMCPY (wp, old, wpsize); \
|
||||
@@ -0,0 +1,43 @@
|
||||
From 2959eda9272a033863c271aff62095abd01bd4e3 Mon Sep 17 00:00:00 2001
|
||||
From: Arjun Shankar <arjun.is@lostca.se>
|
||||
Date: Tue, 21 Apr 2015 14:06:31 +0200
|
||||
Subject: [PATCH] CVE-2015-1781: resolv/nss_dns/dns-host.c buffer overflow
|
||||
[BZ#18287]
|
||||
|
||||
Upstream-Status: Backport
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=18287
|
||||
---
|
||||
resolv/nss_dns/dns-host.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
|
||||
index b16b0ddf110907a0086b86612e544d3dc75182b8..d8c55791591750567f00e616e5d7b378dec934a0 100644
|
||||
--- a/resolv/nss_dns/dns-host.c
|
||||
+++ b/resolv/nss_dns/dns-host.c
|
||||
@@ -608,21 +608,22 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
|
||||
int n, ancount, qdcount;
|
||||
int haveanswer, had_error;
|
||||
char *bp, **ap, **hap;
|
||||
char tbuf[MAXDNAME];
|
||||
const char *tname;
|
||||
int (*name_ok) (const char *);
|
||||
u_char packtmp[NS_MAXCDNAME];
|
||||
int have_to_map = 0;
|
||||
uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
|
||||
buffer += pad;
|
||||
- if (__glibc_unlikely (buflen < sizeof (struct host_data) + pad))
|
||||
+ buflen = buflen > pad ? buflen - pad : 0;
|
||||
+ if (__glibc_unlikely (buflen < sizeof (struct host_data)))
|
||||
{
|
||||
/* The buffer is too small. */
|
||||
too_small:
|
||||
*errnop = ERANGE;
|
||||
*h_errnop = NETDB_INTERNAL;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
host_data = (struct host_data *) buffer;
|
||||
linebuflen = buflen - sizeof (struct host_data);
|
||||
if (buflen - sizeof (struct host_data) != linebuflen)
|
||||
--
|
||||
2.2.2
|
||||
|
||||
583
meta/recipes-core/glibc/glibc/CVE-2015-7547.patch
Normal file
583
meta/recipes-core/glibc/glibc/CVE-2015-7547.patch
Normal file
@@ -0,0 +1,583 @@
|
||||
From e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca Mon Sep 17 00:00:00 2001
|
||||
From: Carlos O'Donell <carlos@systemhalted.org>
|
||||
Date: Tue, 16 Feb 2016 21:26:37 -0500
|
||||
Subject: [PATCH] CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug
|
||||
18665).
|
||||
|
||||
* A stack-based buffer overflow was found in libresolv when invoked from
|
||||
libnss_dns, allowing specially crafted DNS responses to seize control
|
||||
of execution flow in the DNS client. The buffer overflow occurs in
|
||||
the functions send_dg (send datagram) and send_vc (send TCP) for the
|
||||
NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC
|
||||
family. The use of AF_UNSPEC triggers the low-level resolver code to
|
||||
send out two parallel queries for A and AAAA. A mismanagement of the
|
||||
buffers used for those queries could result in the response of a query
|
||||
writing beyond the alloca allocated buffer created by
|
||||
_nss_dns_gethostbyname4_r. Buffer management is simplified to remove
|
||||
the overflow. Thanks to the Google Security Team and Red Hat for
|
||||
reporting the security impact of this issue, and Robert Holiday of
|
||||
Ciena for reporting the related bug 18665. (CVE-2015-7547)
|
||||
|
||||
See also:
|
||||
https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html
|
||||
https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2015-7547
|
||||
|
||||
https://sourceware.org/git/?p=glibc.git;a=commit;h=e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca
|
||||
minor tweaking to remove Changelog and NEWS
|
||||
|
||||
---
|
||||
resolv/nss_dns/dns-host.c | 111 +++++++++++++++++++-
|
||||
resolv/res_query.c | 3 +
|
||||
resolv/res_send.c | 260 +++++++++++++++++++++++++++++++++++-----------
|
||||
3 files changed, 339 insertions(+), 66 deletions(-)
|
||||
|
||||
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
|
||||
index 3258e70..755832e 100644
|
||||
--- a/resolv/nss_dns/dns-host.c
|
||||
+++ b/resolv/nss_dns/dns-host.c
|
||||
@@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
|
||||
int h_namelen = 0;
|
||||
|
||||
if (ancount == 0)
|
||||
- return NSS_STATUS_NOTFOUND;
|
||||
+ {
|
||||
+ *h_errnop = HOST_NOT_FOUND;
|
||||
+ return NSS_STATUS_NOTFOUND;
|
||||
+ }
|
||||
|
||||
while (ancount-- > 0 && cp < end_of_message && had_error == 0)
|
||||
{
|
||||
@@ -1208,7 +1211,14 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
|
||||
/* Special case here: if the resolver sent a result but it only
|
||||
contains a CNAME while we are looking for a T_A or T_AAAA record,
|
||||
we fail with NOTFOUND instead of TRYAGAIN. */
|
||||
- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND;
|
||||
+ if (canon != NULL)
|
||||
+ {
|
||||
+ *h_errnop = HOST_NOT_FOUND;
|
||||
+ return NSS_STATUS_NOTFOUND;
|
||||
+ }
|
||||
+
|
||||
+ *h_errnop = NETDB_INTERNAL;
|
||||
+ return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
|
||||
|
||||
@@ -1222,11 +1232,101 @@ gaih_getanswer (const querybuf *answer1, int anslen1, const querybuf *answer2,
|
||||
|
||||
enum nss_status status = NSS_STATUS_NOTFOUND;
|
||||
|
||||
+ /* Combining the NSS status of two distinct queries requires some
|
||||
+ compromise and attention to symmetry (A or AAAA queries can be
|
||||
+ returned in any order). What follows is a breakdown of how this
|
||||
+ code is expected to work and why. We discuss only SUCCESS,
|
||||
+ TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns
|
||||
+ that apply (though RETURN and MERGE exist). We make a distinction
|
||||
+ between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable).
|
||||
+ A recoverable TRYAGAIN is almost always due to buffer size issues
|
||||
+ and returns ERANGE in errno and the caller is expected to retry
|
||||
+ with a larger buffer.
|
||||
+
|
||||
+ Lastly, you may be tempted to make significant changes to the
|
||||
+ conditions in this code to bring about symmetry between responses.
|
||||
+ Please don't change anything without due consideration for
|
||||
+ expected application behaviour. Some of the synthesized responses
|
||||
+ aren't very well thought out and sometimes appear to imply that
|
||||
+ IPv4 responses are always answer 1, and IPv6 responses are always
|
||||
+ answer 2, but that's not true (see the implementation of send_dg
|
||||
+ and send_vc to see response can arrive in any order, particularly
|
||||
+ for UDP). However, we expect it holds roughly enough of the time
|
||||
+ that this code works, but certainly needs to be fixed to make this
|
||||
+ a more robust implementation.
|
||||
+
|
||||
+ ----------------------------------------------
|
||||
+ | Answer 1 Status / | Synthesized | Reason |
|
||||
+ | Answer 2 Status | Status | |
|
||||
+ |--------------------------------------------|
|
||||
+ | SUCCESS/SUCCESS | SUCCESS | [1] |
|
||||
+ | SUCCESS/TRYAGAIN | TRYAGAIN | [5] |
|
||||
+ | SUCCESS/TRYAGAIN' | SUCCESS | [1] |
|
||||
+ | SUCCESS/NOTFOUND | SUCCESS | [1] |
|
||||
+ | SUCCESS/UNAVAIL | SUCCESS | [1] |
|
||||
+ | TRYAGAIN/SUCCESS | TRYAGAIN | [2] |
|
||||
+ | TRYAGAIN/TRYAGAIN | TRYAGAIN | [2] |
|
||||
+ | TRYAGAIN/TRYAGAIN' | TRYAGAIN | [2] |
|
||||
+ | TRYAGAIN/NOTFOUND | TRYAGAIN | [2] |
|
||||
+ | TRYAGAIN/UNAVAIL | TRYAGAIN | [2] |
|
||||
+ | TRYAGAIN'/SUCCESS | SUCCESS | [3] |
|
||||
+ | TRYAGAIN'/TRYAGAIN | TRYAGAIN | [3] |
|
||||
+ | TRYAGAIN'/TRYAGAIN' | TRYAGAIN' | [3] |
|
||||
+ | TRYAGAIN'/NOTFOUND | TRYAGAIN' | [3] |
|
||||
+ | TRYAGAIN'/UNAVAIL | UNAVAIL | [3] |
|
||||
+ | NOTFOUND/SUCCESS | SUCCESS | [3] |
|
||||
+ | NOTFOUND/TRYAGAIN | TRYAGAIN | [3] |
|
||||
+ | NOTFOUND/TRYAGAIN' | TRYAGAIN' | [3] |
|
||||
+ | NOTFOUND/NOTFOUND | NOTFOUND | [3] |
|
||||
+ | NOTFOUND/UNAVAIL | UNAVAIL | [3] |
|
||||
+ | UNAVAIL/SUCCESS | UNAVAIL | [4] |
|
||||
+ | UNAVAIL/TRYAGAIN | UNAVAIL | [4] |
|
||||
+ | UNAVAIL/TRYAGAIN' | UNAVAIL | [4] |
|
||||
+ | UNAVAIL/NOTFOUND | UNAVAIL | [4] |
|
||||
+ | UNAVAIL/UNAVAIL | UNAVAIL | [4] |
|
||||
+ ----------------------------------------------
|
||||
+
|
||||
+ [1] If the first response is a success we return success.
|
||||
+ This ignores the state of the second answer and in fact
|
||||
+ incorrectly sets errno and h_errno to that of the second
|
||||
+ answer. However because the response is a success we ignore
|
||||
+ *errnop and *h_errnop (though that means you touched errno on
|
||||
+ success). We are being conservative here and returning the
|
||||
+ likely IPv4 response in the first answer as a success.
|
||||
+
|
||||
+ [2] If the first response is a recoverable TRYAGAIN we return
|
||||
+ that instead of looking at the second response. The
|
||||
+ expectation here is that we have failed to get an IPv4 response
|
||||
+ and should retry both queries.
|
||||
+
|
||||
+ [3] If the first response was not a SUCCESS and the second
|
||||
+ response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN,
|
||||
+ or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the
|
||||
+ result from the second response, otherwise the first responses
|
||||
+ status is used. Again we have some odd side-effects when the
|
||||
+ second response is NOTFOUND because we overwrite *errnop and
|
||||
+ *h_errnop that means that a first answer of NOTFOUND might see
|
||||
+ its *errnop and *h_errnop values altered. Whether it matters
|
||||
+ in practice that a first response NOTFOUND has the wrong
|
||||
+ *errnop and *h_errnop is undecided.
|
||||
+
|
||||
+ [4] If the first response is UNAVAIL we return that instead of
|
||||
+ looking at the second response. The expectation here is that
|
||||
+ it will have failed similarly e.g. configuration failure.
|
||||
+
|
||||
+ [5] Testing this code is complicated by the fact that truncated
|
||||
+ second response buffers might be returned as SUCCESS if the
|
||||
+ first answer is a SUCCESS. To fix this we add symmetry to
|
||||
+ TRYAGAIN with the second response. If the second response
|
||||
+ is a recoverable error we now return TRYAGIN even if the first
|
||||
+ response was SUCCESS. */
|
||||
+
|
||||
if (anslen1 > 0)
|
||||
status = gaih_getanswer_slice(answer1, anslen1, qname,
|
||||
&pat, &buffer, &buflen,
|
||||
errnop, h_errnop, ttlp,
|
||||
&first);
|
||||
+
|
||||
if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND
|
||||
|| (status == NSS_STATUS_TRYAGAIN
|
||||
/* We want to look at the second answer in case of an
|
||||
@@ -1242,8 +1342,15 @@ gaih_getanswer (const querybuf *answer1, int anslen1, const querybuf *answer2,
|
||||
&pat, &buffer, &buflen,
|
||||
errnop, h_errnop, ttlp,
|
||||
&first);
|
||||
+ /* Use the second response status in some cases. */
|
||||
if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND)
|
||||
status = status2;
|
||||
+ /* Do not return a truncated second response (unless it was
|
||||
+ unavoidable e.g. unrecoverable TRYAGAIN). */
|
||||
+ if (status == NSS_STATUS_SUCCESS
|
||||
+ && (status2 == NSS_STATUS_TRYAGAIN
|
||||
+ && *errnop == ERANGE && *h_errnop != NO_RECOVERY))
|
||||
+ status = NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
|
||||
return status;
|
||||
diff --git a/resolv/res_query.c b/resolv/res_query.c
|
||||
index e4ee2a6..616fd57 100644
|
||||
--- a/resolv/res_query.c
|
||||
+++ b/resolv/res_query.c
|
||||
@@ -396,6 +396,7 @@ __libc_res_nsearch(res_state statp,
|
||||
{
|
||||
free (*answerp2);
|
||||
*answerp2 = NULL;
|
||||
+ *nanswerp2 = 0;
|
||||
*answerp2_malloced = 0;
|
||||
}
|
||||
}
|
||||
@@ -436,6 +437,7 @@ __libc_res_nsearch(res_state statp,
|
||||
{
|
||||
free (*answerp2);
|
||||
*answerp2 = NULL;
|
||||
+ *nanswerp2 = 0;
|
||||
*answerp2_malloced = 0;
|
||||
}
|
||||
|
||||
@@ -510,6 +512,7 @@ __libc_res_nsearch(res_state statp,
|
||||
{
|
||||
free (*answerp2);
|
||||
*answerp2 = NULL;
|
||||
+ *nanswerp2 = 0;
|
||||
*answerp2_malloced = 0;
|
||||
}
|
||||
if (saved_herrno != -1)
|
||||
diff --git a/resolv/res_send.c b/resolv/res_send.c
|
||||
index af42b8a..5f9f0e7 100644
|
||||
--- a/resolv/res_send.c
|
||||
+++ b/resolv/res_send.c
|
||||
@@ -1,3 +1,20 @@
|
||||
+/* Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
/*
|
||||
* Copyright (c) 1985, 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@@ -360,6 +377,8 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
|
||||
#ifdef USE_HOOKS
|
||||
if (__glibc_unlikely (statp->qhook || statp->rhook)) {
|
||||
if (anssiz < MAXPACKET && ansp) {
|
||||
+ /* Always allocate MAXPACKET, callers expect
|
||||
+ this specific size. */
|
||||
u_char *buf = malloc (MAXPACKET);
|
||||
if (buf == NULL)
|
||||
return (-1);
|
||||
@@ -653,6 +672,77 @@ libresolv_hidden_def (res_nsend)
|
||||
|
||||
/* Private */
|
||||
|
||||
+/* The send_vc function is responsible for sending a DNS query over TCP
|
||||
+ to the nameserver numbered NS from the res_state STATP i.e.
|
||||
+ EXT(statp).nssocks[ns]. The function supports sending both IPv4 and
|
||||
+ IPv6 queries at the same serially on the same socket.
|
||||
+
|
||||
+ Please note that for TCP there is no way to disable sending both
|
||||
+ queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP
|
||||
+ and sends the queries serially and waits for the result after each
|
||||
+ sent query. This implemetnation should be corrected to honour these
|
||||
+ options.
|
||||
+
|
||||
+ Please also note that for TCP we send both queries over the same
|
||||
+ socket one after another. This technically violates best practice
|
||||
+ since the server is allowed to read the first query, respond, and
|
||||
+ then close the socket (to service another client). If the server
|
||||
+ does this, then the remaining second query in the socket data buffer
|
||||
+ will cause the server to send the client an RST which will arrive
|
||||
+ asynchronously and the client's OS will likely tear down the socket
|
||||
+ receive buffer resulting in a potentially short read and lost
|
||||
+ response data. This will force the client to retry the query again,
|
||||
+ and this process may repeat until all servers and connection resets
|
||||
+ are exhausted and then the query will fail. It's not known if this
|
||||
+ happens with any frequency in real DNS server implementations. This
|
||||
+ implementation should be corrected to use two sockets by default for
|
||||
+ parallel queries.
|
||||
+
|
||||
+ The query stored in BUF of BUFLEN length is sent first followed by
|
||||
+ the query stored in BUF2 of BUFLEN2 length. Queries are sent
|
||||
+ serially on the same socket.
|
||||
+
|
||||
+ Answers to the query are stored firstly in *ANSP up to a max of
|
||||
+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
|
||||
+ is non-NULL (to indicate that modifying the answer buffer is allowed)
|
||||
+ then malloc is used to allocate a new response buffer and ANSCP and
|
||||
+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
|
||||
+ are needed but ANSCP is NULL, then as much of the response as
|
||||
+ possible is read into the buffer, but the results will be truncated.
|
||||
+ When truncation happens because of a small answer buffer the DNS
|
||||
+ packets header field TC will bet set to 1, indicating a truncated
|
||||
+ message and the rest of the socket data will be read and discarded.
|
||||
+
|
||||
+ Answers to the query are stored secondly in *ANSP2 up to a max of
|
||||
+ *ANSSIZP2 bytes, with the actual response length stored in
|
||||
+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
|
||||
+ is non-NULL (required for a second query) then malloc is used to
|
||||
+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
|
||||
+ size and *ANSP2_MALLOCED is set to 1.
|
||||
+
|
||||
+ The ANSP2_MALLOCED argument will eventually be removed as the
|
||||
+ change in buffer pointer can be used to detect the buffer has
|
||||
+ changed and that the caller should use free on the new buffer.
|
||||
+
|
||||
+ Note that the answers may arrive in any order from the server and
|
||||
+ therefore the first and second answer buffers may not correspond to
|
||||
+ the first and second queries.
|
||||
+
|
||||
+ It is not supported to call this function with a non-NULL ANSP2
|
||||
+ but a NULL ANSCP. Put another way, you can call send_vc with a
|
||||
+ single unmodifiable buffer or two modifiable buffers, but no other
|
||||
+ combination is supported.
|
||||
+
|
||||
+ It is the caller's responsibility to free the malloc allocated
|
||||
+ buffers by detecting that the pointers have changed from their
|
||||
+ original values i.e. *ANSCP or *ANSP2 has changed.
|
||||
+
|
||||
+ If errors are encountered then *TERRNO is set to an appropriate
|
||||
+ errno value and a zero result is returned for a recoverable error,
|
||||
+ and a less-than zero result is returned for a non-recoverable error.
|
||||
+
|
||||
+ If no errors are encountered then *TERRNO is left unmodified and
|
||||
+ a the length of the first response in bytes is returned. */
|
||||
static int
|
||||
send_vc(res_state statp,
|
||||
const u_char *buf, int buflen, const u_char *buf2, int buflen2,
|
||||
@@ -662,11 +752,7 @@ send_vc(res_state statp,
|
||||
{
|
||||
const HEADER *hp = (HEADER *) buf;
|
||||
const HEADER *hp2 = (HEADER *) buf2;
|
||||
- u_char *ans = *ansp;
|
||||
- int orig_anssizp = *anssizp;
|
||||
- // XXX REMOVE
|
||||
- // int anssiz = *anssizp;
|
||||
- HEADER *anhp = (HEADER *) ans;
|
||||
+ HEADER *anhp = (HEADER *) *ansp;
|
||||
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
|
||||
int truncating, connreset, resplen, n;
|
||||
struct iovec iov[4];
|
||||
@@ -742,6 +828,8 @@ send_vc(res_state statp,
|
||||
* Receive length & response
|
||||
*/
|
||||
int recvresp1 = 0;
|
||||
+ /* Skip the second response if there is no second query.
|
||||
+ To do that we mark the second response as received. */
|
||||
int recvresp2 = buf2 == NULL;
|
||||
uint16_t rlen16;
|
||||
read_len:
|
||||
@@ -778,33 +866,14 @@ send_vc(res_state statp,
|
||||
u_char **thisansp;
|
||||
int *thisresplenp;
|
||||
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
|
||||
+ /* We have not received any responses
|
||||
+ yet or we only have one response to
|
||||
+ receive. */
|
||||
thisanssizp = anssizp;
|
||||
thisansp = anscp ?: ansp;
|
||||
assert (anscp != NULL || ansp2 == NULL);
|
||||
thisresplenp = &resplen;
|
||||
} else {
|
||||
- if (*anssizp != MAXPACKET) {
|
||||
- /* No buffer allocated for the first
|
||||
- reply. We can try to use the rest
|
||||
- of the user-provided buffer. */
|
||||
-#if _STRING_ARCH_unaligned
|
||||
- *anssizp2 = orig_anssizp - resplen;
|
||||
- *ansp2 = *ansp + resplen;
|
||||
-#else
|
||||
- int aligned_resplen
|
||||
- = ((resplen + __alignof__ (HEADER) - 1)
|
||||
- & ~(__alignof__ (HEADER) - 1));
|
||||
- *anssizp2 = orig_anssizp - aligned_resplen;
|
||||
- *ansp2 = *ansp + aligned_resplen;
|
||||
-#endif
|
||||
- } else {
|
||||
- /* The first reply did not fit into the
|
||||
- user-provided buffer. Maybe the second
|
||||
- answer will. */
|
||||
- *anssizp2 = orig_anssizp;
|
||||
- *ansp2 = *ansp;
|
||||
- }
|
||||
-
|
||||
thisanssizp = anssizp2;
|
||||
thisansp = ansp2;
|
||||
thisresplenp = resplen2;
|
||||
@@ -812,10 +881,14 @@ send_vc(res_state statp,
|
||||
anhp = (HEADER *) *thisansp;
|
||||
|
||||
*thisresplenp = rlen;
|
||||
- if (rlen > *thisanssizp) {
|
||||
- /* Yes, we test ANSCP here. If we have two buffers
|
||||
- both will be allocatable. */
|
||||
- if (__glibc_likely (anscp != NULL)) {
|
||||
+ /* Is the answer buffer too small? */
|
||||
+ if (*thisanssizp < rlen) {
|
||||
+ /* If the current buffer is not the the static
|
||||
+ user-supplied buffer then we can reallocate
|
||||
+ it. */
|
||||
+ if (thisansp != NULL && thisansp != ansp) {
|
||||
+ /* Always allocate MAXPACKET, callers expect
|
||||
+ this specific size. */
|
||||
u_char *newp = malloc (MAXPACKET);
|
||||
if (newp == NULL) {
|
||||
*terrno = ENOMEM;
|
||||
@@ -827,6 +900,9 @@ send_vc(res_state statp,
|
||||
if (thisansp == ansp2)
|
||||
*ansp2_malloced = 1;
|
||||
anhp = (HEADER *) newp;
|
||||
+ /* A uint16_t can't be larger than MAXPACKET
|
||||
+ thus it's safe to allocate MAXPACKET but
|
||||
+ read RLEN bytes instead. */
|
||||
len = rlen;
|
||||
} else {
|
||||
Dprint(statp->options & RES_DEBUG,
|
||||
@@ -990,6 +1066,66 @@ reopen (res_state statp, int *terrno, int ns)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+/* The send_dg function is responsible for sending a DNS query over UDP
|
||||
+ to the nameserver numbered NS from the res_state STATP i.e.
|
||||
+ EXT(statp).nssocks[ns]. The function supports IPv4 and IPv6 queries
|
||||
+ along with the ability to send the query in parallel for both stacks
|
||||
+ (default) or serially (RES_SINGLKUP). It also supports serial lookup
|
||||
+ with a close and reopen of the socket used to talk to the server
|
||||
+ (RES_SNGLKUPREOP) to work around broken name servers.
|
||||
+
|
||||
+ The query stored in BUF of BUFLEN length is sent first followed by
|
||||
+ the query stored in BUF2 of BUFLEN2 length. Queries are sent
|
||||
+ in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP).
|
||||
+
|
||||
+ Answers to the query are stored firstly in *ANSP up to a max of
|
||||
+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
|
||||
+ is non-NULL (to indicate that modifying the answer buffer is allowed)
|
||||
+ then malloc is used to allocate a new response buffer and ANSCP and
|
||||
+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
|
||||
+ are needed but ANSCP is NULL, then as much of the response as
|
||||
+ possible is read into the buffer, but the results will be truncated.
|
||||
+ When truncation happens because of a small answer buffer the DNS
|
||||
+ packets header field TC will bet set to 1, indicating a truncated
|
||||
+ message, while the rest of the UDP packet is discarded.
|
||||
+
|
||||
+ Answers to the query are stored secondly in *ANSP2 up to a max of
|
||||
+ *ANSSIZP2 bytes, with the actual response length stored in
|
||||
+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
|
||||
+ is non-NULL (required for a second query) then malloc is used to
|
||||
+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
|
||||
+ size and *ANSP2_MALLOCED is set to 1.
|
||||
+
|
||||
+ The ANSP2_MALLOCED argument will eventually be removed as the
|
||||
+ change in buffer pointer can be used to detect the buffer has
|
||||
+ changed and that the caller should use free on the new buffer.
|
||||
+
|
||||
+ Note that the answers may arrive in any order from the server and
|
||||
+ therefore the first and second answer buffers may not correspond to
|
||||
+ the first and second queries.
|
||||
+
|
||||
+ It is not supported to call this function with a non-NULL ANSP2
|
||||
+ but a NULL ANSCP. Put another way, you can call send_vc with a
|
||||
+ single unmodifiable buffer or two modifiable buffers, but no other
|
||||
+ combination is supported.
|
||||
+
|
||||
+ It is the caller's responsibility to free the malloc allocated
|
||||
+ buffers by detecting that the pointers have changed from their
|
||||
+ original values i.e. *ANSCP or *ANSP2 has changed.
|
||||
+
|
||||
+ If an answer is truncated because of UDP datagram DNS limits then
|
||||
+ *V_CIRCUIT is set to 1 and the return value non-zero to indicate to
|
||||
+ the caller to retry with TCP. The value *GOTSOMEWHERE is set to 1
|
||||
+ if any progress was made reading a response from the nameserver and
|
||||
+ is used by the caller to distinguish between ECONNREFUSED and
|
||||
+ ETIMEDOUT (the latter if *GOTSOMEWHERE is 1).
|
||||
+
|
||||
+ If errors are encountered then *TERRNO is set to an appropriate
|
||||
+ errno value and a zero result is returned for a recoverable error,
|
||||
+ and a less-than zero result is returned for a non-recoverable error.
|
||||
+
|
||||
+ If no errors are encountered then *TERRNO is left unmodified and
|
||||
+ a the length of the first response in bytes is returned. */
|
||||
static int
|
||||
send_dg(res_state statp,
|
||||
const u_char *buf, int buflen, const u_char *buf2, int buflen2,
|
||||
@@ -999,8 +1135,6 @@ send_dg(res_state statp,
|
||||
{
|
||||
const HEADER *hp = (HEADER *) buf;
|
||||
const HEADER *hp2 = (HEADER *) buf2;
|
||||
- u_char *ans = *ansp;
|
||||
- int orig_anssizp = *anssizp;
|
||||
struct timespec now, timeout, finish;
|
||||
struct pollfd pfd[1];
|
||||
int ptimeout;
|
||||
@@ -1033,6 +1167,8 @@ send_dg(res_state statp,
|
||||
int need_recompute = 0;
|
||||
int nwritten = 0;
|
||||
int recvresp1 = 0;
|
||||
+ /* Skip the second response if there is no second query.
|
||||
+ To do that we mark the second response as received. */
|
||||
int recvresp2 = buf2 == NULL;
|
||||
pfd[0].fd = EXT(statp).nssocks[ns];
|
||||
pfd[0].events = POLLOUT;
|
||||
@@ -1196,55 +1332,56 @@ send_dg(res_state statp,
|
||||
int *thisresplenp;
|
||||
|
||||
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
|
||||
+ /* We have not received any responses
|
||||
+ yet or we only have one response to
|
||||
+ receive. */
|
||||
thisanssizp = anssizp;
|
||||
thisansp = anscp ?: ansp;
|
||||
assert (anscp != NULL || ansp2 == NULL);
|
||||
thisresplenp = &resplen;
|
||||
} else {
|
||||
- if (*anssizp != MAXPACKET) {
|
||||
- /* No buffer allocated for the first
|
||||
- reply. We can try to use the rest
|
||||
- of the user-provided buffer. */
|
||||
-#if _STRING_ARCH_unaligned
|
||||
- *anssizp2 = orig_anssizp - resplen;
|
||||
- *ansp2 = *ansp + resplen;
|
||||
-#else
|
||||
- int aligned_resplen
|
||||
- = ((resplen + __alignof__ (HEADER) - 1)
|
||||
- & ~(__alignof__ (HEADER) - 1));
|
||||
- *anssizp2 = orig_anssizp - aligned_resplen;
|
||||
- *ansp2 = *ansp + aligned_resplen;
|
||||
-#endif
|
||||
- } else {
|
||||
- /* The first reply did not fit into the
|
||||
- user-provided buffer. Maybe the second
|
||||
- answer will. */
|
||||
- *anssizp2 = orig_anssizp;
|
||||
- *ansp2 = *ansp;
|
||||
- }
|
||||
-
|
||||
thisanssizp = anssizp2;
|
||||
thisansp = ansp2;
|
||||
thisresplenp = resplen2;
|
||||
}
|
||||
|
||||
if (*thisanssizp < MAXPACKET
|
||||
- /* Yes, we test ANSCP here. If we have two buffers
|
||||
- both will be allocatable. */
|
||||
- && anscp
|
||||
+ /* If the current buffer is not the the static
|
||||
+ user-supplied buffer then we can reallocate
|
||||
+ it. */
|
||||
+ && (thisansp != NULL && thisansp != ansp)
|
||||
#ifdef FIONREAD
|
||||
+ /* Is the size too small? */
|
||||
&& (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
|
||||
|| *thisanssizp < *thisresplenp)
|
||||
#endif
|
||||
) {
|
||||
+ /* Always allocate MAXPACKET, callers expect
|
||||
+ this specific size. */
|
||||
u_char *newp = malloc (MAXPACKET);
|
||||
if (newp != NULL) {
|
||||
- *anssizp = MAXPACKET;
|
||||
- *thisansp = ans = newp;
|
||||
+ *thisanssizp = MAXPACKET;
|
||||
+ *thisansp = newp;
|
||||
if (thisansp == ansp2)
|
||||
*ansp2_malloced = 1;
|
||||
}
|
||||
}
|
||||
+ /* We could end up with truncation if anscp was NULL
|
||||
+ (not allowed to change caller's buffer) and the
|
||||
+ response buffer size is too small. This isn't a
|
||||
+ reliable way to detect truncation because the ioctl
|
||||
+ may be an inaccurate report of the UDP message size.
|
||||
+ Therefore we use this only to issue debug output.
|
||||
+ To do truncation accurately with UDP we need
|
||||
+ MSG_TRUNC which is only available on Linux. We
|
||||
+ can abstract out the Linux-specific feature in the
|
||||
+ future to detect truncation. */
|
||||
+ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) {
|
||||
+ Dprint(statp->options & RES_DEBUG,
|
||||
+ (stdout, ";; response may be truncated (UDP)\n")
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
HEADER *anhp = (HEADER *) *thisansp;
|
||||
socklen_t fromlen = sizeof(struct sockaddr_in6);
|
||||
assert (sizeof(from) <= fromlen);
|
||||
155
meta/recipes-core/glibc/glibc/CVE-2015-8776.patch
Normal file
155
meta/recipes-core/glibc/glibc/CVE-2015-8776.patch
Normal file
@@ -0,0 +1,155 @@
|
||||
From d36c75fc0d44deec29635dd239b0fbd206ca49b7 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
Date: Sat, 26 Sep 2015 13:27:48 -0700
|
||||
Subject: [PATCH] Fix BZ #18985 -- out of range data to strftime() causes a
|
||||
segfault
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2015-8776
|
||||
[Yocto # 8980]
|
||||
|
||||
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d36c75fc0d44deec29635dd239b0fbd206ca49b7
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
---
|
||||
ChangeLog | 8 ++++++++
|
||||
NEWS | 2 +-
|
||||
time/strftime_l.c | 20 +++++++++++++-------
|
||||
time/tst-strftime.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
4 files changed, 73 insertions(+), 9 deletions(-)
|
||||
|
||||
Index: git/ChangeLog
|
||||
===================================================================
|
||||
--- git.orig/ChangeLog
|
||||
+++ git/ChangeLog
|
||||
@@ -1,3 +1,11 @@
|
||||
+2015-09-26 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
+
|
||||
+ [BZ #18985]
|
||||
+ * time/strftime_l.c (a_wkday, f_wkday, a_month, f_month): Range check.
|
||||
+ (__strftime_internal): Likewise.
|
||||
+ * time/tst-strftime.c (do_bz18985): New test.
|
||||
+ (do_test): Call it.
|
||||
+
|
||||
2015-12-04 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
[BZ #16961]
|
||||
Index: git/time/strftime_l.c
|
||||
===================================================================
|
||||
--- git.orig/time/strftime_l.c
|
||||
+++ git/time/strftime_l.c
|
||||
@@ -514,13 +514,17 @@ __strftime_internal (s, maxsize, format,
|
||||
only a few elements. Dereference the pointers only if the format
|
||||
requires this. Then it is ok to fail if the pointers are invalid. */
|
||||
# define a_wkday \
|
||||
- ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday))
|
||||
+ ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6 \
|
||||
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday)))
|
||||
# define f_wkday \
|
||||
- ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday))
|
||||
+ ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6 \
|
||||
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday)))
|
||||
# define a_month \
|
||||
- ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon))
|
||||
+ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
|
||||
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon)))
|
||||
# define f_month \
|
||||
- ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon))
|
||||
+ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
|
||||
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
|
||||
# define ampm \
|
||||
((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \
|
||||
? NLW(PM_STR) : NLW(AM_STR)))
|
||||
@@ -530,8 +534,10 @@ __strftime_internal (s, maxsize, format,
|
||||
# define ap_len STRLEN (ampm)
|
||||
#else
|
||||
# if !HAVE_STRFTIME
|
||||
-# define f_wkday (weekday_name[tp->tm_wday])
|
||||
-# define f_month (month_name[tp->tm_mon])
|
||||
+# define f_wkday (tp->tm_wday < 0 || tp->tm_wday > 6 \
|
||||
+ ? "?" : weekday_name[tp->tm_wday])
|
||||
+# define f_month (tp->tm_mon < 0 || tp->tm_mon > 11 \
|
||||
+ ? "?" : month_name[tp->tm_mon])
|
||||
# define a_wkday f_wkday
|
||||
# define a_month f_month
|
||||
# define ampm (L_("AMPM") + 2 * (tp->tm_hour > 11))
|
||||
@@ -1325,7 +1331,7 @@ __strftime_internal (s, maxsize, format,
|
||||
*tzset_called = true;
|
||||
}
|
||||
# endif
|
||||
- zone = tzname[tp->tm_isdst];
|
||||
+ zone = tp->tm_isdst <= 1 ? tzname[tp->tm_isdst] : "?";
|
||||
}
|
||||
#endif
|
||||
if (! zone)
|
||||
Index: git/time/tst-strftime.c
|
||||
===================================================================
|
||||
--- git.orig/time/tst-strftime.c
|
||||
+++ git/time/tst-strftime.c
|
||||
@@ -4,6 +4,56 @@
|
||||
#include <time.h>
|
||||
|
||||
|
||||
+static int
|
||||
+do_bz18985 (void)
|
||||
+{
|
||||
+ char buf[1000];
|
||||
+ struct tm ttm;
|
||||
+ int rc, ret = 0;
|
||||
+
|
||||
+ memset (&ttm, 1, sizeof (ttm));
|
||||
+ ttm.tm_zone = NULL; /* Dereferenced directly if non-NULL. */
|
||||
+ rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm);
|
||||
+
|
||||
+ if (rc == 66)
|
||||
+ {
|
||||
+ const char expected[]
|
||||
+ = "? ? ? ? ? ? 16843009 16843009:16843009:16843009 16844909 +467836 ?";
|
||||
+ if (0 != strcmp (buf, expected))
|
||||
+ {
|
||||
+ printf ("expected:\n %s\ngot:\n %s\n", expected, buf);
|
||||
+ ret += 1;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ printf ("expected 66, got %d\n", rc);
|
||||
+ ret += 1;
|
||||
+ }
|
||||
+
|
||||
+ /* Check negative values as well. */
|
||||
+ memset (&ttm, 0xFF, sizeof (ttm));
|
||||
+ ttm.tm_zone = NULL; /* Dereferenced directly if non-NULL. */
|
||||
+ rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm);
|
||||
+
|
||||
+ if (rc == 30)
|
||||
+ {
|
||||
+ const char expected[] = "? ? ? ? ? ? -1 -1:-1:-1 1899 ";
|
||||
+ if (0 != strcmp (buf, expected))
|
||||
+ {
|
||||
+ printf ("expected:\n %s\ngot:\n %s\n", expected, buf);
|
||||
+ ret += 1;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ printf ("expected 30, got %d\n", rc);
|
||||
+ ret += 1;
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static struct
|
||||
{
|
||||
const char *fmt;
|
||||
@@ -104,7 +154,7 @@ do_test (void)
|
||||
}
|
||||
}
|
||||
|
||||
- return result;
|
||||
+ return result + do_bz18985 ();
|
||||
}
|
||||
|
||||
#define TEST_FUNCTION do_test ()
|
||||
122
meta/recipes-core/glibc/glibc/CVE-2015-8777.patch
Normal file
122
meta/recipes-core/glibc/glibc/CVE-2015-8777.patch
Normal file
@@ -0,0 +1,122 @@
|
||||
From a014cecd82b71b70a6a843e250e06b541ad524f7 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Thu, 15 Oct 2015 09:23:07 +0200
|
||||
Subject: [PATCH] Always enable pointer guard [BZ #18928]
|
||||
|
||||
Honoring the LD_POINTER_GUARD environment variable in AT_SECURE mode
|
||||
has security implications. This commit enables pointer guard
|
||||
unconditionally, and the environment variable is now ignored.
|
||||
|
||||
[BZ #18928]
|
||||
* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
|
||||
_dl_pointer_guard member.
|
||||
* elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard
|
||||
initializer.
|
||||
(security_init): Always set up pointer guard.
|
||||
(process_envvars): Do not process LD_POINTER_GUARD.
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2015-8777
|
||||
[Yocto # 8980]
|
||||
|
||||
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=a014cecd82b71b70a6a843e250e06b541ad524f7
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
---
|
||||
ChangeLog | 10 ++++++++++
|
||||
NEWS | 13 ++++++++-----
|
||||
elf/rtld.c | 15 ++++-----------
|
||||
sysdeps/generic/ldsodefs.h | 3 ---
|
||||
4 files changed, 22 insertions(+), 19 deletions(-)
|
||||
|
||||
Index: git/elf/rtld.c
|
||||
===================================================================
|
||||
--- git.orig/elf/rtld.c
|
||||
+++ git/elf/rtld.c
|
||||
@@ -163,7 +163,6 @@ struct rtld_global_ro _rtld_global_ro at
|
||||
._dl_hwcap_mask = HWCAP_IMPORTANT,
|
||||
._dl_lazy = 1,
|
||||
._dl_fpu_control = _FPU_DEFAULT,
|
||||
- ._dl_pointer_guard = 1,
|
||||
._dl_pagesize = EXEC_PAGESIZE,
|
||||
._dl_inhibit_cache = 0,
|
||||
|
||||
@@ -710,15 +709,12 @@ security_init (void)
|
||||
#endif
|
||||
|
||||
/* Set up the pointer guard as well, if necessary. */
|
||||
- if (GLRO(dl_pointer_guard))
|
||||
- {
|
||||
- uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
|
||||
- stack_chk_guard);
|
||||
+ uintptr_t pointer_chk_guard
|
||||
+ = _dl_setup_pointer_guard (_dl_random, stack_chk_guard);
|
||||
#ifdef THREAD_SET_POINTER_GUARD
|
||||
- THREAD_SET_POINTER_GUARD (pointer_chk_guard);
|
||||
+ THREAD_SET_POINTER_GUARD (pointer_chk_guard);
|
||||
#endif
|
||||
- __pointer_chk_guard_local = pointer_chk_guard;
|
||||
- }
|
||||
+ __pointer_chk_guard_local = pointer_chk_guard;
|
||||
|
||||
/* We do not need the _dl_random value anymore. The less
|
||||
information we leave behind, the better, so clear the
|
||||
@@ -2476,9 +2472,6 @@ process_envvars (enum mode *modep)
|
||||
GLRO(dl_use_load_bias) = envline[14] == '1' ? -1 : 0;
|
||||
break;
|
||||
}
|
||||
-
|
||||
- if (memcmp (envline, "POINTER_GUARD", 13) == 0)
|
||||
- GLRO(dl_pointer_guard) = envline[14] != '0';
|
||||
break;
|
||||
|
||||
case 14:
|
||||
Index: git/sysdeps/generic/ldsodefs.h
|
||||
===================================================================
|
||||
--- git.orig/sysdeps/generic/ldsodefs.h
|
||||
+++ git/sysdeps/generic/ldsodefs.h
|
||||
@@ -590,9 +590,6 @@ struct rtld_global_ro
|
||||
/* List of auditing interfaces. */
|
||||
struct audit_ifaces *_dl_audit;
|
||||
unsigned int _dl_naudit;
|
||||
-
|
||||
- /* 0 if internal pointer values should not be guarded, 1 if they should. */
|
||||
- EXTERN int _dl_pointer_guard;
|
||||
};
|
||||
# define __rtld_global_attribute__
|
||||
# ifdef IS_IN_rtld
|
||||
Index: git/ChangeLog
|
||||
===================================================================
|
||||
--- git.orig/ChangeLog
|
||||
+++ git/ChangeLog
|
||||
@@ -1,3 +1,13 @@
|
||||
+2015-10-15 Florian Weimer <fweimer@redhat.com>
|
||||
+
|
||||
+ [BZ #18928]
|
||||
+ * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
|
||||
+ _dl_pointer_guard member.
|
||||
+ * elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard
|
||||
+ initializer.
|
||||
+ (security_init): Always set up pointer guard.
|
||||
+ (process_envvars): Do not process LD_POINTER_GUARD.
|
||||
+
|
||||
2015-02-05 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
|
||||
[BZ #16618] CVE-2015-1472
|
||||
Index: git/NEWS
|
||||
===================================================================
|
||||
--- git.orig/NEWS
|
||||
+++ git/NEWS
|
||||
@@ -24,7 +24,10 @@ Version 2.20
|
||||
17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078,
|
||||
17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150,
|
||||
17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354,
|
||||
- 17625, 17630.
|
||||
+ 17625, 17630, 18928.
|
||||
+
|
||||
+* The LD_POINTER_GUARD environment variable can no longer be used to
|
||||
+ disable the pointer guard feature. It is always enabled.
|
||||
|
||||
* The nss_dns implementation of getnetbyname could run into an infinite loop
|
||||
if the DNS response contained a PTR record of an unexpected format.
|
||||
261
meta/recipes-core/glibc/glibc/CVE-2015-8779.patch
Normal file
261
meta/recipes-core/glibc/glibc/CVE-2015-8779.patch
Normal file
@@ -0,0 +1,261 @@
|
||||
From 0f58539030e436449f79189b6edab17d7479796e Mon Sep 17 00:00:00 2001
|
||||
From: Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
Date: Sat, 8 Aug 2015 15:53:03 -0700
|
||||
Subject: [PATCH] Fix BZ #17905
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2015-8779
|
||||
[Yocto # 8980]
|
||||
|
||||
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f58539030e436449f79189b6edab17d7479796e
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
---
|
||||
ChangeLog | 8 ++++++++
|
||||
NEWS | 2 +-
|
||||
catgets/Makefile | 9 ++++++++-
|
||||
catgets/catgets.c | 19 ++++++++++++-------
|
||||
catgets/open_catalog.c | 23 ++++++++++++++---------
|
||||
catgets/tst-catgets.c | 31 +++++++++++++++++++++++++++++++
|
||||
6 files changed, 74 insertions(+), 18 deletions(-)
|
||||
|
||||
Index: git/catgets/Makefile
|
||||
===================================================================
|
||||
--- git.orig/catgets/Makefile
|
||||
+++ git/catgets/Makefile
|
||||
@@ -37,6 +37,7 @@ ifeq (y,$(OPTION_EGLIBC_CATGETS))
|
||||
ifeq ($(run-built-tests),yes)
|
||||
tests-special += $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
|
||||
$(objpfx)sample.SJIS.cat $(objpfx)test-gencat.out
|
||||
+tests-special += $(objpfx)tst-catgets-mem.out
|
||||
endif
|
||||
endif
|
||||
gencat-modules = xmalloc
|
||||
@@ -53,9 +54,11 @@ catgets-CPPFLAGS := -DNLSPATH='"$(msgcat
|
||||
|
||||
generated += de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \
|
||||
test-gencat.h
|
||||
+generated += tst-catgets.mtrace tst-catgets-mem.out
|
||||
+
|
||||
generated-dirs += de
|
||||
|
||||
-tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de
|
||||
+tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de MALLOC_TRACE=$(objpfx)tst-catgets.mtrace
|
||||
|
||||
ifeq ($(run-built-tests),yes)
|
||||
# This test just checks whether the program produces any error or not.
|
||||
@@ -89,4 +92,8 @@ $(objpfx)test-gencat.out: test-gencat.sh
|
||||
$(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
|
||||
$(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@; \
|
||||
$(evaluate-test)
|
||||
+
|
||||
+$(objpfx)tst-catgets-mem.out: $(objpfx)tst-catgets.out
|
||||
+ $(common-objpfx)malloc/mtrace $(objpfx)tst-catgets.mtrace > $@; \
|
||||
+ $(evaluate-test)
|
||||
endif
|
||||
Index: git/catgets/catgets.c
|
||||
===================================================================
|
||||
--- git.orig/catgets/catgets.c
|
||||
+++ git/catgets/catgets.c
|
||||
@@ -16,7 +16,6 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
-#include <alloca.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
#include <nl_types.h>
|
||||
@@ -35,6 +34,7 @@ catopen (const char *cat_name, int flag)
|
||||
__nl_catd result;
|
||||
const char *env_var = NULL;
|
||||
const char *nlspath = NULL;
|
||||
+ char *tmp = NULL;
|
||||
|
||||
if (strchr (cat_name, '/') == NULL)
|
||||
{
|
||||
@@ -54,7 +54,10 @@ catopen (const char *cat_name, int flag)
|
||||
{
|
||||
/* Append the system dependent directory. */
|
||||
size_t len = strlen (nlspath) + 1 + sizeof NLSPATH;
|
||||
- char *tmp = alloca (len);
|
||||
+ tmp = malloc (len);
|
||||
+
|
||||
+ if (__glibc_unlikely (tmp == NULL))
|
||||
+ return (nl_catd) -1;
|
||||
|
||||
__stpcpy (__stpcpy (__stpcpy (tmp, nlspath), ":"), NLSPATH);
|
||||
nlspath = tmp;
|
||||
@@ -65,16 +68,18 @@ catopen (const char *cat_name, int flag)
|
||||
|
||||
result = (__nl_catd) malloc (sizeof (*result));
|
||||
if (result == NULL)
|
||||
- /* We cannot get enough memory. */
|
||||
- return (nl_catd) -1;
|
||||
-
|
||||
- if (__open_catalog (cat_name, nlspath, env_var, result) != 0)
|
||||
+ {
|
||||
+ /* We cannot get enough memory. */
|
||||
+ result = (nl_catd) -1;
|
||||
+ }
|
||||
+ else if (__open_catalog (cat_name, nlspath, env_var, result) != 0)
|
||||
{
|
||||
/* Couldn't open the file. */
|
||||
free ((void *) result);
|
||||
- return (nl_catd) -1;
|
||||
+ result = (nl_catd) -1;
|
||||
}
|
||||
|
||||
+ free (tmp);
|
||||
return (nl_catd) result;
|
||||
}
|
||||
|
||||
Index: git/catgets/open_catalog.c
|
||||
===================================================================
|
||||
--- git.orig/catgets/open_catalog.c
|
||||
+++ git/catgets/open_catalog.c
|
||||
@@ -47,6 +47,7 @@ __open_catalog (const char *cat_name, co
|
||||
size_t tab_size;
|
||||
const char *lastp;
|
||||
int result = -1;
|
||||
+ char *buf = NULL;
|
||||
|
||||
if (strchr (cat_name, '/') != NULL || nlspath == NULL)
|
||||
fd = open_not_cancel_2 (cat_name, O_RDONLY);
|
||||
@@ -57,23 +58,23 @@ __open_catalog (const char *cat_name, co
|
||||
if (__glibc_unlikely (bufact + (n) >= bufmax)) \
|
||||
{ \
|
||||
char *old_buf = buf; \
|
||||
- bufmax += 256 + (n); \
|
||||
- buf = (char *) alloca (bufmax); \
|
||||
- memcpy (buf, old_buf, bufact); \
|
||||
+ bufmax += (bufmax < 256 + (n)) ? 256 + (n) : bufmax; \
|
||||
+ buf = realloc (buf, bufmax); \
|
||||
+ if (__glibc_unlikely (buf == NULL)) \
|
||||
+ { \
|
||||
+ free (old_buf); \
|
||||
+ return -1; \
|
||||
+ } \
|
||||
}
|
||||
|
||||
/* The RUN_NLSPATH variable contains a colon separated list of
|
||||
descriptions where we expect to find catalogs. We have to
|
||||
recognize certain % substitutions and stop when we found the
|
||||
first existing file. */
|
||||
- char *buf;
|
||||
size_t bufact;
|
||||
- size_t bufmax;
|
||||
+ size_t bufmax = 0;
|
||||
size_t len;
|
||||
|
||||
- buf = NULL;
|
||||
- bufmax = 0;
|
||||
-
|
||||
fd = -1;
|
||||
while (*run_nlspath != '\0')
|
||||
{
|
||||
@@ -188,7 +189,10 @@ __open_catalog (const char *cat_name, co
|
||||
|
||||
/* Avoid dealing with directories and block devices */
|
||||
if (__builtin_expect (fd, 0) < 0)
|
||||
- return -1;
|
||||
+ {
|
||||
+ free (buf);
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0)
|
||||
goto close_unlock_return;
|
||||
@@ -325,6 +329,7 @@ __open_catalog (const char *cat_name, co
|
||||
/* Release the lock again. */
|
||||
close_unlock_return:
|
||||
close_not_cancel_no_status (fd);
|
||||
+ free (buf);
|
||||
|
||||
return result;
|
||||
}
|
||||
Index: git/catgets/tst-catgets.c
|
||||
===================================================================
|
||||
--- git.orig/catgets/tst-catgets.c
|
||||
+++ git/catgets/tst-catgets.c
|
||||
@@ -1,7 +1,10 @@
|
||||
+#include <assert.h>
|
||||
#include <mcheck.h>
|
||||
#include <nl_types.h>
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <sys/resource.h>
|
||||
|
||||
|
||||
static const char *msgs[] =
|
||||
@@ -12,6 +15,33 @@ static const char *msgs[] =
|
||||
};
|
||||
#define nmsgs (sizeof (msgs) / sizeof (msgs[0]))
|
||||
|
||||
+
|
||||
+/* Test for unbounded alloca. */
|
||||
+static int
|
||||
+do_bz17905 (void)
|
||||
+{
|
||||
+ char *buf;
|
||||
+ struct rlimit rl;
|
||||
+ nl_catd result;
|
||||
+
|
||||
+ const int sz = 1024 * 1024;
|
||||
+
|
||||
+ getrlimit (RLIMIT_STACK, &rl);
|
||||
+ rl.rlim_cur = sz;
|
||||
+ setrlimit (RLIMIT_STACK, &rl);
|
||||
+
|
||||
+ buf = malloc (sz + 1);
|
||||
+ memset (buf, 'A', sz);
|
||||
+ buf[sz] = '\0';
|
||||
+ setenv ("NLSPATH", buf, 1);
|
||||
+
|
||||
+ result = catopen (buf, NL_CAT_LOCALE);
|
||||
+ assert (result == (nl_catd) -1);
|
||||
+
|
||||
+ free (buf);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
#define ROUNDS 5
|
||||
|
||||
int
|
||||
@@ -62,5 +92,6 @@ main (void)
|
||||
}
|
||||
}
|
||||
|
||||
+ result += do_bz17905 ();
|
||||
return result;
|
||||
}
|
||||
Index: git/ChangeLog
|
||||
===================================================================
|
||||
--- git.orig/ChangeLog
|
||||
+++ git/ChangeLog
|
||||
@@ -1,3 +1,11 @@
|
||||
+2015-08-08 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
+
|
||||
+ [BZ #17905]
|
||||
+ * catgets/Makefile (tst-catgets-mem): New test.
|
||||
+ * catgets/catgets.c (catopen): Don't use unbounded alloca.
|
||||
+ * catgets/open_catalog.c (__open_catalog): Likewise.
|
||||
+ * catgets/tst-catgets.c (do_bz17905): Test unbounded alloca.
|
||||
+
|
||||
2015-10-15 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
[BZ #18928]
|
||||
Index: git/NEWS
|
||||
===================================================================
|
||||
--- git.orig/NEWS
|
||||
+++ git/NEWS
|
||||
@@ -24,7 +24,7 @@ Version 2.20
|
||||
17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078,
|
||||
17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150,
|
||||
17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354,
|
||||
- 17625, 17630, 18928.
|
||||
+ 17625, 17630, 18928, 17905.
|
||||
|
||||
* The LD_POINTER_GUARD environment variable can no longer be used to
|
||||
disable the pointer guard feature. It is always enabled.
|
||||
1039
meta/recipes-core/glibc/glibc/CVE-2015-9761_1.patch
Normal file
1039
meta/recipes-core/glibc/glibc/CVE-2015-9761_1.patch
Normal file
File diff suppressed because it is too large
Load Diff
388
meta/recipes-core/glibc/glibc/CVE-2015-9761_2.patch
Normal file
388
meta/recipes-core/glibc/glibc/CVE-2015-9761_2.patch
Normal file
@@ -0,0 +1,388 @@
|
||||
From 8f5e8b01a1da2a207228f2072c934fa5918554b8 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Myers <joseph@codesourcery.com>
|
||||
Date: Fri, 4 Dec 2015 20:36:28 +0000
|
||||
Subject: [PATCH] Fix nan functions handling of payload strings (bug 16961, bug
|
||||
16962).
|
||||
|
||||
The nan, nanf and nanl functions handle payload strings by doing e.g.:
|
||||
|
||||
if (tagp[0] != '\0')
|
||||
{
|
||||
char buf[6 + strlen (tagp)];
|
||||
sprintf (buf, "NAN(%s)", tagp);
|
||||
return strtod (buf, NULL);
|
||||
}
|
||||
|
||||
This is an unbounded stack allocation based on the length of the
|
||||
argument. Furthermore, if the argument starts with an n-char-sequence
|
||||
followed by ')', that n-char-sequence is wrongly treated as
|
||||
significant for determining the payload of the resulting NaN, when ISO
|
||||
C says the call should be equivalent to strtod ("NAN", NULL), without
|
||||
being affected by that initial n-char-sequence. This patch fixes both
|
||||
those problems by using the __strtod_nan etc. functions recently
|
||||
factored out of strtod etc. for that purpose, with those functions
|
||||
being exported from libc at version GLIBC_PRIVATE.
|
||||
|
||||
Tested for x86_64, x86, mips64 and powerpc.
|
||||
|
||||
[BZ #16961]
|
||||
[BZ #16962]
|
||||
* math/s_nan.c (__nan): Use __strtod_nan instead of constructing a
|
||||
string on the stack for strtod.
|
||||
* math/s_nanf.c (__nanf): Use __strtof_nan instead of constructing
|
||||
a string on the stack for strtof.
|
||||
* math/s_nanl.c (__nanl): Use __strtold_nan instead of
|
||||
constructing a string on the stack for strtold.
|
||||
* stdlib/Versions (libc): Add __strtof_nan, __strtod_nan and
|
||||
__strtold_nan to GLIBC_PRIVATE.
|
||||
* math/test-nan-overflow.c: New file.
|
||||
* math/test-nan-payload.c: Likewise.
|
||||
* math/Makefile (tests): Add test-nan-overflow and
|
||||
test-nan-payload.
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2015-9761 patch #2
|
||||
[Yocto # 8980]
|
||||
|
||||
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8f5e8b01a1da2a207228f2072c934fa5918554b8
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
---
|
||||
ChangeLog | 17 +++++++
|
||||
NEWS | 6 +++
|
||||
math/Makefile | 3 +-
|
||||
math/s_nan.c | 9 +---
|
||||
math/s_nanf.c | 9 +---
|
||||
math/s_nanl.c | 9 +---
|
||||
math/test-nan-overflow.c | 66 +++++++++++++++++++++++++
|
||||
math/test-nan-payload.c | 122 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
stdlib/Versions | 1 +
|
||||
9 files changed, 217 insertions(+), 25 deletions(-)
|
||||
create mode 100644 math/test-nan-overflow.c
|
||||
create mode 100644 math/test-nan-payload.c
|
||||
|
||||
Index: git/ChangeLog
|
||||
===================================================================
|
||||
--- git.orig/ChangeLog
|
||||
+++ git/ChangeLog
|
||||
@@ -1,3 +1,20 @@
|
||||
+2015-12-04 Joseph Myers <joseph@codesourcery.com>
|
||||
+
|
||||
+ [BZ #16961]
|
||||
+ [BZ #16962]
|
||||
+ * math/s_nan.c (__nan): Use __strtod_nan instead of constructing a
|
||||
+ string on the stack for strtod.
|
||||
+ * math/s_nanf.c (__nanf): Use __strtof_nan instead of constructing
|
||||
+ a string on the stack for strtof.
|
||||
+ * math/s_nanl.c (__nanl): Use __strtold_nan instead of
|
||||
+ constructing a string on the stack for strtold.
|
||||
+ * stdlib/Versions (libc): Add __strtof_nan, __strtod_nan and
|
||||
+ __strtold_nan to GLIBC_PRIVATE.
|
||||
+ * math/test-nan-overflow.c: New file.
|
||||
+ * math/test-nan-payload.c: Likewise.
|
||||
+ * math/Makefile (tests): Add test-nan-overflow and
|
||||
+ test-nan-payload.
|
||||
+
|
||||
2015-11-24 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* stdlib/strtod_nan.c: New file.
|
||||
Index: git/NEWS
|
||||
===================================================================
|
||||
--- git.orig/NEWS
|
||||
+++ git/NEWS
|
||||
@@ -7,6 +7,12 @@ using `glibc' in the "product" field.
|
||||
|
||||
Version 2.21
|
||||
|
||||
+Security related changes:
|
||||
+
|
||||
+* The nan, nanf and nanl functions no longer have unbounded stack usage
|
||||
+ depending on the length of the string passed as an argument to the
|
||||
+ functions. Reported by Joseph Myers.
|
||||
+
|
||||
* The following bugs are resolved with this release:
|
||||
|
||||
6652, 10672, 12674, 12847, 12926, 13862, 14132, 14138, 14171, 14498,
|
||||
Index: git/math/s_nan.c
|
||||
===================================================================
|
||||
--- git.orig/math/s_nan.c
|
||||
+++ git/math/s_nan.c
|
||||
@@ -28,14 +28,7 @@
|
||||
double
|
||||
__nan (const char *tagp)
|
||||
{
|
||||
- if (tagp[0] != '\0')
|
||||
- {
|
||||
- char buf[6 + strlen (tagp)];
|
||||
- sprintf (buf, "NAN(%s)", tagp);
|
||||
- return strtod (buf, NULL);
|
||||
- }
|
||||
-
|
||||
- return NAN;
|
||||
+ return __strtod_nan (tagp, NULL, 0);
|
||||
}
|
||||
weak_alias (__nan, nan)
|
||||
#ifdef NO_LONG_DOUBLE
|
||||
Index: git/math/s_nanf.c
|
||||
===================================================================
|
||||
--- git.orig/math/s_nanf.c
|
||||
+++ git/math/s_nanf.c
|
||||
@@ -28,13 +28,6 @@
|
||||
float
|
||||
__nanf (const char *tagp)
|
||||
{
|
||||
- if (tagp[0] != '\0')
|
||||
- {
|
||||
- char buf[6 + strlen (tagp)];
|
||||
- sprintf (buf, "NAN(%s)", tagp);
|
||||
- return strtof (buf, NULL);
|
||||
- }
|
||||
-
|
||||
- return NAN;
|
||||
+ return __strtof_nan (tagp, NULL, 0);
|
||||
}
|
||||
weak_alias (__nanf, nanf)
|
||||
Index: git/math/s_nanl.c
|
||||
===================================================================
|
||||
--- git.orig/math/s_nanl.c
|
||||
+++ git/math/s_nanl.c
|
||||
@@ -28,13 +28,6 @@
|
||||
long double
|
||||
__nanl (const char *tagp)
|
||||
{
|
||||
- if (tagp[0] != '\0')
|
||||
- {
|
||||
- char buf[6 + strlen (tagp)];
|
||||
- sprintf (buf, "NAN(%s)", tagp);
|
||||
- return strtold (buf, NULL);
|
||||
- }
|
||||
-
|
||||
- return NAN;
|
||||
+ return __strtold_nan (tagp, NULL, 0);
|
||||
}
|
||||
weak_alias (__nanl, nanl)
|
||||
Index: git/math/test-nan-overflow.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ git/math/test-nan-overflow.c
|
||||
@@ -0,0 +1,66 @@
|
||||
+/* Test nan functions stack overflow (bug 16962).
|
||||
+ Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <math.h>
|
||||
+#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+#include <sys/resource.h>
|
||||
+
|
||||
+#define STACK_LIM 1048576
|
||||
+#define STRING_SIZE (2 * STACK_LIM)
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ int result = 0;
|
||||
+ struct rlimit lim;
|
||||
+ getrlimit (RLIMIT_STACK, &lim);
|
||||
+ lim.rlim_cur = STACK_LIM;
|
||||
+ setrlimit (RLIMIT_STACK, &lim);
|
||||
+ char *nanstr = malloc (STRING_SIZE);
|
||||
+ if (nanstr == NULL)
|
||||
+ {
|
||||
+ puts ("malloc failed, cannot test");
|
||||
+ return 77;
|
||||
+ }
|
||||
+ memset (nanstr, '0', STRING_SIZE - 1);
|
||||
+ nanstr[STRING_SIZE - 1] = 0;
|
||||
+#define NAN_TEST(TYPE, FUNC) \
|
||||
+ do \
|
||||
+ { \
|
||||
+ char *volatile p = nanstr; \
|
||||
+ volatile TYPE v = FUNC (p); \
|
||||
+ if (isnan (v)) \
|
||||
+ puts ("PASS: " #FUNC); \
|
||||
+ else \
|
||||
+ { \
|
||||
+ puts ("FAIL: " #FUNC); \
|
||||
+ result = 1; \
|
||||
+ } \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+ NAN_TEST (float, nanf);
|
||||
+ NAN_TEST (double, nan);
|
||||
+#ifndef NO_LONG_DOUBLE
|
||||
+ NAN_TEST (long double, nanl);
|
||||
+#endif
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
||||
Index: git/math/test-nan-payload.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ git/math/test-nan-payload.c
|
||||
@@ -0,0 +1,122 @@
|
||||
+/* Test nan functions payload handling (bug 16961).
|
||||
+ Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <float.h>
|
||||
+#include <math.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+/* Avoid built-in functions. */
|
||||
+#define WRAP_NAN(FUNC, STR) \
|
||||
+ ({ const char *volatile wns = (STR); FUNC (wns); })
|
||||
+#define WRAP_STRTO(FUNC, STR) \
|
||||
+ ({ const char *volatile wss = (STR); FUNC (wss, NULL); })
|
||||
+
|
||||
+#define CHECK_IS_NAN(TYPE, A) \
|
||||
+ do \
|
||||
+ { \
|
||||
+ if (isnan (A)) \
|
||||
+ puts ("PASS: " #TYPE " " #A); \
|
||||
+ else \
|
||||
+ { \
|
||||
+ puts ("FAIL: " #TYPE " " #A); \
|
||||
+ result = 1; \
|
||||
+ } \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+#define CHECK_SAME_NAN(TYPE, A, B) \
|
||||
+ do \
|
||||
+ { \
|
||||
+ if (memcmp (&(A), &(B), sizeof (A)) == 0) \
|
||||
+ puts ("PASS: " #TYPE " " #A " = " #B); \
|
||||
+ else \
|
||||
+ { \
|
||||
+ puts ("FAIL: " #TYPE " " #A " = " #B); \
|
||||
+ result = 1; \
|
||||
+ } \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+#define CHECK_DIFF_NAN(TYPE, A, B) \
|
||||
+ do \
|
||||
+ { \
|
||||
+ if (memcmp (&(A), &(B), sizeof (A)) != 0) \
|
||||
+ puts ("PASS: " #TYPE " " #A " != " #B); \
|
||||
+ else \
|
||||
+ { \
|
||||
+ puts ("FAIL: " #TYPE " " #A " != " #B); \
|
||||
+ result = 1; \
|
||||
+ } \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+/* Cannot test payloads by memcmp for formats where NaNs have padding
|
||||
+ bits. */
|
||||
+#define CAN_TEST_EQ(MANT_DIG) ((MANT_DIG) != 64 && (MANT_DIG) != 106)
|
||||
+
|
||||
+#define RUN_TESTS(TYPE, SFUNC, FUNC, MANT_DIG) \
|
||||
+ do \
|
||||
+ { \
|
||||
+ TYPE n123 = WRAP_NAN (FUNC, "123"); \
|
||||
+ CHECK_IS_NAN (TYPE, n123); \
|
||||
+ TYPE s123 = WRAP_STRTO (SFUNC, "NAN(123)"); \
|
||||
+ CHECK_IS_NAN (TYPE, s123); \
|
||||
+ TYPE n456 = WRAP_NAN (FUNC, "456"); \
|
||||
+ CHECK_IS_NAN (TYPE, n456); \
|
||||
+ TYPE s456 = WRAP_STRTO (SFUNC, "NAN(456)"); \
|
||||
+ CHECK_IS_NAN (TYPE, s456); \
|
||||
+ TYPE n123x = WRAP_NAN (FUNC, "123)"); \
|
||||
+ CHECK_IS_NAN (TYPE, n123x); \
|
||||
+ TYPE nemp = WRAP_NAN (FUNC, ""); \
|
||||
+ CHECK_IS_NAN (TYPE, nemp); \
|
||||
+ TYPE semp = WRAP_STRTO (SFUNC, "NAN()"); \
|
||||
+ CHECK_IS_NAN (TYPE, semp); \
|
||||
+ TYPE sx = WRAP_STRTO (SFUNC, "NAN"); \
|
||||
+ CHECK_IS_NAN (TYPE, sx); \
|
||||
+ if (CAN_TEST_EQ (MANT_DIG)) \
|
||||
+ CHECK_SAME_NAN (TYPE, n123, s123); \
|
||||
+ if (CAN_TEST_EQ (MANT_DIG)) \
|
||||
+ CHECK_SAME_NAN (TYPE, n456, s456); \
|
||||
+ if (CAN_TEST_EQ (MANT_DIG)) \
|
||||
+ CHECK_SAME_NAN (TYPE, nemp, semp); \
|
||||
+ if (CAN_TEST_EQ (MANT_DIG)) \
|
||||
+ CHECK_SAME_NAN (TYPE, n123x, sx); \
|
||||
+ CHECK_DIFF_NAN (TYPE, n123, n456); \
|
||||
+ CHECK_DIFF_NAN (TYPE, n123, nemp); \
|
||||
+ CHECK_DIFF_NAN (TYPE, n123, n123x); \
|
||||
+ CHECK_DIFF_NAN (TYPE, n456, nemp); \
|
||||
+ CHECK_DIFF_NAN (TYPE, n456, n123x); \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ int result = 0;
|
||||
+ RUN_TESTS (float, strtof, nanf, FLT_MANT_DIG);
|
||||
+ RUN_TESTS (double, strtod, nan, DBL_MANT_DIG);
|
||||
+#ifndef NO_LONG_DOUBLE
|
||||
+ RUN_TESTS (long double, strtold, nanl, LDBL_MANT_DIG);
|
||||
+#endif
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
||||
Index: git/stdlib/Versions
|
||||
===================================================================
|
||||
--- git.orig/stdlib/Versions
|
||||
+++ git/stdlib/Versions
|
||||
@@ -118,5 +118,6 @@ libc {
|
||||
# Used from other libraries
|
||||
__libc_secure_getenv;
|
||||
__call_tls_dtors;
|
||||
+ __strtof_nan; __strtod_nan; __strtold_nan;
|
||||
}
|
||||
}
|
||||
Index: git/math/Makefile
|
||||
===================================================================
|
||||
--- git.orig/math/Makefile
|
||||
+++ git/math/Makefile
|
||||
@@ -92,7 +92,9 @@ tests = test-matherr test-fenv atest-exp
|
||||
test-misc test-fpucw test-fpucw-ieee tst-definitions test-tgmath \
|
||||
test-tgmath-ret bug-nextafter bug-nexttoward bug-tgmath1 \
|
||||
test-tgmath-int test-tgmath2 test-powl tst-CMPLX tst-CMPLX2 test-snan \
|
||||
- test-fenv-tls test-fenv-preserve test-fenv-return $(tests-static)
|
||||
+ test-fenv-tls test-fenv-preserve test-fenv-return \
|
||||
+ test-nan-overflow test-nan-payload \
|
||||
+ $(tests-static)
|
||||
tests-static = test-fpucw-static test-fpucw-ieee-static
|
||||
# We do the `long double' tests only if this data type is available and
|
||||
# distinct from `double'.
|
||||
@@ -45,7 +45,16 @@ CVEPATCHES = "\
|
||||
file://CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch \
|
||||
file://CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch \
|
||||
file://CVE-2014-9402_endless-loop-in-getaddr_r.patch \
|
||||
"
|
||||
file://CVE-2015-1781-resolv-nss_dns-dns-host.c-buffer-overf.patch \
|
||||
file://CVE-2015-1472-wscanf-allocates-too-little-memory.patch \
|
||||
file://CVE-2015-7547.patch \
|
||||
file://CVE-2015-8777.patch \
|
||||
file://CVE-2015-8779.patch \
|
||||
file://CVE-2015-9761_1.patch \
|
||||
file://CVE-2015-9761_2.patch \
|
||||
file://CVE-2015-8776.patch \
|
||||
"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
|
||||
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||
file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
|
||||
|
||||
@@ -21,7 +21,7 @@ IMAGE_FSTYPES = "vmdk"
|
||||
|
||||
inherit core-image
|
||||
|
||||
SRCREV ?= "c4ebd5d28b75e844a1bd146dbfac205f64cc8915"
|
||||
SRCREV ?= "19f07a31a6bb423fd2993c9f261ae1e551bc8b0a"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=dizzy \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -97,7 +97,11 @@ rm -f /etc/udev/scripts/mount*
|
||||
umount /dev/${device}* 2> /dev/null || /bin/true
|
||||
|
||||
mkdir -p /tmp
|
||||
cat /proc/mounts > /etc/mtab
|
||||
|
||||
# Create /etc/mtab if not present
|
||||
if [ ! -e /etc/mtab ]; then
|
||||
cat /proc/mounts > /etc/mtab
|
||||
fi
|
||||
|
||||
disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
|
||||
|
||||
@@ -199,11 +203,11 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
|
||||
fi
|
||||
|
||||
if [ -d /run/media/$1/loader ]; then
|
||||
GUMMIBOOT_CFGS="/tgt_root/loader/entries/*.conf"
|
||||
GUMMIBOOT_CFGS="/boot/loader/entries/*.conf"
|
||||
# copy config files for gummiboot
|
||||
cp -dr /run/media/$1/loader /tgt_root
|
||||
cp -dr /run/media/$1/loader /boot
|
||||
# delete the install entry
|
||||
rm -f /tgt_root/loader/entries/install.conf
|
||||
rm -f /boot/loader/entries/install.conf
|
||||
# delete the initrd lines
|
||||
sed -i "/initrd /d" $GUMMIBOOT_CFGS
|
||||
# delete any LABEL= strings
|
||||
|
||||
@@ -22,6 +22,10 @@ SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
|
||||
file://python-sitepackages-dir.patch \
|
||||
file://libxml-m4-use-pkgconfig.patch \
|
||||
file://libxml2-CVE-2014-3660.patch \
|
||||
file://0001-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch \
|
||||
file://CVE-2015-7942.patch \
|
||||
file://CVE-2015-8035.patch \
|
||||
file://CVE-2015-8241.patch \
|
||||
"
|
||||
|
||||
BINCONFIG = "${bindir}/xml2-config"
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
From 213f1fe0d76d30eaed6e5853057defc43e6df2c9 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Tue, 14 Apr 2015 17:41:48 +0800
|
||||
Subject: [PATCH] CVE-2015-1819 Enforce the reader to run in constant memory
|
||||
|
||||
One of the operation on the reader could resolve entities
|
||||
leading to the classic expansion issue. Make sure the
|
||||
buffer used for xmlreader operation is bounded.
|
||||
Introduce a new allocation type for the buffers for this effect.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
|
||||
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
|
||||
---
|
||||
buf.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
include/libxml/tree.h | 3 ++-
|
||||
xmlreader.c | 20 +++++++++++++++++++-
|
||||
3 files changed, 63 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/buf.c b/buf.c
|
||||
index 6efc7b6..07922ff 100644
|
||||
--- a/buf.c
|
||||
+++ b/buf.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/tree.h>
|
||||
+#include <libxml/parserInternals.h> /* for XML_MAX_TEXT_LENGTH */
|
||||
#include "buf.h"
|
||||
|
||||
#define WITH_BUFFER_COMPAT
|
||||
@@ -299,7 +300,8 @@ xmlBufSetAllocationScheme(xmlBufPtr buf,
|
||||
if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
|
||||
(scheme == XML_BUFFER_ALLOC_EXACT) ||
|
||||
(scheme == XML_BUFFER_ALLOC_HYBRID) ||
|
||||
- (scheme == XML_BUFFER_ALLOC_IMMUTABLE)) {
|
||||
+ (scheme == XML_BUFFER_ALLOC_IMMUTABLE) ||
|
||||
+ (scheme == XML_BUFFER_ALLOC_BOUNDED)) {
|
||||
buf->alloc = scheme;
|
||||
if (buf->buffer)
|
||||
buf->buffer->alloc = scheme;
|
||||
@@ -458,6 +460,18 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
|
||||
size = buf->use + len + 100;
|
||||
#endif
|
||||
|
||||
+ if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
|
||||
+ /*
|
||||
+ * Used to provide parsing limits
|
||||
+ */
|
||||
+ if ((buf->use + len >= XML_MAX_TEXT_LENGTH) ||
|
||||
+ (buf->size >= XML_MAX_TEXT_LENGTH)) {
|
||||
+ xmlBufMemoryError(buf, "buffer error: text too long\n");
|
||||
+ return(0);
|
||||
+ }
|
||||
+ if (size >= XML_MAX_TEXT_LENGTH)
|
||||
+ size = XML_MAX_TEXT_LENGTH;
|
||||
+ }
|
||||
if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
|
||||
size_t start_buf = buf->content - buf->contentIO;
|
||||
|
||||
@@ -739,6 +753,15 @@ xmlBufResize(xmlBufPtr buf, size_t size)
|
||||
CHECK_COMPAT(buf)
|
||||
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
|
||||
+ if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
|
||||
+ /*
|
||||
+ * Used to provide parsing limits
|
||||
+ */
|
||||
+ if (size >= XML_MAX_TEXT_LENGTH) {
|
||||
+ xmlBufMemoryError(buf, "buffer error: text too long\n");
|
||||
+ return(0);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/* Don't resize if we don't have to */
|
||||
if (size < buf->size)
|
||||
@@ -867,6 +890,15 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
|
||||
|
||||
needSize = buf->use + len + 2;
|
||||
if (needSize > buf->size){
|
||||
+ if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
|
||||
+ /*
|
||||
+ * Used to provide parsing limits
|
||||
+ */
|
||||
+ if (needSize >= XML_MAX_TEXT_LENGTH) {
|
||||
+ xmlBufMemoryError(buf, "buffer error: text too long\n");
|
||||
+ return(-1);
|
||||
+ }
|
||||
+ }
|
||||
if (!xmlBufResize(buf, needSize)){
|
||||
xmlBufMemoryError(buf, "growing buffer");
|
||||
return XML_ERR_NO_MEMORY;
|
||||
@@ -938,6 +970,15 @@ xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len) {
|
||||
}
|
||||
needSize = buf->use + len + 2;
|
||||
if (needSize > buf->size){
|
||||
+ if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
|
||||
+ /*
|
||||
+ * Used to provide parsing limits
|
||||
+ */
|
||||
+ if (needSize >= XML_MAX_TEXT_LENGTH) {
|
||||
+ xmlBufMemoryError(buf, "buffer error: text too long\n");
|
||||
+ return(-1);
|
||||
+ }
|
||||
+ }
|
||||
if (!xmlBufResize(buf, needSize)){
|
||||
xmlBufMemoryError(buf, "growing buffer");
|
||||
return XML_ERR_NO_MEMORY;
|
||||
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
|
||||
index 2f90717..4a9b3bc 100644
|
||||
--- a/include/libxml/tree.h
|
||||
+++ b/include/libxml/tree.h
|
||||
@@ -76,7 +76,8 @@ typedef enum {
|
||||
XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
|
||||
XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
|
||||
XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
|
||||
- XML_BUFFER_ALLOC_HYBRID /* exact up to a threshold, and doubleit thereafter */
|
||||
+ XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
|
||||
+ XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
|
||||
} xmlBufferAllocationScheme;
|
||||
|
||||
/**
|
||||
diff --git a/xmlreader.c b/xmlreader.c
|
||||
index f19e123..471e7e2 100644
|
||||
--- a/xmlreader.c
|
||||
+++ b/xmlreader.c
|
||||
@@ -2091,6 +2091,9 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
|
||||
"xmlNewTextReader : malloc failed\n");
|
||||
return(NULL);
|
||||
}
|
||||
+ /* no operation on a reader should require a huge buffer */
|
||||
+ xmlBufSetAllocationScheme(ret->buffer,
|
||||
+ XML_BUFFER_ALLOC_BOUNDED);
|
||||
ret->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
|
||||
if (ret->sax == NULL) {
|
||||
xmlBufFree(ret->buffer);
|
||||
@@ -3616,6 +3619,7 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
|
||||
return(((xmlNsPtr) node)->href);
|
||||
case XML_ATTRIBUTE_NODE:{
|
||||
xmlAttrPtr attr = (xmlAttrPtr) node;
|
||||
+ const xmlChar *ret;
|
||||
|
||||
if ((attr->children != NULL) &&
|
||||
(attr->children->type == XML_TEXT_NODE) &&
|
||||
@@ -3629,10 +3633,21 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
|
||||
"xmlTextReaderSetup : malloc failed\n");
|
||||
return (NULL);
|
||||
}
|
||||
+ xmlBufSetAllocationScheme(reader->buffer,
|
||||
+ XML_BUFFER_ALLOC_BOUNDED);
|
||||
} else
|
||||
xmlBufEmpty(reader->buffer);
|
||||
xmlBufGetNodeContent(reader->buffer, node);
|
||||
- return(xmlBufContent(reader->buffer));
|
||||
+ ret = xmlBufContent(reader->buffer);
|
||||
+ if (ret == NULL) {
|
||||
+ /* error on the buffer best to reallocate */
|
||||
+ xmlBufFree(reader->buffer);
|
||||
+ reader->buffer = xmlBufCreateSize(100);
|
||||
+ xmlBufSetAllocationScheme(reader->buffer,
|
||||
+ XML_BUFFER_ALLOC_BOUNDED);
|
||||
+ ret = BAD_CAST "";
|
||||
+ }
|
||||
+ return(ret);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -5131,6 +5146,9 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
|
||||
"xmlTextReaderSetup : malloc failed\n");
|
||||
return (-1);
|
||||
}
|
||||
+ /* no operation on a reader should require a huge buffer */
|
||||
+ xmlBufSetAllocationScheme(reader->buffer,
|
||||
+ XML_BUFFER_ALLOC_BOUNDED);
|
||||
if (reader->sax == NULL)
|
||||
reader->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
|
||||
if (reader->sax == NULL) {
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
58
meta/recipes-core/libxml/libxml2/CVE-2015-7942.patch
Normal file
58
meta/recipes-core/libxml/libxml2/CVE-2015-7942.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
From 9b8512337d14c8ddf662fcb98b0135f225a1c489 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Mon, 23 Feb 2015 11:29:20 +0800
|
||||
Subject: Cleanup conditional section error handling
|
||||
|
||||
For https://bugzilla.gnome.org/show_bug.cgi?id=744980
|
||||
|
||||
The error handling of Conditional Section also need to be
|
||||
straightened as the structure of the document can't be
|
||||
guessed on a failure there and it's better to stop parsing
|
||||
as further errors are likely to be irrelevant.
|
||||
|
||||
Fixes CVE-2015-7942.
|
||||
Upstream-Status: Backport
|
||||
|
||||
Upstream patch:
|
||||
https://git.gnome.org/browse/libxml2/commit/
|
||||
?id=9b8512337d14c8ddf662fcb98b0135f225a1c489
|
||||
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
---
|
||||
parser.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/parser.c b/parser.c
|
||||
index bbe97eb..fe603ac 100644
|
||||
--- a/parser.c
|
||||
+++ b/parser.c
|
||||
@@ -6770,6 +6770,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
SKIP_BLANKS;
|
||||
if (RAW != '[') {
|
||||
xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
|
||||
+ xmlStopParser(ctxt);
|
||||
+ return;
|
||||
} else {
|
||||
if (ctxt->input->id != id) {
|
||||
xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
|
||||
@@ -6830,6 +6832,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
SKIP_BLANKS;
|
||||
if (RAW != '[') {
|
||||
xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
|
||||
+ xmlStopParser(ctxt);
|
||||
+ return;
|
||||
} else {
|
||||
if (ctxt->input->id != id) {
|
||||
xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
|
||||
@@ -6885,6 +6889,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
|
||||
} else {
|
||||
xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID_KEYWORD, NULL);
|
||||
+ xmlStopParser(ctxt);
|
||||
+ return;
|
||||
}
|
||||
|
||||
if (RAW == 0)
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
||||
35
meta/recipes-core/libxml/libxml2/CVE-2015-8035.patch
Normal file
35
meta/recipes-core/libxml/libxml2/CVE-2015-8035.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From f0709e3ca8f8947f2d91ed34e92e38a4c23eae63 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Tue, 3 Nov 2015 15:31:25 +0800
|
||||
Subject: CVE-2015-8035 Fix XZ compression support loop
|
||||
|
||||
For https://bugzilla.gnome.org/show_bug.cgi?id=757466
|
||||
DoS when parsing specially crafted XML document if XZ support
|
||||
is compiled in (which wasn't the case for 2.9.2 and master since
|
||||
Nov 2013, fixed in next commit !)
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
|
||||
---
|
||||
xzlib.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/xzlib.c b/xzlib.c
|
||||
index 0dcb9f4..1fab546 100644
|
||||
--- a/xzlib.c
|
||||
+++ b/xzlib.c
|
||||
@@ -581,6 +581,10 @@ xz_decomp(xz_statep state)
|
||||
xz_error(state, LZMA_DATA_ERROR, "compressed data error");
|
||||
return -1;
|
||||
}
|
||||
+ if (ret == LZMA_PROG_ERROR) {
|
||||
+ xz_error(state, LZMA_PROG_ERROR, "compression error");
|
||||
+ return -1;
|
||||
+ }
|
||||
} while (strm->avail_out && ret != LZMA_STREAM_END);
|
||||
|
||||
/* update available output and crc check value */
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
||||
41
meta/recipes-core/libxml/libxml2/CVE-2015-8241.patch
Normal file
41
meta/recipes-core/libxml/libxml2/CVE-2015-8241.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From ab2b9a93ff19cedde7befbf2fcc48c6e352b6cbe Mon Sep 17 00:00:00 2001
|
||||
From: Hugh Davenport <hugh@allthethings.co.nz>
|
||||
Date: Tue, 3 Nov 2015 20:40:49 +0800
|
||||
Subject: Avoid extra processing of MarkupDecl when EOF
|
||||
|
||||
For https://bugzilla.gnome.org/show_bug.cgi?id=756263
|
||||
|
||||
One place where ctxt->instate == XML_PARSER_EOF whic was set up
|
||||
by entity detection issues doesn't get noticed, and even overrided
|
||||
|
||||
Fixes CVE-2015-8241.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
---
|
||||
parser.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/parser.c b/parser.c
|
||||
index d67b300..134afe7 100644
|
||||
--- a/parser.c
|
||||
+++ b/parser.c
|
||||
@@ -6972,6 +6972,14 @@ xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) {
|
||||
xmlParsePI(ctxt);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /*
|
||||
+ * detect requirement to exit there and act accordingly
|
||||
+ * and avoid having instate overriden later on
|
||||
+ */
|
||||
+ if (ctxt->instate == XML_PARSER_EOF)
|
||||
+ return;
|
||||
+
|
||||
/*
|
||||
* This is only for internal subset. On external entities,
|
||||
* the replacement is done before parsing stage
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
||||
@@ -27,6 +27,7 @@ ENABLE_WIDEC ?= "true"
|
||||
# for target objects. But it must be set manually for native and sdk
|
||||
# builds.
|
||||
BUILD_CPPFLAGS += "-D_GNU_SOURCE"
|
||||
BUILD_CPPFLAGS_append_virtclass-native = " -P"
|
||||
|
||||
# natives don't generally look in base_libdir
|
||||
base_libdir_class-native = "${libdir}"
|
||||
|
||||
@@ -40,6 +40,7 @@ SRC_URI = "\
|
||||
file://binutils_CVE-2014-8503.patch \
|
||||
file://binutils_CVE-2014-8504.patch \
|
||||
file://binutils_CVE-2014-8737.patch \
|
||||
file://Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "e0f71a7b2ddab0f8612336ac81d9636b"
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
From 360ddc990a941bc506576f45a3858d38f508410b Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Fri, 12 Sep 2014 09:46:30 +0930
|
||||
Subject: [PATCH] Fix tc-i386.c -Werror=logical-not-parentheses error
|
||||
|
||||
* config/tc-i386.c (match_template): Remove redundant "!!" testing
|
||||
single-bit bitfields.
|
||||
(build_modrm_byte): Don't compare single-bit bitfields to "1".
|
||||
|
||||
Upstream commit:
|
||||
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=ac4eb736520174305bf6e691827f7473b858cff1
|
||||
|
||||
Manually resolved gas/ChangeLog conflict by placing the change at the
|
||||
top of the file.
|
||||
gas/config/tc-i386.c patched with offset
|
||||
|
||||
Signed-off-by: George McCollister <george.mccollister@gmail.com>
|
||||
---
|
||||
gas/ChangeLog | 6 ++++++
|
||||
gas/config/tc-i386.c | 12 ++++++------
|
||||
2 files changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gas/ChangeLog b/gas/ChangeLog
|
||||
index 7fafa26..c6e60c9 100644
|
||||
--- a/gas/ChangeLog
|
||||
+++ b/gas/ChangeLog
|
||||
@@ -1,3 +1,9 @@
|
||||
+2014-09-12 Alan Modra <amodra@gmail.com>
|
||||
+
|
||||
+ * config/tc-i386.c (match_template): Remove redundant "!!" testing
|
||||
+ single-bit bitfields.
|
||||
+ (build_modrm_byte): Don't compare single-bit bitfields to "1".
|
||||
+
|
||||
2013-11-18 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* config/tc-i386.c (lex_got): Add a dummy "int bnd_prefix"
|
||||
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
|
||||
index 3c423da..4464091 100644
|
||||
--- a/gas/config/tc-i386.c
|
||||
+++ b/gas/config/tc-i386.c
|
||||
@@ -4672,9 +4672,9 @@ match_template (void)
|
||||
&& !operand_types[0].bitfield.regymm
|
||||
&& !operand_types[0].bitfield.regzmm)
|
||||
|| (!operand_types[t->operands > 1].bitfield.regmmx
|
||||
- && !!operand_types[t->operands > 1].bitfield.regxmm
|
||||
- && !!operand_types[t->operands > 1].bitfield.regymm
|
||||
- && !!operand_types[t->operands > 1].bitfield.regzmm))
|
||||
+ && operand_types[t->operands > 1].bitfield.regxmm
|
||||
+ && operand_types[t->operands > 1].bitfield.regymm
|
||||
+ && operand_types[t->operands > 1].bitfield.regzmm))
|
||||
&& (t->base_opcode != 0x0fc7
|
||||
|| t->extension_opcode != 1 /* cmpxchg8b */))
|
||||
continue;
|
||||
@@ -4689,7 +4689,7 @@ match_template (void)
|
||||
&& ((!operand_types[0].bitfield.regmmx
|
||||
&& !operand_types[0].bitfield.regxmm)
|
||||
|| (!operand_types[t->operands > 1].bitfield.regmmx
|
||||
- && !!operand_types[t->operands > 1].bitfield.regxmm)))
|
||||
+ && operand_types[t->operands > 1].bitfield.regxmm)))
|
||||
continue;
|
||||
|
||||
/* Do not verify operands when there are none. */
|
||||
@@ -6139,8 +6139,8 @@ build_modrm_byte (void)
|
||||
op = i.tm.operand_types[vvvv];
|
||||
op.bitfield.regmem = 0;
|
||||
if ((dest + 1) >= i.operands
|
||||
- || (op.bitfield.reg32 != 1
|
||||
- && !op.bitfield.reg64 != 1
|
||||
+ || (!op.bitfield.reg32
|
||||
+ && op.bitfield.reg64
|
||||
&& !operand_type_equal (&op, ®xmm)
|
||||
&& !operand_type_equal (&op, ®ymm)
|
||||
&& !operand_type_equal (&op, ®zmm)
|
||||
--
|
||||
2.4.3
|
||||
|
||||
45
meta/recipes-devtools/dpkg/dpkg/tarfix.patch
Normal file
45
meta/recipes-devtools/dpkg/dpkg/tarfix.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
They managed to 'break' tar. Again. Sorry, they fixed a regression
|
||||
which broke dpkg-deb.
|
||||
|
||||
The addition of:
|
||||
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=163e96a0e619a900eab6de827c7c5749ecc9d3f2
|
||||
("Bugfix: entries read from the -T file did not get proper matching_flag.")
|
||||
means that the no-recursion option gets lost. This leads to many files getting included
|
||||
multiple times, along with files which shouldn't be there.
|
||||
|
||||
The commit message is horrendous. The patch actually makes the option positional
|
||||
(as documnted since 2003) and therefore doesn't affect the input from the -T option.
|
||||
|
||||
Moving the --no-reursion option to earlier in the command avoids the bug.
|
||||
|
||||
The bug was not present in tar 1.28 however it has been backported in at least
|
||||
Fedora 22 and heading into Fedora 21.
|
||||
|
||||
Redhat reports of issue:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1230762 [tar]
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1241508 [dpkg]
|
||||
|
||||
Discussion of bug in upstream tar:
|
||||
http://www.mail-archive.com/bug-tar@gnu.org/msg04799.html
|
||||
|
||||
Yocto bug:
|
||||
https://bugzilla.yoctoproject.org/show_bug.cgi?id=7988
|
||||
|
||||
Upstream-Status: Submitted [have mailed dpkg maintainer about this]
|
||||
|
||||
RP
|
||||
2015/7/13
|
||||
|
||||
Index: dpkg-1.17.4/dpkg-deb/build.c
|
||||
===================================================================
|
||||
--- dpkg-1.17.4.orig/dpkg-deb/build.c
|
||||
+++ dpkg-1.17.4/dpkg-deb/build.c
|
||||
@@ -598,7 +598,7 @@ do_build(const char *const *argv)
|
||||
m_dup2(p2[1],1); close(p2[0]); close(p2[1]);
|
||||
if (chdir(dir))
|
||||
ohshite(_("failed to chdir to `%.255s'"), dir);
|
||||
- execlp(TAR, "tar", "-cf", "-", "--format=gnu", "--null", "-T", "-", "--no-recursion", NULL);
|
||||
+ execlp(TAR, "tar", "-cf", "-", "--format=gnu", "--null", "--no-recursion", "-T", "-", NULL);
|
||||
ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
|
||||
}
|
||||
close(p1[0]);
|
||||
@@ -14,6 +14,7 @@ SRC_URI += "file://noman.patch \
|
||||
file://no-vla-warning.patch \
|
||||
file://dpkg-1.17.4-CVE-2014-0471.patch \
|
||||
file://dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch \
|
||||
file://tarfix.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "cc25086e1e3bd9512a95f14cfe9002e1"
|
||||
|
||||
@@ -54,6 +54,8 @@ do_install () {
|
||||
oe_multilib_header ext2fs/ext2_types.h
|
||||
install -d ${D}${base_bindir}
|
||||
mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
|
||||
|
||||
install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
|
||||
}
|
||||
|
||||
do_install_append_class-target() {
|
||||
|
||||
57
meta/recipes-devtools/qemu/qemu/CVE-2014-7840.patch
Normal file
57
meta/recipes-devtools/qemu/qemu/CVE-2014-7840.patch
Normal file
@@ -0,0 +1,57 @@
|
||||
From 0be839a2701369f669532ea5884c15bead1c6e08 Mon Sep 17 00:00:00 2001
|
||||
From: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
Date: Wed, 12 Nov 2014 11:44:39 +0200
|
||||
Subject: [PATCH] migration: fix parameter validation on ram load
|
||||
|
||||
During migration, the values read from migration stream during ram load
|
||||
are not validated. Especially offset in host_from_stream_offset() and
|
||||
also the length of the writes in the callers of said function.
|
||||
|
||||
To fix this, we need to make sure that the [offset, offset + length]
|
||||
range fits into one of the allocated memory regions.
|
||||
|
||||
Validating addr < len should be sufficient since data seems to always be
|
||||
managed in TARGET_PAGE_SIZE chunks.
|
||||
|
||||
Fixes: CVE-2014-7840
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Note: follow-up patches add extra checks on each block->host access.
|
||||
|
||||
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
---
|
||||
arch_init.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch_init.c b/arch_init.c
|
||||
index 88a5ba0..593a990 100644
|
||||
--- a/arch_init.c
|
||||
+++ b/arch_init.c
|
||||
@@ -1006,7 +1006,7 @@ static inline void *host_from_stream_offset(QEMUFile *f,
|
||||
uint8_t len;
|
||||
|
||||
if (flags & RAM_SAVE_FLAG_CONTINUE) {
|
||||
- if (!block) {
|
||||
+ if (!block || block->length <= offset) {
|
||||
error_report("Ack, bad migration stream!");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1019,8 +1019,9 @@ static inline void *host_from_stream_offset(QEMUFile *f,
|
||||
id[len] = 0;
|
||||
|
||||
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
|
||||
- if (!strncmp(id, block->idstr, sizeof(id)))
|
||||
+ if (!strncmp(id, block->idstr, sizeof(id)) && block->length > offset) {
|
||||
return memory_region_get_ram_ptr(block->mr) + offset;
|
||||
+ }
|
||||
}
|
||||
|
||||
error_report("Can't find block %s!", id);
|
||||
--
|
||||
1.9.1
|
||||
|
||||
92
meta/recipes-devtools/qemu/qemu/qemu-CVE-2015-3456.patch
Normal file
92
meta/recipes-devtools/qemu/qemu/qemu-CVE-2015-3456.patch
Normal file
@@ -0,0 +1,92 @@
|
||||
qemu: CVE-2015-3456
|
||||
|
||||
the patch comes from:
|
||||
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-3456
|
||||
http://git.qemu.org/?p=qemu.git;a=commit;h=e907746266721f305d67bc0718795fedee2e824c
|
||||
|
||||
fdc: force the fifo access to be in bounds of the allocated buffer
|
||||
|
||||
During processing of certain commands such as FD_CMD_READ_ID and
|
||||
FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could
|
||||
get out of bounds leading to memory corruption with values coming
|
||||
from the guest.
|
||||
|
||||
Fix this by making sure that the index is always bounded by the
|
||||
allocated memory.
|
||||
|
||||
This is CVE-2015-3456.
|
||||
|
||||
Signed-off-by: Petr Matousek <pmatouse@redhat.com>
|
||||
Reviewed-by: John Snow <jsnow@redhat.com>
|
||||
Signed-off-by: John Snow <jsnow@redhat.com>
|
||||
Signed-off-by: Li Wang <li.wang@windriver.com>
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
---
|
||||
hw/block/fdc.c | 17 +++++++++++------
|
||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
|
||||
index 490d127..045459e 100644
|
||||
--- a/hw/block/fdc.c
|
||||
+++ b/hw/block/fdc.c
|
||||
@@ -1436,7 +1436,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl)
|
||||
{
|
||||
FDrive *cur_drv;
|
||||
uint32_t retval = 0;
|
||||
- int pos;
|
||||
+ uint32_t pos;
|
||||
|
||||
cur_drv = get_cur_drv(fdctrl);
|
||||
fdctrl->dsr &= ~FD_DSR_PWRDOWN;
|
||||
@@ -1445,8 +1445,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl)
|
||||
return 0;
|
||||
}
|
||||
pos = fdctrl->data_pos;
|
||||
+ pos %= FD_SECTOR_LEN;
|
||||
if (fdctrl->msr & FD_MSR_NONDMA) {
|
||||
- pos %= FD_SECTOR_LEN;
|
||||
if (pos == 0) {
|
||||
if (fdctrl->data_pos != 0)
|
||||
if (!fdctrl_seek_to_next_sect(fdctrl, cur_drv)) {
|
||||
@@ -1790,10 +1790,13 @@ static void fdctrl_handle_option(FDCtrl *fdctrl, int direction)
|
||||
static void fdctrl_handle_drive_specification_command(FDCtrl *fdctrl, int direction)
|
||||
{
|
||||
FDrive *cur_drv = get_cur_drv(fdctrl);
|
||||
+ uint32_t pos;
|
||||
|
||||
- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80) {
|
||||
+ pos = fdctrl->data_pos - 1;
|
||||
+ pos %= FD_SECTOR_LEN;
|
||||
+ if (fdctrl->fifo[pos] & 0x80) {
|
||||
/* Command parameters done */
|
||||
- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x40) {
|
||||
+ if (fdctrl->fifo[pos] & 0x40) {
|
||||
fdctrl->fifo[0] = fdctrl->fifo[1];
|
||||
fdctrl->fifo[2] = 0;
|
||||
fdctrl->fifo[3] = 0;
|
||||
@@ -1893,7 +1896,7 @@ static uint8_t command_to_handler[256];
|
||||
static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value)
|
||||
{
|
||||
FDrive *cur_drv;
|
||||
- int pos;
|
||||
+ uint32_t pos;
|
||||
|
||||
/* Reset mode */
|
||||
if (!(fdctrl->dor & FD_DOR_nRESET)) {
|
||||
@@ -1941,7 +1944,9 @@ static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value)
|
||||
}
|
||||
|
||||
FLOPPY_DPRINTF("%s: %02x\n", __func__, value);
|
||||
- fdctrl->fifo[fdctrl->data_pos++] = value;
|
||||
+ pos = fdctrl->data_pos++;
|
||||
+ pos %= FD_SECTOR_LEN;
|
||||
+ fdctrl->fifo[pos] = value;
|
||||
if (fdctrl->data_pos == fdctrl->data_len) {
|
||||
/* We now have all parameters
|
||||
* and will be able to treat the command
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
48
meta/recipes-devtools/qemu/qemu/slirp-CVE-2014-3640.patch
Normal file
48
meta/recipes-devtools/qemu/qemu/slirp-CVE-2014-3640.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
From 9a72433843d912a45046959b1953861211d1838d Mon Sep 17 00:00:00 2001
|
||||
From: Petr Matousek <pmatouse@redhat.com>
|
||||
Date: Thu, 18 Sep 2014 08:35:37 +0200
|
||||
Subject: [PATCH] slirp: udp: fix NULL pointer dereference because of
|
||||
uninitialized socket
|
||||
|
||||
When guest sends udp packet with source port and source addr 0,
|
||||
uninitialized socket is picked up when looking for matching and already
|
||||
created udp sockets, and later passed to sosendto() where NULL pointer
|
||||
dereference is hit during so->slirp->vnetwork_mask.s_addr access.
|
||||
|
||||
Fix this by checking that the socket is not just a socket stub.
|
||||
|
||||
This is CVE-2014-3640.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Petr Matousek <pmatouse@redhat.com>
|
||||
Reported-by: Xavier Mehrenberger <xavier.mehrenberger@airbus.com>
|
||||
Reported-by: Stephane Duverger <stephane.duverger@eads.net>
|
||||
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
|
||||
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
|
||||
Message-id: 20140918063537.GX9321@dhcp-25-225.brq.redhat.com
|
||||
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
||||
(cherry picked from commit 01f7cecf0037997cb0e58ec0d56bf9b5a6f7cb2a)
|
||||
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
---
|
||||
slirp/udp.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/slirp/udp.c b/slirp/udp.c
|
||||
index 8cc6cb6..f77e00f 100644
|
||||
--- a/slirp/udp.c
|
||||
+++ b/slirp/udp.c
|
||||
@@ -152,7 +152,7 @@ udp_input(register struct mbuf *m, int iphlen)
|
||||
* Locate pcb for datagram.
|
||||
*/
|
||||
so = slirp->udp_last_so;
|
||||
- if (so->so_lport != uh->uh_sport ||
|
||||
+ if (so == &slirp->udb || so->so_lport != uh->uh_sport ||
|
||||
so->so_laddr.s_addr != ip->ip_src.s_addr) {
|
||||
struct socket *tmp;
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
||||
53
meta/recipes-devtools/qemu/qemu/vnc-CVE-2014-7815.patch
Normal file
53
meta/recipes-devtools/qemu/qemu/vnc-CVE-2014-7815.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From b2f1d90530301d7915dddc8a750063757675b21a Mon Sep 17 00:00:00 2001
|
||||
From: Petr Matousek <pmatouse@redhat.com>
|
||||
Date: Mon, 27 Oct 2014 12:41:44 +0100
|
||||
Subject: [PATCH] vnc: sanitize bits_per_pixel from the client
|
||||
|
||||
bits_per_pixel that are less than 8 could result in accessing
|
||||
non-initialized buffers later in the code due to the expectation
|
||||
that bytes_per_pixel value that is used to initialize these buffers is
|
||||
never zero.
|
||||
|
||||
To fix this check that bits_per_pixel from the client is one of the
|
||||
values that the rfb protocol specification allows.
|
||||
|
||||
This is CVE-2014-7815.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Petr Matousek <pmatouse@redhat.com>
|
||||
|
||||
[ kraxel: apply codestyle fix ]
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit e6908bfe8e07f2b452e78e677da1b45b1c0f6829)
|
||||
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
||||
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
|
||||
---
|
||||
ui/vnc.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/ui/vnc.c b/ui/vnc.c
|
||||
index f8d9b7d..87e34ae 100644
|
||||
--- a/ui/vnc.c
|
||||
+++ b/ui/vnc.c
|
||||
@@ -2026,6 +2026,16 @@ static void set_pixel_format(VncState *vs,
|
||||
return;
|
||||
}
|
||||
|
||||
+ switch (bits_per_pixel) {
|
||||
+ case 8:
|
||||
+ case 16:
|
||||
+ case 32:
|
||||
+ break;
|
||||
+ default:
|
||||
+ vnc_client_error(vs);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
vs->client_pf.rmax = red_max;
|
||||
vs->client_pf.rbits = hweight_long(red_max);
|
||||
vs->client_pf.rshift = red_shift;
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -7,6 +7,10 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
|
||||
file://qemu-enlarge-env-entry-size.patch \
|
||||
file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
|
||||
file://0001-Back-porting-security-fix-CVE-2014-5388.patch \
|
||||
file://qemu-CVE-2015-3456.patch \
|
||||
file://CVE-2014-7840.patch \
|
||||
file://vnc-CVE-2014-7815.patch \
|
||||
file://slirp-CVE-2014-3640.patch \
|
||||
"
|
||||
SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
|
||||
SRC_URI[md5sum] = "6726977292b448cbc7f89998fac6983b"
|
||||
|
||||
109
meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch
Normal file
109
meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch
Normal file
@@ -0,0 +1,109 @@
|
||||
From 08105acda1da63d32fbb18596a3d6c3e0aa106d1 Mon Sep 17 00:00:00 2001
|
||||
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
|
||||
Date: Wed, 10 Jun 2015 14:36:56 +0000
|
||||
Subject: [PATCH 2/2] rpm: CVE-2013-6435
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Reference:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2013-6435
|
||||
|
||||
Description:
|
||||
It was found that RPM wrote file contents to the target installation
|
||||
directory under a temporary name, and verified its cryptographic signature
|
||||
only after the temporary file has been written completely. Under certain
|
||||
conditions, the system interprets the unverified temporary file contents
|
||||
and extracts commands from it. This could allow an attacker to modify
|
||||
signed RPM files in such a way that they would execute code chosen
|
||||
by the attacker during package installation.
|
||||
|
||||
Original Patch:
|
||||
https://bugzilla.redhat.com/attachment.cgi?id=956207
|
||||
|
||||
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
|
||||
---
|
||||
lib/fsm.c | 2 +-
|
||||
rpmio/rpmio.c | 18 ++++++++++++++----
|
||||
2 files changed, 15 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/lib/fsm.c b/lib/fsm.c
|
||||
index 1ee7e67..094eb1d 100644
|
||||
--- a/lib/fsm.c
|
||||
+++ b/lib/fsm.c
|
||||
@@ -726,7 +726,7 @@ static int expandRegular(FSM_t fsm, rpmpsm psm, rpmcpio_t archive, int nodigest)
|
||||
{
|
||||
FD_t wfd = NULL;
|
||||
const struct stat * st = &fsm->sb;
|
||||
- rpm_loff_t left = st->st_size;
|
||||
+ rpm_loff_t left = rpmfiFSizeIndex(fsmGetFi(fsm), fsm->ix);
|
||||
const unsigned char * fidigest = NULL;
|
||||
pgpHashAlgo digestalgo = 0;
|
||||
int rc = 0;
|
||||
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
|
||||
index cd223e8..0b12e31 100644
|
||||
--- a/rpmio/rpmio.c
|
||||
+++ b/rpmio/rpmio.c
|
||||
@@ -1309,15 +1309,19 @@ int Fclose(FD_t fd)
|
||||
* - bzopen: [1-9] is block size (modulo 100K)
|
||||
* - bzopen: 's' is smallmode
|
||||
* - HACK: '.' terminates, rest is type of I/O
|
||||
+ * - 'U' sets *mode to zero (no permissions) instead of 0666
|
||||
*/
|
||||
static void cvtfmode (const char *m,
|
||||
char *stdio, size_t nstdio,
|
||||
char *other, size_t nother,
|
||||
- const char **end, int * f)
|
||||
+ const char **end, int *f, mode_t *mode)
|
||||
{
|
||||
int flags = 0;
|
||||
char c;
|
||||
|
||||
+ if (mode)
|
||||
+ *mode = 0666;
|
||||
+
|
||||
switch (*m) {
|
||||
case 'a':
|
||||
flags |= O_WRONLY | O_CREAT | O_APPEND;
|
||||
@@ -1357,6 +1361,10 @@ static void cvtfmode (const char *m,
|
||||
if (--nstdio > 0) *stdio++ = c;
|
||||
continue;
|
||||
break;
|
||||
+ case 'U':
|
||||
+ if (mode)
|
||||
+ *mode = 0;
|
||||
+ break;
|
||||
default:
|
||||
if (--nother > 0) *other++ = c;
|
||||
continue;
|
||||
@@ -1385,7 +1393,8 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n", fd, fmode, fdbg(fd));
|
||||
if (fd == NULL || fmode == NULL)
|
||||
return NULL;
|
||||
|
||||
- cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, NULL);
|
||||
+ cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, NULL,
|
||||
+ NULL);
|
||||
if (stdio[0] == '\0')
|
||||
return NULL;
|
||||
zstdio[0] = '\0';
|
||||
@@ -1436,7 +1445,7 @@ FD_t Fopen(const char *path, const char *fmode)
|
||||
{
|
||||
char stdio[20], other[20];
|
||||
const char *end = NULL;
|
||||
- mode_t perms = 0666;
|
||||
+ mode_t perms;
|
||||
int flags = 0;
|
||||
FD_t fd;
|
||||
|
||||
@@ -1444,7 +1453,8 @@ FD_t Fopen(const char *path, const char *fmode)
|
||||
return NULL;
|
||||
|
||||
stdio[0] = '\0';
|
||||
- cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, &flags);
|
||||
+ cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, &flags,
|
||||
+ &perms);
|
||||
if (stdio[0] == '\0')
|
||||
return NULL;
|
||||
|
||||
--
|
||||
1.8.4.5
|
||||
|
||||
43
meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch
Normal file
43
meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From 71c812edf1431a9967bd99ba6ffa6ab89eb7ec7c Mon Sep 17 00:00:00 2001
|
||||
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
|
||||
Date: Wed, 10 Jun 2015 12:56:55 +0000
|
||||
Subject: [PATCH 1/2] rpm: CVE-2014-8118
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Reference:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1168715
|
||||
|
||||
Description:
|
||||
It was found that RPM could encounter an integer overflow,
|
||||
leading to a stack-based overflow, while parsing a crafted
|
||||
CPIO header in the payload section of an RPM file. This could
|
||||
allow an attacker to modify signed RPM files in such a way that
|
||||
they would execute code chosen by the attacker during package
|
||||
installation.
|
||||
|
||||
Original Patch:
|
||||
https://bugzilla.redhat.com/attachment.cgi?id=962159
|
||||
|
||||
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
|
||||
---
|
||||
lib/cpio.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/lib/cpio.c b/lib/cpio.c
|
||||
index 382eeb6..74ddd9c 100644
|
||||
--- a/lib/cpio.c
|
||||
+++ b/lib/cpio.c
|
||||
@@ -296,6 +296,9 @@ int rpmcpioHeaderRead(rpmcpio_t cpio, char ** path, struct stat * st)
|
||||
st->st_rdev = makedev(major, minor);
|
||||
|
||||
GET_NUM_FIELD(hdr.namesize, nameSize);
|
||||
+ if (nameSize <= 0 || nameSize > 4096) {
|
||||
+ return CPIOERR_BAD_HEADER;
|
||||
+ }
|
||||
|
||||
*path = xmalloc(nameSize + 1);
|
||||
read = Fread(*path, nameSize, 1, cpio->fd);
|
||||
--
|
||||
1.8.4.5
|
||||
|
||||
@@ -34,6 +34,8 @@ SRC_URI += "http://rpm.org/releases/rpm-4.11.x/${BP}.tar.bz2 \
|
||||
file://fix_libdir.patch \
|
||||
file://rpm-scriptetexechelp.patch \
|
||||
file://pythondeps.sh \
|
||||
file://rpm-CVE-2014-8118.patch \
|
||||
file://rpm-CVE-2013-6435.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "876ac9948a88367054f8ddb5c0e87173"
|
||||
|
||||
33
meta/recipes-devtools/rsync/files/check_libattr.patch
Normal file
33
meta/recipes-devtools/rsync/files/check_libattr.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 677c6e14cc7d5f41371d5616865a5f0cfc0a273f Mon Sep 17 00:00:00 2001
|
||||
From: Wayne Davison <wayned@samba.org>
|
||||
Date: Mon, 5 May 2014 09:25:13 -0700
|
||||
Subject: [PATCH] Check for attr lib.
|
||||
|
||||
---
|
||||
configure.ac | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c7b28c5..8e3703c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1007,7 +1007,7 @@ else
|
||||
*)
|
||||
AC_MSG_RESULT(running tests:)
|
||||
AC_CHECK_LIB(acl,acl_get_file)
|
||||
- AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[
|
||||
+ AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[
|
||||
AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <sys/acl.h>],
|
||||
[ acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);],
|
||||
@@ -1057,6 +1057,7 @@ else
|
||||
AC_DEFINE(HAVE_LINUX_XATTRS, 1, [True if you have Linux xattrs])
|
||||
AC_DEFINE(SUPPORT_XATTRS, 1)
|
||||
AC_DEFINE(NO_SYMLINK_USER_XATTRS, 1, [True if symlinks do not support user xattrs])
|
||||
+ AC_CHECK_LIB(attr,getxattr)
|
||||
;;
|
||||
darwin*)
|
||||
AC_MSG_RESULT(Using OS X xattrs)
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
require rsync.inc
|
||||
|
||||
|
||||
SRC_URI += "file://acinclude.m4"
|
||||
SRC_URI += "file://acinclude.m4 \
|
||||
file://check_libattr.patch"
|
||||
|
||||
SRC_URI[md5sum] = "3be148772a33224771a8d4d2a028b132"
|
||||
SRC_URI[sha256sum] = "81ca23f77fc9b957eb9845a6024f41af0ff0c619b7f38576887c63fa38e2394e"
|
||||
|
||||
@@ -27,11 +27,12 @@ SPDX_S = "${WORKDIR}/squashfs${PV}"
|
||||
EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1"
|
||||
|
||||
do_compile() {
|
||||
oe_runmake mksquashfs
|
||||
oe_runmake mksquashfs unsquashfs
|
||||
}
|
||||
do_install () {
|
||||
install -d ${D}${sbindir}
|
||||
install -m 0755 mksquashfs ${D}${sbindir}/
|
||||
install -m 0755 unsquashfs ${D}${sbindir}/
|
||||
}
|
||||
|
||||
ARM_INSTRUCTION_SET = "arm"
|
||||
|
||||
@@ -7,7 +7,7 @@ HOMEPAGE = "http://subversion.tigris.org"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
inherit gettext
|
||||
inherit gettext pythonnative
|
||||
|
||||
SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
|
||||
file://libtool2.patch \
|
||||
@@ -33,6 +33,8 @@ EXTRA_OECONF = " \
|
||||
inherit autotools
|
||||
|
||||
export LDFLAGS += " -L${STAGING_LIBDIR} "
|
||||
CPPFLAGS += "-P"
|
||||
BUILD_CPPFLAGS += "-P"
|
||||
|
||||
acpaths = "-I build/ -I build/ac-macros/"
|
||||
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
From 83a95bd8c8561875b948cadd417c653dbe7ef2e2 Mon Sep 17 00:00:00 2001
|
||||
From: Yuliy Pisetsky <ypisetsky@fb.com>
|
||||
Date: Thu, 01 Jan 2015 23:36:55 +0000
|
||||
Subject: grep -F: fix a heap buffer (read) overrun
|
||||
|
||||
grep's read buffer is often filled to its full size, except when
|
||||
reading the final buffer of a file. In that case, the number of
|
||||
bytes read may be far less than the size of the buffer. However, for
|
||||
certain unusual pattern/text combinations, grep -F would mistakenly
|
||||
examine bytes in that uninitialized region of memory when searching
|
||||
for a match. With carefully chosen inputs, one can cause grep -F to
|
||||
read beyond the end of that buffer altogether. This problem arose via
|
||||
commit v2.18-90-g73893ff with the introduction of a more efficient
|
||||
heuristic using what is now the memchr_kwset function. The use of
|
||||
that function in bmexec_trans could leave TP much larger than EP,
|
||||
and the subsequent call to bm_delta2_search would mistakenly access
|
||||
beyond end of the main input read buffer.
|
||||
|
||||
* src/kwset.c (bmexec_trans): When TP reaches or exceeds EP,
|
||||
do not call bm_delta2_search.
|
||||
* tests/kwset-abuse: New file.
|
||||
* tests/Makefile.am (TESTS): Add it.
|
||||
* NEWS (Bug fixes): Mention it.
|
||||
|
||||
Prior to this patch, this command would trigger a UMR:
|
||||
|
||||
printf %0360db 0 | valgrind src/grep -F $(printf %019dXb 0)
|
||||
|
||||
Use of uninitialised value of size 8
|
||||
at 0x4142BE: bmexec_trans (kwset.c:657)
|
||||
by 0x4143CA: bmexec (kwset.c:678)
|
||||
by 0x414973: kwsexec (kwset.c:848)
|
||||
by 0x414DC4: Fexecute (kwsearch.c:128)
|
||||
by 0x404E2E: grepbuf (grep.c:1238)
|
||||
by 0x4054BF: grep (grep.c:1417)
|
||||
by 0x405CEB: grepdesc (grep.c:1645)
|
||||
by 0x405EC1: grep_command_line_arg (grep.c:1692)
|
||||
by 0x4077D4: main (grep.c:2570)
|
||||
|
||||
See the accompanying test for how to trigger the heap buffer overrun.
|
||||
|
||||
Thanks to Nima Aghdaii for testing and finding numerous
|
||||
ways to break early iterations of this patch.
|
||||
|
||||
Fixes CVE-2015-1345.
|
||||
Upstream-Status: Backport
|
||||
|
||||
---
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 975440d..3835d8d 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -2,6 +2,11 @@ GNU grep NEWS -*- outline -*-
|
||||
|
||||
* Noteworthy changes in release ?.? (????-??-??) [?]
|
||||
|
||||
+** Bug fixes
|
||||
+
|
||||
+ grep no longer reads from uninitialized memory or from beyond the end
|
||||
+ of the heap-allocated input buffer.
|
||||
+
|
||||
|
||||
* Noteworthy changes in release 2.21 (2014-11-23) [stable]
|
||||
|
||||
diff --git a/src/kwset.c b/src/kwset.c
|
||||
index 4003c8d..376f7c3 100644
|
||||
--- a/src/kwset.c
|
||||
+++ b/src/kwset.c
|
||||
@@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size)
|
||||
if (! tp)
|
||||
return -1;
|
||||
tp++;
|
||||
+ if (ep <= tp)
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 2cba2cd..0508cd2 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -75,6 +75,7 @@ TESTS = \
|
||||
inconsistent-range \
|
||||
invalid-multibyte-infloop \
|
||||
khadafy \
|
||||
+ kwset-abuse \
|
||||
long-line-vs-2GiB-read \
|
||||
match-lines \
|
||||
max-count-overread \
|
||||
diff --git a/tests/kwset-abuse b/tests/kwset-abuse
|
||||
new file mode 100755
|
||||
index 0000000..6d8ec0c
|
||||
--- a/dev/null
|
||||
+++ b/tests/kwset-abuse
|
||||
@@ -0,0 +1,32 @@
|
||||
+#! /bin/sh
|
||||
+# Evoke a segfault in a hard-to-reach code path of kwset.c.
|
||||
+# This bug affected grep versions 2.19 through 2.21.
|
||||
+#
|
||||
+# Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This program is free software: you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation, either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
+
|
||||
+fail=0
|
||||
+
|
||||
+# This test case chooses a haystack of size 260,000, since prodding
|
||||
+# with gdb showed a reallocation slightly larger than that in fillbuf.
|
||||
+# To reach the buggy code, the needle must have length < 1/11 that of
|
||||
+# the haystack, and 10,000 is a nice round number that fits the bill.
|
||||
+printf '%0260000dXy\n' 0 | grep -F $(printf %010000dy 0)
|
||||
+
|
||||
+test $? = 1 || fail=1
|
||||
+
|
||||
+Exit $fail
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
@@ -5,7 +5,9 @@ SECTION = "console/utils"
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
|
||||
|
||||
SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz"
|
||||
SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
|
||||
file://grep2.19-CVE-2015-1345.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "ac732142227d9fe9567d71301e127979"
|
||||
SRC_URI[sha256sum] = "6388295be48cfcaf7665d9cd3914e6625ea000e9414132bfefd45cf1d8eec34d"
|
||||
|
||||
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
PROVIDES_append_class-native = " texinfo-replacement-native"
|
||||
|
||||
def compress_pkg(d):
|
||||
if "compress_doc" in (d.getVar("INHERIT", True) or "").split():
|
||||
if bb.data.inherits_class('compress_doc', d):
|
||||
compress = d.getVar("DOC_COMPRESS", True)
|
||||
if compress == "gz":
|
||||
return "gzip"
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# note that we allow for us to use data later than our code version
|
||||
#
|
||||
SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
|
||||
ftp://ftp.iana.org/tz/releases/tzdata2014h.tar.gz;name=tzdata"
|
||||
|
||||
SRC_URI[tzcode.md5sum] = "8e7741fc769ebdd94d95e5f2c3adbb60"
|
||||
SRC_URI[tzcode.sha256sum] = "a4d9788a1bb0aa314eae4986ee991425b83ecc47da0e84f626735846be1dbf44"
|
||||
SRC_URI[tzdata.md5sum] = "ed05111948beba8a0f30956baa46b272"
|
||||
SRC_URI[tzdata.sha256sum] = "e78152f616fb07c1dea124215ffca57d0de66d8897e00896086542e3de30f69e"
|
||||
|
||||
require tzcode-native.inc
|
||||
@@ -1,6 +0,0 @@
|
||||
SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
|
||||
|
||||
SRC_URI[tzdata.md5sum] = "ed05111948beba8a0f30956baa46b272"
|
||||
SRC_URI[tzdata.sha256sum] = "e78152f616fb07c1dea124215ffca57d0de66d8897e00896086542e3de30f69e"
|
||||
|
||||
require tzdata.inc
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user