diff options
| author | Armin Kuster <akuster808@gmail.com> | 2017-11-26 16:25:07 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-11 22:02:59 +0000 |
| commit | bbf6d99f12e628e0444b07f6c8f30cae56a8cf70 (patch) | |
| tree | 2785ef767a8b71488970eba386aad1f85bd4f5d0 /meta/recipes-devtools | |
| parent | fc95cd2ee79cd89d4cc0b5b2d925c6175767667a (diff) | |
| download | poky-bbf6d99f12e628e0444b07f6c8f30cae56a8cf70.tar.gz | |
binutils: Security fix for CVE-2017-9749
Affects: <= 2.28
(From OE-Core rev: 8b177c76ce892c1ee064498b8fa21e99a993d69e)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.28.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch | 77 |
2 files changed, 78 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.28.inc b/meta/recipes-devtools/binutils/binutils-2.28.inc index 8a19ac6ad1..b88e154f1d 100644 --- a/meta/recipes-devtools/binutils/binutils-2.28.inc +++ b/meta/recipes-devtools/binutils/binutils-2.28.inc | |||
| @@ -60,6 +60,7 @@ SRC_URI = "\ | |||
| 60 | file://CVE-2017-9746.patch \ | 60 | file://CVE-2017-9746.patch \ |
| 61 | file://CVE-2017-9747.patch \ | 61 | file://CVE-2017-9747.patch \ |
| 62 | file://CVE-2017-9748.patch \ | 62 | file://CVE-2017-9748.patch \ |
| 63 | file://CVE-2017-9749.patch \ | ||
| 63 | " | 64 | " |
| 64 | S = "${WORKDIR}/git" | 65 | S = "${WORKDIR}/git" |
| 65 | 66 | ||
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch new file mode 100644 index 0000000000..3cc2afc918 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | From 08c7881b814c546efc3996fd1decdf0877f7a779 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nick Clifton <nickc@redhat.com> | ||
| 3 | Date: Thu, 15 Jun 2017 11:52:02 +0100 | ||
| 4 | Subject: [PATCH] Prevent invalid array accesses when disassembling a corrupt | ||
| 5 | bfin binary. | ||
| 6 | |||
| 7 | PR binutils/21586 | ||
| 8 | * bfin-dis.c (gregs): Clip index to prevent overflow. | ||
| 9 | (regs): Likewise. | ||
| 10 | (regs_lo): Likewise. | ||
| 11 | (regs_hi): Likewise. | ||
| 12 | |||
| 13 | Upstream-Status: Backport | ||
| 14 | CVE: CVE-2017-9749 | ||
| 15 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
| 16 | |||
| 17 | --- | ||
| 18 | opcodes/ChangeLog | 8 ++++++++ | ||
| 19 | opcodes/bfin-dis.c | 8 ++++---- | ||
| 20 | 2 files changed, 12 insertions(+), 4 deletions(-) | ||
| 21 | |||
| 22 | Index: git/opcodes/ChangeLog | ||
| 23 | =================================================================== | ||
| 24 | --- git.orig/opcodes/ChangeLog | ||
| 25 | +++ git/opcodes/ChangeLog | ||
| 26 | @@ -1,3 +1,11 @@ | ||
| 27 | +2017-06-15 Nick Clifton <nickc@redhat.com> | ||
| 28 | + | ||
| 29 | + PR binutils/21586 | ||
| 30 | + * bfin-dis.c (gregs): Clip index to prevent overflow. | ||
| 31 | + (regs): Likewise. | ||
| 32 | + (regs_lo): Likewise. | ||
| 33 | + (regs_hi): Likewise. | ||
| 34 | + | ||
| 35 | 2017-06-14 Nick Clifton <nickc@redhat.com> | ||
| 36 | |||
| 37 | PR binutils/21576 | ||
| 38 | Index: git/opcodes/bfin-dis.c | ||
| 39 | =================================================================== | ||
| 40 | --- git.orig/opcodes/bfin-dis.c | ||
| 41 | +++ git/opcodes/bfin-dis.c | ||
| 42 | @@ -350,7 +350,7 @@ static const enum machine_registers deco | ||
| 43 | REG_P0, REG_P1, REG_P2, REG_P3, REG_P4, REG_P5, REG_SP, REG_FP, | ||
| 44 | }; | ||
| 45 | |||
| 46 | -#define gregs(x, i) REGNAME (decode_gregs[((i) << 3) | (x)]) | ||
| 47 | +#define gregs(x, i) REGNAME (decode_gregs[(((i) << 3) | (x)) & 15]) | ||
| 48 | |||
| 49 | /* [dregs pregs (iregs mregs) (bregs lregs)]. */ | ||
| 50 | static const enum machine_registers decode_regs[] = | ||
| 51 | @@ -361,7 +361,7 @@ static const enum machine_registers deco | ||
| 52 | REG_B0, REG_B1, REG_B2, REG_B3, REG_L0, REG_L1, REG_L2, REG_L3, | ||
| 53 | }; | ||
| 54 | |||
| 55 | -#define regs(x, i) REGNAME (decode_regs[((i) << 3) | (x)]) | ||
| 56 | +#define regs(x, i) REGNAME (decode_regs[(((i) << 3) | (x)) & 31]) | ||
| 57 | |||
| 58 | /* [dregs pregs (iregs mregs) (bregs lregs) Low Half]. */ | ||
| 59 | static const enum machine_registers decode_regs_lo[] = | ||
| 60 | @@ -372,7 +372,7 @@ static const enum machine_registers deco | ||
| 61 | REG_BL0, REG_BL1, REG_BL2, REG_BL3, REG_LL0, REG_LL1, REG_LL2, REG_LL3, | ||
| 62 | }; | ||
| 63 | |||
| 64 | -#define regs_lo(x, i) REGNAME (decode_regs_lo[((i) << 3) | (x)]) | ||
| 65 | +#define regs_lo(x, i) REGNAME (decode_regs_lo[(((i) << 3) | (x)) & 31]) | ||
| 66 | |||
| 67 | /* [dregs pregs (iregs mregs) (bregs lregs) High Half]. */ | ||
| 68 | static const enum machine_registers decode_regs_hi[] = | ||
| 69 | @@ -383,7 +383,7 @@ static const enum machine_registers deco | ||
| 70 | REG_BH0, REG_BH1, REG_BH2, REG_BH3, REG_LH0, REG_LH1, REG_LH2, REG_LH3, | ||
| 71 | }; | ||
| 72 | |||
| 73 | -#define regs_hi(x, i) REGNAME (decode_regs_hi[((i) << 3) | (x)]) | ||
| 74 | +#define regs_hi(x, i) REGNAME (decode_regs_hi[(((i) << 3) | (x)) & 31]) | ||
| 75 | |||
| 76 | static const enum machine_registers decode_statbits[] = | ||
| 77 | { | ||
