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

Subscribers

People subscribed via source and target branches