Merge ~paelzer/ubuntu/+source/binutils:lp-1883880-x86-don-t-mistakenly-scale-non-8-bit-BIONIC into ubuntu/+source/binutils:ubuntu/bionic-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: cdbb0d93110a7b625f0e6683494cd1924317163d
Merged at revision: cdbb0d93110a7b625f0e6683494cd1924317163d
Proposed branch: ~paelzer/ubuntu/+source/binutils:lp-1883880-x86-don-t-mistakenly-scale-non-8-bit-BIONIC
Merge into: ubuntu/+source/binutils:ubuntu/bionic-devel
Diff against target: 161 lines (+139/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/lp-1883880-x86-don-t-mistakenly-scale-non-8-bit-displacements.patch (+131/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Matthias Klose Pending
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+386073@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Doko is unavailable atm, but on direct contact he gave it a quick look and called it to be ok (on a superficial check).

Furthermore the pre-checks LGTM with all fails being known overrides in Bionic:
https://bileto.ubuntu.com/excuses/4105/bionic.html

ubuntu-release:9:force-badtest dh-ada-library/6.12
ubuntu-release:18:force-badtest lintian/2.5.81ubuntu1
pitti:2:force-badtest rpmlint/1.9-6
ubuntu-sru:17:force-badtest snapcraft/2.43.1+18.04/amd64 snapcraft/2.43.1+18.04/i386
ubuntu-sru:20:force-badtest snapcraft/2.43.1+18.04/armhf snapcraft/2.43.1+18.04/arm64
ubuntu-release:90:force-badtest linux-hwe/all
ubuntu-release:91:force-badtest linux-hwe-edge/all

Uploading for SRU consideration

I'd still not mind a deeper review by doko once he is back, but it isn't blocking this.

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/binutils
 * [new tag] upload/2.30-21ubuntu1_18.04.4 -> upload/2.30-21ubuntu1_18.04.4

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading binutils_2.30-21ubuntu1~18.04.4.dsc: done.
  Uploading binutils_2.30-21ubuntu1~18.04.4.debian.tar.xz: done.
  Uploading binutils_2.30-21ubuntu1~18.04.4_source.buildinfo: done.
  Uploading binutils_2.30-21ubuntu1~18.04.4_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 60963f4..e1e4938 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1binutils (2.30-21ubuntu1~18.04.4) bionic; urgency=medium
2
3 * d/p/lp-1883880-x86-don-t-mistakenly-scale-non-8-bit-displacements.patch:
4 avoid scaling displacements that breaks e.g. some AVX512 code (LP: #1883880)
5
6 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 18 Jun 2020 13:03:55 +0200
7
1binutils (2.30-21ubuntu1~18.04.3) bionic-security; urgency=medium8binutils (2.30-21ubuntu1~18.04.3) bionic-security; urgency=medium
29
3 * SECURITY UPDATE: DoS via a large attribute section10 * SECURITY UPDATE: DoS via a large attribute section
diff --git a/debian/patches/lp-1883880-x86-don-t-mistakenly-scale-non-8-bit-displacements.patch b/debian/patches/lp-1883880-x86-don-t-mistakenly-scale-non-8-bit-displacements.patch
4new file mode 10064411new file mode 100644
index 0000000..afc4766
--- /dev/null
+++ b/debian/patches/lp-1883880-x86-don-t-mistakenly-scale-non-8-bit-displacements.patch
@@ -0,0 +1,131 @@
1From 2069ccaf8dc28ea699bd901fdd35d90613e4402a Mon Sep 17 00:00:00 2001
2From: Jan Beulich <jbeulich@novell.com>
3Date: Tue, 31 Jul 2018 11:04:34 +0200
4Subject: [PATCH] x86: don't mistakenly scale non-8-bit displacements
5
6PR gas/23465
7
8In commit b5014f7af2 I've removed (instead of replaced) a conditional,
9resulting in addressing forms not allowing 8-bit displacements to now
10get their displacements scaled under certain circumstances. Re-add the
11missing conditional.
12
13Backport-Note: context noise in the Changelog, otherwise applying as-is
14Origin: backport, https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2069ccaf8dc28ea699bd901fdd35d90613e4402a
15Bug-Ubuntu: https://bugs.launchpad.net/bugs/1883880
16Last-Update: 2020-06-18
17
18---
19 gas/ChangeLog | 9 +++++++++
20 gas/config/tc-i386.c | 3 ++-
21 gas/testsuite/gas/i386/evex-no-scale-32.d | 13 +++++++++++++
22 gas/testsuite/gas/i386/evex-no-scale-64.d | 15 +++++++++++++++
23 gas/testsuite/gas/i386/evex-no-scale.s | 19 +++++++++++++++++++
24 gas/testsuite/gas/i386/i386.exp | 2 ++
25 6 files changed, 60 insertions(+), 1 deletion(-)
26 create mode 100644 gas/testsuite/gas/i386/evex-no-scale-32.d
27 create mode 100644 gas/testsuite/gas/i386/evex-no-scale-64.d
28 create mode 100644 gas/testsuite/gas/i386/evex-no-scale.s
29
30--- a/gas/ChangeLog
31+++ b/gas/ChangeLog
32@@ -1,3 +1,13 @@
33+2018-07-31 Jan Beulich <jbeulich@suse.com>
34+
35+ PR gas/23465
36+ * config/tc-i386.c (output_disp): Restrict scaling.
37+ * testsuite/gas/i386/evex-no-scale.s,
38+ testsuite/gas/i386/evex-no-scale-32.d
39+ testsuite/gas/i386/evex-no-scale-64.d: New.
40+ * testsuite/gas/i386/i386.exp: Run new tests.
41+ Note: SRU backport in Ubuntu 2.30-21ubuntu1~18.04.4
42+
43 2018-04-25 Tamar Christina <tamar.christina@arm.com>
44
45 Backported from master branch
46--- a/gas/config/tc-i386.c
47+++ b/gas/config/tc-i386.c
48@@ -7414,7 +7414,8 @@ output_disp (fragS *insn_start_frag, off
49 int size = disp_size (n);
50 offsetT val = i.op[n].disps->X_add_number;
51
52- val = offset_in_range (val >> i.memshift, size);
53+ val = offset_in_range (val >> (size == 1 ? i.memshift : 0),
54+ size);
55 p = frag_more (size);
56 md_number_to_chars (p, val, size);
57 }
58--- /dev/null
59+++ b/gas/testsuite/gas/i386/evex-no-scale-32.d
60@@ -0,0 +1,13 @@
61+#source: evex-no-scale.s
62+#objdump: -dw
63+#name: ix86 EVEX no disp scaling
64+
65+.*: +file format .*
66+
67+Disassembly of section .text:
68+
69+0+ <disp>:
70+ +[a-f0-9]+: 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%eax,1\),%zmm0
71+ +[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40\(,%eiz,1\),%zmm0
72+ +[a-f0-9]+: 62 f1 7c 48 28 05 40 00 00 00 vmovaps 0x40,%zmm0
73+ +[a-f0-9]+: 67 62 f1 7c 48 28 06 40 00 vmovaps 0x40,%zmm0
74--- /dev/null
75+++ b/gas/testsuite/gas/i386/evex-no-scale-64.d
76@@ -0,0 +1,15 @@
77+#source: evex-no-scale.s
78+#objdump: -dw
79+#name: x86-64 EVEX no disp scaling
80+
81+.*: +file format .*
82+
83+Disassembly of section .text:
84+
85+0+ <disp>:
86+ +[a-f0-9]+: 62 f1 7c 48 28 05 00 fc ff ff vmovaps -0x400\(%rip\),%zmm0 # .*
87+ +[a-f0-9]+: 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%rax,1\),%zmm0
88+ +[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40,%zmm0
89+ +[a-f0-9]+: 67 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%eax,1\),%zmm0
90+ +[a-f0-9]+: 67 62 f1 7c 48 28 04 25 40 00 00 00 addr32 vmovaps 0x40,%zmm0
91+ +[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40,%zmm0
92--- /dev/null
93+++ b/gas/testsuite/gas/i386/evex-no-scale.s
94@@ -0,0 +1,19 @@
95+ .allow_index_reg
96+ .section .probe, "", @progbits
97+.Lprobe_64bit:
98+ inc %eax
99+.equiv is_64bit, (. - .Lprobe_64bit) / 2
100+
101+ .text
102+disp:
103+.if is_64bit
104+ vmovaps -1024(%rip), %zmm0
105+ vmovaps 64(,%rax), %zmm0
106+ vmovaps 64(,%riz), %zmm0
107+.endif
108+ vmovaps 64(,%eax), %zmm0
109+ vmovaps 64(,%eiz), %zmm0
110+ vmovaps 64, %zmm0
111+.if !is_64bit
112+ addr16 vmovaps 64, %zmm0
113+.endif
114--- a/gas/testsuite/gas/i386/i386.exp
115+++ b/gas/testsuite/gas/i386/i386.exp
116@@ -216,6 +216,7 @@ if [expr ([istarget "i*86-*-*"] || [ist
117 run_dump_test "evex-lig512-intel"
118 run_dump_test "evex-wig1"
119 run_dump_test "evex-wig1-intel"
120+ run_dump_test "evex-no-scale-32"
121 run_dump_test "sse2avx"
122 run_list_test "inval-avx" "-al"
123 run_list_test "inval-avx512f" "-al"
124@@ -690,6 +691,7 @@ if [expr ([istarget "i*86-*-*"] || [ista
125 run_dump_test "x86-64-evex-lig512-intel"
126 run_dump_test "x86-64-evex-wig1"
127 run_dump_test "x86-64-evex-wig1-intel"
128+ run_dump_test "evex-no-scale-64"
129 run_dump_test "x86-64-sse2avx"
130 run_list_test "x86-64-inval-avx" "-al"
131 run_list_test "x86-64-inval-avx512f" "-al"
diff --git a/debian/patches/series b/debian/patches/series
index bc4283f..6b0ad25 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -81,3 +81,4 @@ CVE-2019-14250.patch
81CVE-2019-14444.patch81CVE-2019-14444.patch
82CVE-2019-17450.patch82CVE-2019-17450.patch
83CVE-2019-17451.patch83CVE-2019-17451.patch
84lp-1883880-x86-don-t-mistakenly-scale-non-8-bit-displacements.patch

Subscribers

People subscribed via source and target branches