diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/capstone |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/capstone')
-rw-r--r-- | dev-libs/capstone/Manifest | 7 | ||||
-rw-r--r-- | dev-libs/capstone/capstone-3.0.5_rc2-r1.ebuild | 82 | ||||
-rw-r--r-- | dev-libs/capstone/capstone-3.0.5_rc2.ebuild | 44 | ||||
-rw-r--r-- | dev-libs/capstone/files/capstone-3.0.5_rc2-CVE-2017-6952.patch | 41 | ||||
-rw-r--r-- | dev-libs/capstone/files/capstone-3.0.5_rc2-FLAGS.patch | 16 | ||||
-rw-r--r-- | dev-libs/capstone/metadata.xml | 12 |
6 files changed, 202 insertions, 0 deletions
diff --git a/dev-libs/capstone/Manifest b/dev-libs/capstone/Manifest new file mode 100644 index 000000000000..0fdafef40c56 --- /dev/null +++ b/dev-libs/capstone/Manifest @@ -0,0 +1,7 @@ +AUX capstone-3.0.5_rc2-CVE-2017-6952.patch 1565 SHA256 857f8f769e276d67c06a3e2f530a8607dd797d9c09b80948908ea1ded468db2c SHA512 1f4f24bdede4439811b077502b227474827a455921eb183455c31e7de142d3f3f7e9f19869aac87b92a768be34a7e5ad040f0d68e8125b590d14dfec7af5b407 WHIRLPOOL bad51c09236966ec888b046a8069295d260218be1f8314136f8f727cc3c771d6a95933c92f52ad88fdaa45d1590e31e33399754abda05bbd53491b24e781ddce +AUX capstone-3.0.5_rc2-FLAGS.patch 398 SHA256 13125a28e199a0fff035ff1a89d2439ade32fe313293f31fbf9a7203b1c12539 SHA512 95fb22a680e20f5b19936bd65ceadb9e29a8ed1f3de831379cfc0e650bfd4af7214b97efa97ed894a10d83541e0e49c60ff1a0cb501cd63a9af8f40460909975 WHIRLPOOL 6299beba3f0a0115365ed8f100519354ea35579f295691251a88568709135af7699e65df6336dd94c770b644f974aabb0d2fbc653b8dbeb361167a1798fca9dd +DIST capstone-3.0.5_rc2.tar.gz 2829338 SHA256 587c092454ad59137686529f3c008c265cc6d427a85d5d2e8f6a902b72d215b3 SHA512 31bafdb0b3183d0c054a4244cc135db9a3c3dc5cb2e2af706bfede0d53cca8cba81d74b74ef9a4adbfd6c79cc408864dd80b8203791e17bd6c98bb69ea4f6894 WHIRLPOOL 11a84f178cae68507d2686a81ca6cbc84b6402cb02e7278c03ec598887a0aa02d28a9ecbf388e09c8c3ae8d8ecf323dd4eaa211f79969089c4c7d6fbbe022349 +EBUILD capstone-3.0.5_rc2-r1.ebuild 1383 SHA256 6b60a364b165fc9d8a2836b1958e185312b0d48580e9e05f1cc3871682e2ed90 SHA512 e0e61ad4af2fe6fa2b91e759dc9a9937fa75af99ebf7bc60e41750412b9e49c37677eb057b6bd7091abb00fb3b9ef06f3d2c172605b615226a68c4d050e4c48d WHIRLPOOL f53abcd4775836277756bb3166318c3f3891c026143d32ac7268fdd8ebe266ee993ae945d8f27aa26ec8ee3f795c71b3a953a7e5791116187c940c5ca2331407 +EBUILD capstone-3.0.5_rc2.ebuild 849 SHA256 1adc0231921a6bdce8271a15ca664bdc5f60a43e23beef7eeaee7ee6b67cf7ce SHA512 7896e5759c146a82b47239bf0fede1c67f49ec9970d3ca82ff1db6d4c53c7c8f3a3a657491ed12a8ca5de585ffcdaf032f3c3d1b9db6db0d4c75e613ef4dfc70 WHIRLPOOL edffd12e6c8d4a180077b2866e0ae2f07c95e95eeb896908f2df09afe44192ec619e3da8f0aebd4e167ee64168f7a01a3ba04aea76626b033d016e222d504d66 +MISC ChangeLog 1153 SHA256 cac5408060ed6c38b37e90e102acb658708e9182f44a5206c79a095dd68bf370 SHA512 b241ba998e241446be58968bb157b9bc99ff34241e7554133415c02fd6439c3044c8b93ab00ba98d485818ce4f5c0d6ff050992e581b0ca8d07a4c6502f45a01 WHIRLPOOL 6591c4bb70d7e7ae2b4ed215dde6d833e407c4d3b36d2df4590f7dcf1e596e2de8a3be5f4edcfd3bfc1503a35ec88d1ed515af3bd136befd24440c107b050c75 +MISC metadata.xml 332 SHA256 ac09aabe02ed08000f9071abb8a88ecc8d1b6160b574f6c65ff3aae4bb76dc4b SHA512 a4952a89d043c4c8aec5a7a307d37d895880d49b381e5b881ffecf74b61c9c22cd854a68a1d1de3926431cdfad4f8ba70812be36bb7cac2df5dee8efe96dc269 WHIRLPOOL 4dbc6b0ab82a7251be3b0e123238ab45684a041d47abb0899bcd0cbc2295c54a792e64dee5d8868826046a2eb02a906981a36804f7283cace56d9cb7fd9e3492 diff --git a/dev-libs/capstone/capstone-3.0.5_rc2-r1.ebuild b/dev-libs/capstone/capstone-3.0.5_rc2-r1.ebuild new file mode 100644 index 000000000000..02b42dcd4eae --- /dev/null +++ b/dev-libs/capstone/capstone-3.0.5_rc2-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 toolchain-funcs + +DESCRIPTION="disassembly/disassembler framework + bindings" +HOMEPAGE="http://www.capstone-engine.org/" +SRC_URI="https://github.com/aquynh/${PN}/archive/${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/3" # libcapstone.so.3 +KEYWORDS="~amd64 ~arm ~x86" + +IUSE="python" +RDEPEND="python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND}" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}"/${P}-CVE-2017-6952.patch + "${FILESDIR}"/${P}-FLAGS.patch +) + +S=${WORKDIR}/${P/_rc/-rc} + +wrap_python() { + if use python; then + pushd bindings/python >/dev/null || die + distutils-r1_${1} "$@" + popd >/dev/null + fi +} + +src_prepare() { + default + + wrap_python ${FUNCNAME} +} + +src_configure() { + { + cat <<-EOF + # Gentoo overrides: + # verbose build + V = 1 + # toolchain + AR = $(tc-getAR) + CC = $(tc-getCC) + RANLIB = $(tc-getRANLIB) + # toolchain flags + CFLAGS = ${CFLAGS} + LDFLAGS = ${LDFLAGS} + # libs + LIBDIRARCH = $(get_libdir) + EOF + } >> config.mk || die + + wrap_python ${FUNCNAME} +} + +src_compile() { + default + + wrap_python ${FUNCNAME} +} + +src_test() { + default + + wrap_python ${FUNCNAME} +} + +src_install() { + default + + wrap_python ${FUNCNAME} +} diff --git a/dev-libs/capstone/capstone-3.0.5_rc2.ebuild b/dev-libs/capstone/capstone-3.0.5_rc2.ebuild new file mode 100644 index 000000000000..80fb03207d64 --- /dev/null +++ b/dev-libs/capstone/capstone-3.0.5_rc2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="disassembly/disassembler framework + bindings" +HOMEPAGE="http://www.capstone-engine.org/" +SRC_URI="https://github.com/aquynh/${PN}/archive/${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/3" # libcapstone.so.3 +KEYWORDS="~amd64 ~arm ~x86" + +RDEPEND="" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-CVE-2017-6952.patch + "${FILESDIR}"/${P}-FLAGS.patch +) + +S=${WORKDIR}/${P/_rc/-rc} + +src_configure() { + { + cat <<-EOF + # Gentoo overrides: + # verbose build + V = 1 + # toolchain + AR = $(tc-getAR) + CC = $(tc-getCC) + RANLIB = $(tc-getRANLIB) + # toolchain flags + CFLAGS = ${CFLAGS} + LDFLAGS = ${LDFLAGS} + # libs + LIBDIRARCH = $(get_libdir) + EOF + } >> config.mk || die + +} diff --git a/dev-libs/capstone/files/capstone-3.0.5_rc2-CVE-2017-6952.patch b/dev-libs/capstone/files/capstone-3.0.5_rc2-CVE-2017-6952.patch new file mode 100644 index 000000000000..ba16126f7411 --- /dev/null +++ b/dev-libs/capstone/files/capstone-3.0.5_rc2-CVE-2017-6952.patch @@ -0,0 +1,41 @@ +commit 6fe86eef621b9849f51a5e1e5d73258a93440403 +Author: Quang Nguyễn <quangnh89@users.noreply.github.com> +Date: Mon Mar 13 22:34:48 2017 +0700 + + provide a validity check to prevent against Integer overflow conditions (#870) + + * provide a validity check to prevent against Integer overflow conditions + + * fix some style issues. + +diff --git a/windows/winkernel_mm.c b/windows/winkernel_mm.c +index c127da3a..ecdc1ca2 100644 +--- a/windows/winkernel_mm.c ++++ b/windows/winkernel_mm.c +@@ -3,6 +3,7 @@ + + #include "winkernel_mm.h" + #include <ntddk.h> ++#include <Ntintsafe.h> + + // A pool tag for memory allocation + static const ULONG CS_WINKERNEL_POOL_TAG = 'kwsC'; +@@ -33,8 +34,16 @@ void * CAPSTONE_API cs_winkernel_malloc(size_t size) + + // FP; a use of NonPagedPool is required for Windows 7 support + #pragma prefast(suppress : 30030) // Allocating executable POOL_TYPE memory +- CS_WINKERNEL_MEMBLOCK *block = (CS_WINKERNEL_MEMBLOCK *)ExAllocatePoolWithTag( +- NonPagedPool, size + sizeof(CS_WINKERNEL_MEMBLOCK), CS_WINKERNEL_POOL_TAG); ++ size_t number_of_bytes = 0; ++ CS_WINKERNEL_MEMBLOCK *block = NULL; ++ // A specially crafted size value can trigger the overflow. ++ // If the sum in a value that overflows or underflows the capacity of the type, ++ // the function returns NULL. ++ if (!NT_SUCCESS(RtlSizeTAdd(size, sizeof(CS_WINKERNEL_MEMBLOCK), &number_of_bytes))) { ++ return NULL; ++ } ++ block = (CS_WINKERNEL_MEMBLOCK *)ExAllocatePoolWithTag( ++ NonPagedPool, number_of_bytes, CS_WINKERNEL_POOL_TAG); + if (!block) { + return NULL; + } diff --git a/dev-libs/capstone/files/capstone-3.0.5_rc2-FLAGS.patch b/dev-libs/capstone/files/capstone-3.0.5_rc2-FLAGS.patch new file mode 100644 index 000000000000..4be2ed4ba0e6 --- /dev/null +++ b/dev-libs/capstone/files/capstone-3.0.5_rc2-FLAGS.patch @@ -0,0 +1,16 @@ +Add support for user overridden CFLAGS and LDFLAGS +diff --git a/cstool/Makefile b/cstool/Makefile +index 450ac1b..3cf2a81 100644 +--- a/cstool/Makefile ++++ b/cstool/Makefile +@@ -3,2 +3,3 @@ + include ../functions.mk ++include ../config.mk + +@@ -8,4 +9,4 @@ LIBNAME = capstone + +-CFLAGS = -I../include +-LDFLAGS = -O3 -Wall -L.. -l$(LIBNAME) ++CFLAGS += -I../include ++LDFLAGS += -Wall -L.. -l$(LIBNAME) + diff --git a/dev-libs/capstone/metadata.xml b/dev-libs/capstone/metadata.xml new file mode 100644 index 000000000000..506ec45bd2c7 --- /dev/null +++ b/dev-libs/capstone/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + + <maintainer type="person"> + <email>slyfox@gentoo.org</email> + <name>Sergei Trofimovich</name> + </maintainer> + <upstream> + <remote-id type="github">aquynh/capstone</remote-id> + </upstream> +</pkgmetadata> |