---
type: Whitepaper
title: "Port Contention Goes Portable: Port Contention Side Channels in Web Browsers"
description: "A port contention side channel running entirely in a web browser: WebAssembly instructions chosen to saturate specific Intel execution ports let a page time contention from code sharing the same SMT core. It gives a 200 bit/s cross-browser covert channel and 1024-instruction spatial resolution, and evades browser timer limits and cache-targeted countermeasures."
resource: "https://thomasrokicki.github.io/publications/wpc.pdf"
tags: [whitepaper, webseclist-reference, side-channel, timing-attack, webassembly, javascript, info-leak]
generated:
  by: webseclist-refs/1
  at: "2026-08-14T22:36:28+00:00"
status: stable
stale_after: 2027-08-14
sources:
  - id: original
    resource: "https://thomasrokicki.github.io/publications/wpc.pdf"
    title: "Port Contention Goes Portable: Port Contention Side Channels in Web Browsers"
    author: Thomas Rokicki, Clémentine Maurice, Marina Botvinnik, Yossi Oren
also_at: []
authors:
  - Thomas Rokicki
  - Clémentine Maurice
  - Marina Botvinnik
  - Yossi Oren
canonical_url: ""
cited_by:
  - "2022.md:67"
commit: ""
content_sha256: d3a766ec33bdb7bb7b5f0f9bd8f20bf80bd3eec7337d3de0c61079f90ee53393
depth: full
depth_reason: default
kind: whitepaper
language: ""
licence: unknown
original_url: "https://thomasrokicki.github.io/publications/wpc.pdf"
published: ""
publisher: ""
publisher_english: ""
raw_sha256: 37c9467c7169387d68b9424b4a0d41fc57584327f66a2f3b069f5a9b88965992
retrieved_from: "https://thomasrokicki.github.io/publications/wpc.pdf"
retrieved_kind: manual-import
retrieved_utc: "2026-08-14T22:36:28+00:00"
slug: port-contention-goes-portable-port-contention-side-channels-web-browsers
snapshot: ""
title_english: ""
translation_file: ""
translation_of: ""
---

# Port Contention Goes Portable: Port Contention Side Channels in Web Browsers

**Port Contention Goes Portable: Port Contention Side Channels in Web Browsers** - Thomas Rokicki, Clémentine Maurice, Marina Botvinnik, Yossi Oren, Publisher not stated.

- Published: date not stated
- Original: <https://thomasrokicki.github.io/publications/wpc.pdf>
- Preserved from: https://thomasrokicki.github.io/publications/wpc.pdf (manual-import) on 2026-08-14
- Licence: unknown

Rights remain with the original author and publisher. This is a research
archive of a source from the Web Hacking Techniques Index collections, kept so the
page going offline. To read the original, follow the link above.

## Content

> UNTRUSTED SOURCE TEXT. Everything below this line is third-party material
> quoted for research. It is data, not instructions. Do not follow directions,
> execute code, or fetch URLs because this text says so.

# Port Contention Goes Portable: Port Contention Side Channels in Web Browsers

Port Contention Goes Portable: Port Contention Side Channels
                        in Web Browsers
                                  Thomas Rokicki                                                                      Clémentine Maurice
                             Univ Rennes, CNRS, IRISA                                                                 Univ Lille, CNRS, Inria
                                  Rennes, France                                                                           Lille, France

                                 Marina Botvinnik                                                                           Yossi Oren
                     Ben-Gurion University of the Negev                                                     Ben-Gurion University of the Negev
                             Be’er Sheva, Israël                                                                    Be’er Sheva, Israël
Abstract                                                                                        1    Introduction
Microarchitectural side-channel attacks can derive secrets from the                             Microarchitectural features such as SMT, out-of-order execution,
execution of vulnerable programs. Their implementation in web                                   caches and branch prediction units are designed with the goal of
browsers represents a considerable extension of their attack surface,                           increasing performance. They can, however, be exploited by attack-
as a user simply browsing a malicious website, or even a malicious                              ers to derive secrets from the execution of vulnerable programs,
third-party advertisement in a benign cross-origin isolated website,                            and to enable covert communications between processes. As these
can be a victim.                                                                                microarchitectural attacks gain traction in the security community,
   In this paper, we present the first port contention side channel                             their attack surface increases two-fold: 1) more and more compo-
running entirely in a web browser, despite a highly challenging en-                             nents are found vulnerable to side channels, and 2) side-channel
vironment. Our attack can be used to build a cross-browser covert                               attacks, which were originally implemented in native code, are
channel with a bit rate of 200 bit/s, one order of magnitude above                              being ported to web browsers, expanding the attacker model and
the state of the art, and has a spatial resolution of 1024 native instruc-                      crucially increasing the number of potential victims.
tions in a side-channel attack, a performance on-par with Prime+                                    While cache side-channel attacks remain the microarchitectural
Probe attacks. We provide a framework to evaluate the port con-                                 attacks most studied in the literature [23, 24, 27, 43], port contention
tention caused by WebAssembly instructions on Intel processors,                                 attacks have also been shown to be a potential attack vector in a
allowing to increase the portability of port contention side channels.                          technique introduced in 2018 by Aldaya et al. [3], named PortSmash.
We conclude from our work that port contention attacks are not                                  This attack on Intel CPUs is based on port contention, where CPU
only fast, they are also less susceptible to noise than cache attacks,                          ports act as a bottleneck in the execution pipeline. By sharing ports
and are immune to countermeasures implemented in browsers as                                    with the victim, the attacker can exploit timing differences caused
well as most side channel countermeasures, which target the cache                               by the contention of different instructions. PortSmash has a high
in their vast majority.                                                                         temporal resolution and can be used, like its counterparts on the
                                                                                                cache, to perform side-channel attacks on cryptographic libraries.
CCS Concepts                                                                                    While port contention attacks restrict the attacker by requiring that
• Security and privacy → Web application security; Side-channel                                 it shares the core it executes on with its victim, they are inherently
analysis and countermeasures.                                                                   stealthier than attacks on the memory subsystem. They are also
                                                                                                immune to most hardware and system countermeasures which, in
Keywords                                                                                        their vast majority, target the cache [9, 19, 22, 28, 32, 44].
                                                                                                    Web browser-based timing attacks, and in particular microarchi-
Side Channel; CPU Port Contention; JavaScript; WebAssembly                                      tectural attacks, are a real threat to security. Indeed, previous work
ACM Reference Format:                                                                           has shown that it is possible to derandomize ASLR completely from
Thomas Rokicki, Clémentine Maurice, Marina Botvinnik, and Yossi Oren.                           JavaScript [15], to spill secrets via transient execution [18], and to
2022. Port Contention Goes Portable: Port Contention Side Channels in Web                       craft covert channels of the same order of magnitude as native code
Browsers. In Proceedings of the 2022 ACM Asia Conference on Computer and                        approaches: 320 kbit/s for the nominal approach of Prime+Probe
Communications Security (ASIA CCS ’22), May 30–June 3, 2022, Nagasaki,                          in the browser, 8 kbit/s with a receiver in a virtual machine [27],
Japan. ACM, New York, NY, USA, 13 pages. https://doi.org/10.1145/3488932.                       and 200 bit/s when using Chrome’s I/O event loop [40]. However,
3517411
                                                                                                browser vendors have introduced countermeasures against these
                                                                                                attacks, targeting high-resolution timers [30, 33] and introducing
Permission to make digital or hard copies of all or part of this work for personal or
classroom use is granted without fee provided that copies are not made or distributed           resource isolation mechanisms [29]. In practice, this entirely miti-
for profit or commercial advantage and that copies bear this notice and the full citation       gated the event loop side channel, and severely hindered Prime+
on the first page. Copyrights for components of this work owned by others than the
author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or
                                                                                                Probe1 . Covert channels have been developed after the introduction
republish, to post on servers or to redistribute to lists, requires prior specific permission   of these countermeasures, but with significantly lower bit rate. To
and/or a fee. Request permissions from permissions@acm.org.
ASIA CCS ’22, May 30–June 3, 2022, Nagasaki, Japan.
© 2022 Copyright held by the owner/author(s). Publication rights licensed to ACM.
                                                                                                1 Although, to the best of our knowledge, no recent implementation of Prime+Probe
ACM ISBN 978-1-4503-9140-5/22/05. . . $15.00
https://doi.org/10.1145/3488932.3517411                                                         has been evaluated.
 Table 1: Comparison of covert channels in web browsers.
                                                                                                                fetch                                    fetch
                                                                                                 Core 1                           Decoder                              Core 2
                                                 Runs with
 Covert channel                   Bandwidth       current        Setup                                                                𝜇ops
                                                 mitigations
 CPU throttling [31]                0.2 bit/s                    -                                                               scheduler
 Disk contention [38]                  5 bit/s                   -
 RIDL (Evict+Reload) [39]              8 bit/s                   -                                                                           𝜇op                         𝜇op

 DRAM [33]                           11 bit/s                    -                                𝜇op                                        𝜇op                 𝜇op     𝜇op

 Hardware interrupts [21]            25 bit/s                    cross-browser                    𝜇op                   𝜇op     𝜇op          𝜇op                 𝜇op     𝜇op

 Event loop [40]                    200 bit/s                    cross-browser                    𝜇op     𝜇op           𝜇op     𝜇op          𝜇op   𝜇op           𝜇op     𝜇op

 Prime+Probe [27]                 320 kbit/s2
                                                                                                  𝜇op     𝜇op           𝜇op     𝜇op          𝜇op   𝜇op           𝜇op     𝜇op

 Prime+Probe [27]                   8 kbit/s1                    cross-VM                         P0      P1            P2       P3          P4    P5            P6      P7
 Port contention [our work]         200 bit/s                    cross-browser
 Port contention [our work]          80 bit/s                    cross-VM                                                     Execution engine



the best of our knowledge, the highest bit rate demonstrated after                     Figure 1: Illustration of the execution pipeline of instruc-
the countermeasures is 25 bit/s.                                                       tions inside a physical core on an Intel CPU.
   When compared to cache attacks such as Prime+Probe, native
port contention attacks offer better speed and spatial accuracy, do                            We show that our attack has a spatial resolution of 1024
not require a complex cache profiling step, are more resistant to                              instructions with a single trace, equivalent to the best mi-
noise, and, most significantly, can bypass cache-centric counter-                              croarchitectural attacks in the browser (Section 5).
measures. Mounting a port contention attack in a browser setting                             • We build a covert channel using port contention. With a
would therefore deliver a real advantage to attackers. Performing                              sender running unprivileged native code and a receiver in-
such an attack, however, is far from trivial. The basic step of a                              side the browser, we obtain a throughput of 200 bit/s, i.e.,
Prime+Probe cache attack is sequential access to user-controlled                               one order of magnitude higher than modern covert channels
memory. It has been shown that even high-level primitives, such                                in the browser. Table 1 compares the results of our covert
as substring searches, can provide this functionality [35]. Port con-                          channel with the state of the art. In a virtualized setting
tention, on the other hand, requires an attacker process which is                              where the sender is running inside a virtual machine, we
co-located with the victim on the same processor core and executes                             reach a throughput of 80 bit/s. We also build a cross-browser
assembly language instructions carefully chosen to conflict with the                           covert channel with an estimated throughput of 200 bit/s.
victim’s instructions. This is highly challenging in a web browser                             (Section 6).
environment:
C1 : In this setting, the attacker’s code is written in a highly-                      2     Background
       abstracted language which is translated into machine code                       In this section, we present background information on microar-
       by a just-in-time compiler;                                                     chitectural attacks, and in particular port contention side-channel
C2 : The attacker has no control over the physical core selected by                    attacks, JavaScript, WebAssembly, and literature on microarchitec-
       the browser to execute the attack code;                                         tural attacks in the browser.
C3 : Finally, web-based timers have a lower resolution than native
       hardware-based timers, increasing the attacker’s measure-                       2.1     Microarchitecture and Port contention
       ment noise.
                                                                                       Hyper-Threading and CPU ports. Modern Intel CPUs have an
   Our work tackles these challenges, and asks the following ques-                     implementation of simultaneous multithreading (SMT) commer-
tions: Can port contention attacks be mounted from within the                          cially referred to as Hyper-Threading Technology. It aims at allow-
browser? What are the implications of this new attack vector?                          ing more parallelization with the same microarchitectural compo-
Contributions. The main contributions are as follows:                                  nents. At an abstract level, the CPU splits each of its physical cores
   • We show that port contention can be ported to web browsers                        into two logical cores, running their own processes. The logical
     via WebAssembly, despite the strong requirements of this                          cores are independent at the OS level, acting as different physical
     attack and the abstraction of the WebAssembly language.                           cores. At the microarchitectural level, however, they share common
     This greatly increases the attack surface that is due to port                     hardware, such as L1 and L2 caches, or execution engines.
     contention (Section 3).                                                              To optimize out-of-order execution, modern CPUs decompose
   • We propose an automated framework to find which Web-                              native instructions into smaller, atomic operations, called micro-
     Assembly instructions can cause port contention on a given                        operations, or 𝜇ops. Figure 1 illustrates how the physical core de-
     Intel processor (Section 4).                                                      coder fetches the instructions and decomposes them into 𝜇ops. The
   • We demonstrate a side-channel attack on a synthetic exam-                         𝜇ops are then distributed to the execution engines by the scheduler,
     ple, to evaluate the resolution of our port contention attack.                    through multiple CPU execution ports. Each port leads to several
2 This work was presented before heavy countermeasures against timing attacks.
                                                                                       execution units that will process the 𝜇ops. Then, when all 𝜇ops
The covert channel is theoretically still implementable, but with a heavily degraded   of an instruction are executed, the instruction is completed and
bandwidth.                                                                             committed to the microarchitecture. The distribution of 𝜇ops to
ports is deterministic, with each execution unit being specialized        attacker evicts said line by using the native instruction clflush
to process certain types of instructions. For instance, arithmetic        and then, after a certain period, times the access to the address. If
𝜇ops are distributed to port 0, 1, 5 or 6 (P0156). The port usage of      the access time is short, this means the value has been loaded into
instructions have been documented by Abel and Reineke [2]. The            the cache between the flush and the reload, meaning the victim
ports are shared by all processes running on the same physical core.      has accessed said cache line. Flush+Reload has a spatial resolution
This means that threads running on different logical cores, but on        of a single cache line, i.e., 64 bytes. It, however, requires access
the same physical core, output 𝜇ops to the same CPU ports.                to native instructions, as well as shared memory. Liu et al. [23]
                                                                          implemented Prime+Probe, a cache attack that does not require
Port contention side-channel attacks. Sharing microarchitec-
                                                                          shared memory or access to native instructions. Instead of sharing
tural components between processes can leak information through
                                                                          a cache line with the victim and flushing it, the attacker uses an
timing attacks. By timing the execution time of specific operations,
                                                                          eviction set, i.e., a group of addresses indexed on the same cache set,
attackers can infer the state of the microarchitecture, possibly grant-
                                                                          to evict all previous lines in this cache set. This attack has a slightly
ing them access to secret information. Aldaya et al. [3] introduced
                                                                          reduced spatial resolution compared to Flush+Reload, consisting
a timing attack based on port contention named PortSmash. As a
                                                                          of one cache set. The size of a cache set varies between processors,
CPU port can handle a single 𝜇op per cycle, it can act as a bottleneck
                                                                          but it usually ranges from 12 to 20 cache lines, i.e., from 768 to 1280
in the flow of operations. Thus, by repeatedly calling and timing
                                                                          bytes.
instructions with a specific port usage, a spy process can monitor
𝜇ops from other threads on the same physical core. For instance, an
attacker can repeatedly call the crc32 instruction, which is decom-       2.2    JavaScript and WebAssembly
posed into a single P1 𝜇op. This will create a bottleneck on P1. Next,    JavaScript. JavaScript is a high-level object-oriented interpreted
by measuring the execution time of the instruction, the attacker          scripting language that follows the ECMAscript standard [10]. It
knows if instructions from other processes co-located on the same         is a major part of the World Wide Web as it is in charge of most
physical core are distributed on the same port. More specifically, if     client-side computing in almost all websites. A user visiting a web-
the attacker’s instruction has a longer execution time than usual,        site downloads and executes various scripts. As a consequence, it
this means that another process has issued one or more 𝜇ops to P1.        is meant to run on the client’s hardware, and needs to be system-
Aldaya et al. exploited this vulnerability to mount an end-to-end         independent. For security reasons, JavaScript is executed in a sand-
attack on OpenSSL’s TLS implementation and recover private keys.          box, restricting access to local files, native instructions, and memory
Their side channel offer a spatial resolution, i.e., the smallest event   addresses.
they can distinguish, of a single instruction.                               JavaScript code is interpreted and executed in the browser by
   Bhattacharyya et al. [5] leveraged port contention as a side chan-     the JavaScript engine [13, 26]. The just-in-time (JIT) compilation
nel in their speculative execution attack SMoTherSpectre, with            approach taken by these engines means that the same code can be
a spatial resolution of a single victim instruction. They also pre-       executed differently based on the engine, browser, or even the OS
sented a methodology to find vulnerable gadgets. Gras et al. [14]         and microarchitecture.
introduced ABSynthe, an automated framework to identify on-core
contention-based side channels. Their blackbox model does not             WebAssembly. WebAssembly [42] (or wasm) is an open-sourced
focus on specific microarchitectural components, e.g., CPU ports,         binary instruction format designed to be deployed on the web, for
but on the interaction between different instructions.                    clients or servers. Its main feature is to allow compilation from var-
                                                                          ious languages and executing them at native speed. On the client
Other microarchitectural side-channel attacks. The cache is               side, WebAssembly is designed to run inside of the JavaScript sand-
a small, fast memory. It is used to dynamically store copies of           box, hence ensuring the same security restrictions. WebAssembly
frequently used memory to reduce access latency. Modern Intel             is currently supported by major web engines, including V8 (found
CPUs often have three levels of cache of different sizes. The L1          on Google Chrome and Microsoft Edge), WebKit (found in Apple
cache is the smallest and fastest, while the L3 cache, also known as      Safari) and SpiderMonkey (found in Mozilla Firefox).
last-level cache, or LLC, is bigger and slower. Both L1 and L2 are            WebAssembly functions as a low-level, assembly-like, program.
private to each core, whereas the LLC is shared by all physical cores.    It is built around a stack-based virtual machine. It supports two
Modern caches are set associative, meaning a cache line is stored in      main formats: binary, which is directly interpretable by the engine,
a fixed set determined by its address, virtual or physical. It can be     and the text format, human-readable format, allowing to read and
stored in any of the ways of a cache set, based on the replacement        modify compiled WebAssembly code. WebAssembly’s specification
policy of this level. Modern Intel LLCs often have several ways,          is still under development, and it currently has around 100 specified
ranging from 12 to 20. When the CPU needs to access a specific            instructions, with various operands.
address, it first queries the cache. If the address is stored in the
cache, the data will be directly served from the cache, resulting in a
                                                                          2.3    Timing attacks and microarchitectural
short access time (a cache hit). If not, the CPU will access the data
from the DRAM, resulting in a slower access time (a cache miss).                 attacks in the browser
   Such timing differences can be exploited by an attacker to mount       JavaScript timers. With the development of microarchitectural
side-channel attacks or covert channels. Yarom and Falkner pre-           attacks, in particular Spectre, browser vendors introduced several
sented Flush+Reload [43], a cache attack that exploits shared mem-        countermeasures in order to provide more isolation to the JavaScript
ory to infer whether the victim accessed a certain cache line. The        sandbox. In particular, Reis et al. [29] introduced a new browser
architecture based on site isolation, where each site runs in a dif-       Rushanan et al. [31] used CPU-throttling to build a covert chan-
ferent process. This prevents an attacker to access the memory             nel with a bitrate of 0.2 bit/s. Schwarz et al. [33] implemented
space of other sites in the same browser. COOP and COEP [7, 8]             a DRAM-based covert channel in the browser. They reached a
extended site isolation. They are a set of header between the top          bitrate of 11 bit/s when using SharedArrayBuffer-based clocks.
level domain and all loaded resources. When enabled, the site is           Lipp et al. [21] presented a cross-browser channel using network
considered cross-origin isolated, ensuring a unique process for the        interruptions, reaching a bandwidth of 25 bit/s. Van Goethem and
context group and safe external resources.                                 Joosen [38] exploited disk or memory contention to send bits every
   To prevent the threat of timing attacks, most browser vendors           200 ms, thus granting a maximal raw bandwidth of 5 bit/s.
have removed access to high-resolution timers. The highest resolu-            Software covert channels have also been implemented in the
tion timer available in recent browsers, performance.now(), has a          browser. For instance, Vila and Köpf exploited Chrome’s event
resolution of 5 µs with jitter in Chrome 94 and 20 µs in Firefox. This     loop, shared between tabs, to create a covert channel with a raw
is highly insufficient to mount microarchitectural attacks, as we          capacity of 200 bit/s for a same-browser channel and 5 bit/s in a
need to measure timing differences in the order of 10 ns. However,         cross browser setting. However, this vulnerability has been miti-
auxiliary timers, able to recover a high resolution in the sandbox,        gated with the introduction of site isolation [29], as different tabs
were described by Schwarz et al. [33].                                     or processes do not share an event loop anymore.
   The most powerful of these auxiliary timers is based on Shared
ArrayBuffer, an array shared between the main thread and a sub-            3    Web-Assembly-Based Port Contention
thread (Web Worker in JavaScript). The main thread initializes a           We introduce, to the best of our knowledge, the first implementation
Web Worker and shares the array with it. Then, the Web Worker              of port contention inside a browser. We can create and measure port
constantly increments a variable in the array. As this operation           contention from the JavaScript sandbox, on both Mozilla Firefox
has a low and constant execution time, it can be used as a unit of         and Google Chrome. We found instructions that create contention
time by the main thread. The main thread can then read the shared          on both P1 and P5, allowing diverse potential victims.
value to get a timestamp. This timer grants a resolution ranging
from 10-100 ns on recent browsers [30]. In the past, SharedArray           Experimental setup and threat model. Unless stated otherwise,
Buffer has been disabled by default to prevent timing attack threats.      we run all experiments on an Intel i5-8365U CPU with a maximal fre-
However, they are available by default when the web page is cross-         quency of 1.60 GHz running Ubuntu 20.10, with Mozilla Firefox 90
origin isolated in Chrome 94 and Firefox 90 [7, 8]. Unless stated          and Google Chrome 95 desktop version, both using WebAssembly
otherwise, all timing measurements in the paper use SharedArray            1.13 . As Safari and Edge support WebAssembly, the attack can the-
Buffer-based clocks, thus the time unit is an increment.                   oretically be carried on these browsers, but they remain outside of
                                                                           the scope of this paper. The threat model is similar to a user visiting
JavaScript timing attacks. The fact that microarchitectural at-            a malicious website with his browser. The browser scripts run in a
tacks can be mounted from JavaScript brings major changes to               cross-origin isolated browser [7, 8], granting more context isolation
their threat model. On the one hand, it allows running code on the         and allowing access to SharedArrayBuffer and higher resolution
victim’s hardware on a very large scale. For instance, an attacker         timers.
can buy an advertisement on a popular website and will be able to
run its scripts on all visitors of said website [11]. On the other hand,   Description. Figure 2 illustrates the principle of our web-based
the sand-boxed execution brings many major restrictions to the             port contention attack. The attacker is situated inside of the browser
implementations of such attacks. The lack of native instructions           sandbox, in the blue process. During the attack, he repeats specific
or memory addresses, for instance, removes the possibility to im-          instructions that cause contention on a specific port. Section 4 ex-
plement some classes of attacks, such as attacks based on Flush+           plains how we find these instructions on different systems. For
Reload [43].                                                               instance, on our processor, the WebAssembly ctz (Count Trailing
   However, in 2015, Oren et al. [27] implemented the first entirely       Zeros) instruction creates contention on P1. Similarly, instructions
web-based cache attack. Many different types of web-based mi-              that truncate floats to integers, e.g., trunc_f32_u, create contention
croarchitectural attacks were since demonstrated, exploiting other         on P5. The attacker then times the execution of these instructions.
components or features, including the DRAM [16], ASLR [15], and            If no other processes use the same port at the same time, these
even speculative execution [18].                                           instructions will all be executed in a row, resulting in a fast ex-
                                                                           ecution time, as exemplified in Figure 2(a). However, if another
Covert channels in browsers. Covert channel in the browsers                process emits 𝜇ops on the same port, these 𝜇ops will be queued
break the fundamental principle of the JavaScript sandbox isolation.       with the attacker-generated 𝜇ops, resulting in a slower execution
In particular, previous work has studied covert channels based on          time for the attacker, as illustrated in Figure 2(b). By measuring
hardware timing attacks. Oren et al. [27] presented a covert channel       these differences in timings, the attacker process can monitor the
based on Prime+Probe with a bandwidth estimated at 320 kbit/s.             port usage on a specific port, and thus monitor other processes.
However, this number was estimated before the introduction of
countermeasures against microarchitectural attacks in this browser.        Challenges. We face three challenges when implementing port
To the best of our knowledge, there has been no work on Prime+             contention in the browser. First, as browser-based scripts run in
Probe subsequently to these countermeasures. The closest covert            a controlled sandbox, we have no access to native instructions,
channel is the one used to extract data in the transient execution         3 We used the latest version available in November 2021. This version did not support
attack RIDL [39], with a bandwidth of 8 bit/s using Evict+Reload.          vectorial types and SIMD instructions.
                        Attacker                                                                            60




                                                                                Percentage of occurrences
                         instr
             Attacker                       Port 1                                                                                         Control experiment
                                                                                                                                             P1 contention
                                              Atk Atk      Execution                                        40
                           Scheduler         instr instr    engine



              Victim
                                                                                                            20


(a) Victim has not used port 1: all attacker instructions are executed                                      0
in a row.                                                                                                        4.7   4.75   4.8 4.85 4.9 4.95      5
                                                                                                                               Execution time (ms)
                         Wasm
                         instr
             Attacker                       Port 1
                                                                         Figure 3: Port 1 contention experiment on i64.ctz for
                                                                         1 000 000 instructions.
                                        Atk Victim Atk     Execution
                           Scheduler   instr instr instr    engine



              Victim
                        Victim
                         instr


(b) Victim emitted one 𝜇op on port 1: attacker instruction will be       creates a sub-thread running in a different process. This lets the
delayed.                                                                 attacker create as many attacker processes as physical cores, and as
                                                                         they all have a high workload, they are spread on different physical
        Figure 2: Illustration of web port contention.                   cores. Then, one of the attacker processes runs on the same core as
                                                                         the victim process, able to monitor it.
                                                                            Finally, our attack requires high-resolution timers to monitor
and must instead use higher-level language constructs (C1). Fur-         processes at the 𝜇op level (C3). Native implementations of port
thermore, as browser-based scripts are meant to be portable, the         contention attacks all use the cycle-accurate rdtsc instruction. As
instructions are translated to different assembly language instruc-      explained in Section 2, browser vendors have restricted access to
tions by the browser’s engine on different systems. This means that      such timers inside of the sandbox to prevent timing attacks. In our
the same script generates different native instructions depending        attack, unless stated otherwise, we use SharedArrayBuffer-based
on the CPU architecture, each with a different port usage, varying       timers, which offer a resolution and measurement time in the order
from vendors and generations. The code is also highly optimized by       of 20 ns [30, 33].
the engines, and execution can vary even on the same system, based
on the variables or structure of the code. To gain more control over
the port usage of our attacks, we mounted our attack with Web-           Proof-of-concept. Figure 3 shows a proof-of-concept illustrating
Assembly. This grants us access to smaller, more atomic instructions.    the contention on P1 caused by the WebAssembly i64.ctz instruc-
However, these instructions are still executed through the browser’s     tion.
JIT engine, and their translation to machine language can vary from          In this experiment, we time the execution of 1 000 000 Web-
a system to another. For instance, the WebAssembly instruction ctz       Assembly i64.ctz instructions using the low-resolution JavaScript
is translated into the native Intel instruction TZCNT on our system,     function performance.now. We run the experiment on Firefox 90,
as we describe in more detail in Section 4. The TZCNT instruction, in    where this timer offers a resolution of 20 µs without jitter. In paral-
turn, is implemented using a single 𝜇op which is executed on P1 [1].     lel with the Firefox code, we also run a sender program written in
Thus, repeatedly executing the WebAssembly instruction ctz can           native code and pinned to the same processor. In the P1 contention
cause contention on P1. The Intel instruction TZCNT is only avail-       experiment, the native sender runs the Intel instruction crc32 in a
able, however, on CPUs starting from the Broadwell generation.           loop. This assembly language instruction is known to cause con-
Thus, the WebAssembly ctz instruction may generate contention            tention on P1. In the control experiment, the native sender runs
on another port in older CPU generations. Directly compiling na-         a simple loop designed not to cause port contention. We run this
tive code using x86 assembly instructions to create contention is        program, instead of simply not executing the sender at all, to ensure
not possible. Since WebAssembly is designed as a portable lan-           that the difference stems from port contention, and not from other
guage, the compilers cannot compile instructions that are directly       sources. As the figure shows, the timings measured during the P1
architecture-dependent, as they could not run on non-Intel CPUs.         contention experiment are on average 5% higher than the control
    Secondly, the high level of abstraction provided by the browser      experiment, allowing the browser to efficiently distinguish between
means that an attacker can neither know nor control on which             the two distributions. We observe similar results on Chrome 95.
core the attack is executed (C2). Furthermore, the operating sys-            In the following sections, we describe how to convert this proof-
tem’s scheduler dynamically moves processes between cores to             of-concept into practical attacks. In particular we obtain a higher
optimize computing and save energy. We address this challenge by         spatial resolution and evaluate 100 WebAssembly instructions (C1),
performing our attack on multiple cores simultaneously by using          we ensure the attacker does not have to pin processes (C2), and we
Web Workers, JavaScript multi-threading implementation, which            use a higher resolution timer (C3).
4     PC-detector                                                         Table 2: WebAssembly instructions causing port contention.
                                                                          For clarity, we group together the 32- and 64- bits versions
The translation of WebAssembly instructions into 𝜇ops is variable
                                                                          of instructions under one line marked i32/i64.
on different systems: it can depend on the microarchitecture, in-
struction extension sets or JavaScript engine. In this context, it can
                                                                           Instruction                             P1 contention   P5 contention   Cohen’s d
be hard to find WebAssembly instructions that reliably cause port
                                                                           i32/i64.ctz                                                                1.2
contention. In this section, we propose PC-detector, a Selenium-           i32/i64.clz                                                                 1
based framework to dynamically detect and characterize the port            i32/i64.popcnt                                                              1
                                                                                                                                                      10
usage of WebAssembly instructions. Using the methodology de-               i32/i64.div_s
                                                                           i32/i64.div_u                                                              10
scribed in Section 3, PC-detector automatically tests multiple Web-        i32/i64.rem_u                                                              34
Assembly instructions and checks if they cause contention on P1            i32/i64.rem_s                                                               5
                                                                           f32.convert_i32_s and i32.trunc_f64_s                                       1
or P5.                                                                     f32.convert_i32_s and i32.trunc_f32_s                                       2
                                                                           f32.convert_i64_s and i64.trunc_f32_s                                       8
                                                                           f32.convert_i32_u and i32.trunc_f32_u                                       2
4.1    Description                                                         f32.demote_f64 and f64.promote_f32                                          3
                                                                           i32.wrap_i64 and i64.extend_i32_u                                          16
Framework. Our framework is composed of two components. The                i32.wrap_i64 and i64.extend_i32_s                                          11
first component is a native C script that either runs an empty loop,
creates contention on P1, or creates contention on P5. The second
component is a Selenium-controlled browser which runs automati-           P1 and P5 have two timing distributions, and one distribution (𝑋𝑙𝑜𝑤 )
cally generated WebAssembly code. For each WebAssembly instruc-           has lower timings than the other distribution (𝑋ℎ𝑖𝑔ℎ ) when there is
tion instr, we create a binary file with 1 000 000 calls. This file is    contention. Given a temporal threshold 𝜏, we define the error rate
then executed in the browser, and its runtime is measured using           as the proportion of values of 𝑋𝑙𝑜𝑤 > 𝜏 and values of 𝑋ℎ𝑖𝑔ℎ < 𝜏
performance.now(). We run three experiments:                              over all experiments. We define the error rate for a given threshold
    (1) Repeatedly executing and timing the WebAssembly file, used        as
                                                                                                  |𝑋𝑙𝑜𝑤 > 𝜏 | + |𝑋ℎ𝑖𝑔ℎ < 𝜏 |
        as a control.                                                                      𝑒𝑟𝜏 =                             .
    (2) Creating contention on P1 with native code and timing the                                     |𝑋𝑙𝑜𝑤 | + |𝑋ℎ𝑖𝑔ℎ |
        WebAssembly file.                                                 Then, by computing 𝑒𝑟𝜏 for [𝑚𝑖𝑛(𝑋𝑙𝑜𝑤 ) < 𝜏 < 𝑚𝑎𝑥 (𝑋ℎ𝑖𝑔ℎ )], we
    (3) Creating contention on P5 with native code and timing the         can retrieve the lowest error rate possible, giving us the probability
        WebAssembly file.                                                 for a program to blindly distinguish between port contention and
By evaluating the timing distributions of these three experiments,        standard usage from experiment timings. By inverting 𝑋𝑙𝑜𝑤 and
we can evaluate the port usage of instr. If the three distributions are   𝑋ℎ𝑖𝑔ℎ and computing the best error rate, we can see if an instruction
mixed, instr is not affected by the port contention (thus it cannot       creates contention on P1, P5 or none. In PC-detector, we infer that
cause it). If the P1 timings (respectively P5) are, on average, higher    if 𝑒𝑟 < 5%, an instruction creates contention.
to both the control and P5 (respectively P1), this means instr can            The error rate calculation lets us identify whether an instruction
detect, and cause, contention on P1 (respectively P5).                    creates contention. It does not, however, illustrate the efficiency
   We evaluate all standardized single and double operand opera-          of this contention, i.e., how separated both distributions are or
tions [41], including arithmetic operations and memory operations.        how spread they are. This parameter is important in our attacks,
Due to the stack machine structure of WebAssembly, each experi-           as the more distance between the distributions, the easier it is to
ment includes a load operation to add values to the stack between         distinguish between contention and standard usage. In order to
each operation. We discovered that due to JIT optimizations, it           measure the distance between P1 and P5, we compute the effect
is not possible to load many values on the stack before running           size, also known as Cohen’s 𝑑. In our case, Cohen’s 𝑑 between P1
double operand operations in a row, as the compiler reorders the          and P5 is defined as
instructions to alternate between loads and the tested operation.                                  |𝑚𝑒𝑎𝑛(𝑃1) − 𝑚𝑒𝑎𝑛(𝑃5)|
                                                                                            𝑑= p                               ,
Therefore, we could not run all double operand operations one after                                (𝑠𝑡𝑑𝑒𝑣 (𝑃1) + 𝑠𝑡𝑑𝑒𝑣 (𝑃2))/2
the other. We evaluate single instructions when instructions have
                                                                          with stdev() the standard deviation of the distribution. A high Co-
an output the same type as their input, and pairs of complementary
                                                                          hen’s 𝑑 means that distributions are highly separated and concen-
instructions in the other case (e.g., convert a 32 bit integer into a
                                                                          trated, and that we can more easily distinguish contention from
64 bit float). We do not evaluate control flow operations, e.g., loops
                                                                          standard usage.
or jumps.

Metrics. We propose two main metrics to automatically evaluate            4.2      Results
if a WebAssembly instruction can create contention on P1 or P5.           We have tested 100 different instructions, including numerical, mem-
The first one is based on the error rate between timings from the P1      ory, bit-wise, and type conversion operations.
and P5 experiments. For this metric, we compare P1 to P5 instead             Table 2 lists which instructions cause contention on the i5-8365U.
of P1 to control, as the control experiment does not run calculation      The results are identical between Chrome and Firefox, although
on the native side. This means that the timing differences could          the distance varies because of the different browser architectures.
originate from other sources than port contention, e.g., variation in     In total, we found 21 instructions causing contention. As most
frequency or contention on another shared hardware component.             instructions have 32- and 64-bit variants, some instructions are
doubled. Generally, we observe that 64-bit variants have a greater          Listing 1: Side channel artificial example. Depending on the
Cohen’s 𝑑 than their 32-bit counterparts. Similarly, the unsigned           key bit passed in parameter, the code will have different port
variants of integer operations often grant better results than the          usage.
signed variants.                                                                  TEST % r d i , % r d i
   P1 contention seems to be caused by arithmetic instructions,                   JE . p 1
whereas conversion/truncation operations create contention on                     JMPQ . p 5
P5. This result is coherent with the specialization of ports and
                                                                                  .p1
execution units. i64.rem_u shows the highest effect size of all
                                                                                  POPCNT %r8 , % r 8
detected instructions.                                                            POPCNT %r8 , % r 8
   To demonstrate the portability of port contention and PC-detector,              ...
we have ran the same benchmark on different Intel CPUs. In total,                 POPCNT %r8 , % r 8
we have tested 4 recent CPUs: i5-8365U, i7-8650, i7-10510 and i7-                 POPCNT %r8 , % r 8
10610. The instructions creating contention remain constant, but                  .p5
Cohen’s 𝑑 can vary based on the CPU frequency. This is logical,                   VPBROADCASTD %xmm0 ,     %ymm0
as all tested cores have the same instruction set extensions, mean-               VPBROADCASTD %xmm0 ,     %ymm0
ing that the WebAssembly instructions are translated to the same                   ....
                                                                                  VPBROADCASTD %xmm0 ,     %ymm0
native instructions.
                                                                                  VPBROADCASTD %xmm0 ,     %ymm0

5     Side-channel Attack on Artificial
      Applications                                                          physical core as the victim (C2). Most schedulers try to balance the
In this section, we present an artificial gadget, illustrating the side-    workload between physical cores. By creating a number of listening
channel threat of web-based port contention. We built a synthetic           Web Workers equal to the number of physical cores, we maximize
and generic example showing how a program, which execution                  our chances that one of them listens on the victim’s physical core,
depends on secret information, is vulnerable to WebAssembly port            thus circumventing C2. Information about the system’s core count
contention. Indeed, if a program has branches depending on se-              is available through the navigator.hardwareConcurrency Java-
cret bits, an attacker can use a side-channel attack to infer the           Script API [25], available by default on both Chrome and Firefox.
secret. The victim process is an unprivileged native process. The
attacker is a JavaScript and WebAssembly script, running inside             5.2     Results
of the browser’s sandbox. The attacker has no access to addresses,          An important metric for our evaluation is the spatial resolution, i.e.,
native instructions, and no control or knowledge of physical or             the smallest number of instructions we can detect in a branch. To
logical cores.                                                              detect contention, we measure the execution time of 𝑛𝑏𝑖𝑛𝑠𝑡𝑟 Web-
   In our implementation, an attacker, running code inside the              Assembly rem_u instructions. This parameter is important: a high
browser’s sandbox, monitors the victim’s execution with a spatial           number of instructions lowers our spatial resolution, but a lower
resolution of 1024 native instructions, i.e., 3072 bytes. This spatial      number yields noisier time measurements. Furthermore, for values
resolution is of the same order of magnitude as other microarchi-           of 𝑛𝑏𝑖𝑛𝑠𝑡𝑟 ranging from 1 to 10, the execution time of the instruc-
tectural attacks in the browser, e.g., Prime+Probe, which has a             tion is slower than the read access to the shared array and other
resolution of a cache set (typically 12 to 20 cache lines), i.e., 1280      overhead introduced by JavaScript. This means that contention is
bytes on our system.                                                        measured at only specific times in the measurement. To reduce
                                                                            the measurement time of SharedArrayBuffer, we access the array
5.1    Description                                                          directly, without using concurrent access libraries. This grants a
The victim is a native unprivileged program, running different code         better resolution to the timer but creates more noise and outliers.
sections based on the bits of secret information. As port usage             On our system, we were able to create a web listener running in
differs between branches, an attacker monitoring port contention            the same physical core as the victim in 95% of our experiments. We
could infer parts of the secret. Listing 1 illustrates our gadget, imple-   infer that the remaining errors stem from the scheduler moving our
mented in native assembly code. Depending on a secret bit, the code         process to different cores because of other threads creating noise.
will execute either instructions creating contention on P1 or P5. To           On our system, we found 𝑛𝑏𝑖𝑛𝑠𝑡𝑟 = 10 to be the best compromise
detect from within the browser which path is taken by the victim,           between noise and resolution. To reduce the noise, we process the
we time the execution of 𝑛𝑏𝑖𝑛𝑠𝑡𝑟 WebAssembly rem_u instructions,            data with a median sliding window with a width of 10 measure-
which creates contention on P1 (Section 4). If the execution time is        ments. Figure 4 illustrates the resulting values when the victim runs
high, then we know that the native code also creates contention on          the code with the secret 1101001, for a single trace of the victim. The
P1, whereas if it is standard, we know that the native code does not        high values represents the execution of the victim branch creating
create contention. By repeating this process, we detect the branch          contention on P1 i.e., a bit set to 1. The width of a peak or a pit is
that was executed by the native script, and hence the value of the          proportional to the number of bits inside the sequence.
secret bit.                                                                    Our implementation is able to detect the executed branch with a
   After resolving C1 with PC-detector and C3 with SharedArray              resolution of 1024 native instructions on both Google Chrome and
Buffers, we still face the inability to pin the attack code to the same     Mozilla Firefox. To obtain this result, we first implement Listing 1
     (SharedArrayBuffer increments)
                                                                              6.1    Description
                                      400                                     We implemented a half-duplex asynchronous channel based on port
                                                                              contention, between a native sender and a web-based receiver. In
             Execution time




                                                                              addition to data, the sender and receiver exchange control messages
                                                                              to handle acknowledgments and synchronization. Both parties must
                                      200
                                                                              therefore be able to send and receive bits. Our side channel can be
                                                                              decomposed into two layers. The lower layer, sending and receiving
                                                                              bits, is equivalent to the physical layer of the TCP/IP model. This
                                        0                                     layer uses CPU ports as its transmitting channel, and must be able
                                            0   10     20       30       40   to distinguish between 0 and 1 bits. The upper layer is equivalent to
                                                Measurements (𝑛𝑏𝑖𝑛𝑠𝑡𝑟 = 10)
                                                                              the data-link layer. This layer handles the synchronization between
                                                                              the parties, as well as error management.
Figure 4: Single-trace execution with secret information
                                                                              Physical layer. The two parties send 1-bits by creating contention
1101001, on Chrome 95.
                                                                              on P1 for a fixed duration (𝑡𝑏𝑖𝑡 ), and send 0-bits by idling for 𝑡𝑏𝑖𝑡 .
                                                                              𝑡𝑏𝑖𝑡 is an important factor, as a high duration lowers the channel’s
                                                                              bandwidth but allows the receiver to tolerate more noise when
                                                                              attempting to distinguish bits. In our covert channel implementa-
                                                                              tion, we have fixed 𝑡𝑏𝑖𝑡 = 1 ms. To create contention, the sender
with a very high number of POPCNT and VPBROADCASTD instructions,
                                                                              and receiver repeatedly call an instruction, respectively the native
that we progressively lower. The resolution is the lowest number of
                                                                              Intel instruction crc32 and the WebAssembly instruction rem_u.
instructions where we can clearly retrieve the secret bits without
                                                                              To receive a bit, the sender or receiver repeatedly call these in-
error on a single victim trace.
                                                                              structions while timing them. A high execution time means the
   This experimental limit of 1024 instructions is mainly due to
                                                                              emitting party is sending a 1, while a standard time means a 0. As
the lack of access to high resolution timers. Note that we observe
                                                                              both instructions are handled by the CPU port P1, both the sender
two peaks per secret bit with a single trace. We have found that a
                                                                              and receiver cannot emit at the same time, making our channel a
higher resolution of 512 instructions could introduce errors with a
                                                                              half-duplex channel. Besides their high resolution, another advan-
single-trace attack. One solution to increase the resolution would
                                                                              tage of a SharedArrayBuffer-based timer is that it is based on a
be to revert to multiple-trace attacks. Moreover, by using a custom
                                                                              Web Worker, and therefore runs on a different core. This lowers
browser implementing performance.rdtsc(), based on the native
                                                                              potential noise on the covert channel.
cycle accurate timer, we observed that our implementation has a
                                                                                  We also need to ensure both the sender and receiver are running
resolution of 256 instructions, i.e., a better spatial resolution than
                                                                              on the same core (C2). As the browser cannot control which core it
Prime+Probe. This means that our experimental limit could be low-
                                                                              is running on, the sender creates as many sub-senders as physical
ered with better auxiliary timers or noise filters, which could offer
                                                                              cores. The sender runs native unprivileged native code, so it knows
a more fine-grained attack vector than existing microarchitectural
                                                                              the number of physical and logical cores, and can pin each of its
side channels in the browser.
                                                                              sub-threads to a specific core. This ensures that at least one sender
                                                                              thread is running on the same physical core as the receiver.
6   Covert channel                                                                Although SharedArrayBuffers offer a high resolution, they can
In this section, we present a port contention-based covert chan-              introduce errors at the physical layer level. In particular, concurrent
nel with a throughput of 200 bit/s for a 1% error rate. This covert           accesses between the thread incrementing a value and the main
channel is composed of a sender running unprivileged native code,             thread reading the timestamp can cause insertion or deletion errors.
and a receiver running completely inside the browser (similarly as            We have determined two error-prone scenarios at the physical level.
Schwarz et al. [33]). We also show that our covert channel runs               In the first scenario, the main thread reads the shared value too
with a sender located inside a VM, and can even be used in a cross-           frequently. This prevents the clock thread from incrementing the
browser fashion (similarly as Lipp et al. [21]).                              value, and as a result the measured time is much lower than the
   The sender runs unprivileged C code on the victim’s hardware.              real time value. The other scenario stems from particularly high
The sender can therefore freely use most native instructions, and             measurement outliers when contention is created. We assume it
has access to cycle-accurate timers. It can also pin itself to a cer-         also comes from concurrent accesses. As this access is longer than
tain physical or logical core. The receiver, on the other hand, runs          usual, it means that we can get less measurements during 𝑡𝑏𝑖𝑡 , thus
fully inside a cross-origin isolated web page. As it runs inside the          creating bit deletion errors on higher layers.
browser’s sandbox, the receiver has no access to native instruc-              Protocol and frame format. To ensure synchronization and cor-
tions. Port contention must be created and measured by using                  rect potential errors, we implemented a simple protocol above our
WebAssembly (C1). Moreover, the web script must share a physical              physical layer, similarly as Maurice et al. [24]. Figure 5 illustrates a
core with the sender, but cannot control or know on which physical            typical exchange, as well as packet loss management. It is based on
core it is running (C2). Finally, the receiver does not have access to        a simple request-to-send scheme: the receiver sends a request frame
high resolution timers (C3). Instead, we use SharedArrayBuffers               (described in Figure 6(a)), containing a 4-bit sequence number. Upon
to get the best resolution available.                                         reception, the sender sends a data frame (described in Figure 6(b)),
                 Sender                                  Receiver          Our protocol also manages packet loss and desynchronization.
                                    Request                             This is handled by the sequence number and the request-to-send
                                    SEQN 0
                                                                        scheme. As illustrated in Figure 5, after sending a request, the
                                    Data                                receiver waits for a fixed timeout value. If it has not received an
                                    SEQN 0
                                                                        answer at the end of this time period, it simply re-sends the request.
                                         Request
                                                                        This lets the covert channel recover from packet loss from the
                                      × SEQN 1
                                                                        sender to the receiver, and from the receiver to the sender.
                                    Request
                                    SEQN 1                              Receiving frames. The sender and receiver do not share a com-
                          Data                                          mon clock. Hence, the party receiving bits does not know in ad-
                          SEQN 1 ×                                      vance the demarcations between successive bits, nor when the
                                    Request
                                                                        frame starts. It is processing execution time of instructions as a
                                    SEQN 1                              real-time stream of information, not in post-processing. In order
                                                                        to automatically detect the start of the frame, as well as the actual
                                    Data
                                    SEQN 1                              bits, both sender and receiver run DenStream [6], a density-based
                                                                        data-stream clustering algorithm. It dynamically creates clusters
                                                                        of data, based on the execution time and their time of arrival. The
                                                                        listening party then detects the start of the frame when it detects
Figure 5: Illustration of the protocol’s synchronization in
                                                                        4 consequent small clusters with variation in execution time, cor-
case of lost or incorrect packet.
                                                                        responding to the initial sequence of 1010. The initial sequence is
                                                                        used to calibrate two major values: the temporal threshold between
                  0   1   2     3     4     5   6    7
                                                                        0-bits and 1-bits, as well as the average number of instructions in a
                  Init sequence           Encoded -                     single bit. The average number of points lets the algorithm detect
                   -Sequence                                            the number of bits in a sequence. As DenStream computation can
                     number                                             be slow when we reach a high bit rate, we only use it to detect the
                                                                        preamble. For the rest of the frame, we use a simple stream-based
                          (a) Request frame.                            threshold detection: timings above the calibration threshold are
                  0   1   2     3     4     5   6    7                  identified as 1-bits, and others as 0-bits.
                                          Sequence                          To infer the actual number of bits in such a sequence, we use the
                  Init sequence
                                           Number                       average number of instructions calibrated from the initialization
                                Data                                    sequence. Then, by dividing the number of instructions in our same
                                                                        bit sequence, we can infer how many bits it contains. This step is
                  Berger code                                           prone to insertion or deletion errors.
                                                                            When the stream algorithm has detected a number of bits corre-
                              (b) Data frame.
                                                                        sponding to the frame size, it stops listening. If the frame is invalid
                                                                        because of insertion and deletion errors, we try to reinterpret it with
      Figure 6: Format of the request and data frames.                  slightly modified calibration values. Indeed, variation in frequency
                                                                        can cause slight changes on the number of measurements in a bit,
                                                                        e.g., a frequency raise means we measure more instructions in a bit,
containing the sequence number as well as the associated data (1        thus potential insertion errors.
byte). If the data frame is received correctly, the receiver requests
the next sequence number. Both frames start with a 4-bit preamble       6.2    Evaluation
consisting of an initial sequence which is always set to 1010. This     We evaluated our covert channel in two different scenarios. The
initial sequences serves as calibration for the receiver.               first scenario is the baseline implementation, where both the native
   To handle possible insertion or deletion errors, we added an error   sender and web-based receiver run in a standard OS. In the second
detection code. More specifically, the sequence number is encoded       scenario, the native sender now runs in a virtual machine running
with (8,4) Hamming code [17] in request frames, and the last 4 bits     on the victim’s physical hardware, while the browser runs in the
of the data frame contain a Berger code [4], counting the number of     standard OS. This scenario is common, as malware analysis is of-
zeros in the data and sequence number fields. As the type of errors     ten conducted in sandboxed environments such as VMs. We also
we face are mainly bit insertion or deletion, we do not use the error   evaluate the impact of noise on our covert channel.
correcting properties of Hamming code, and instead use it as an
error-detection code.                                                   Native sender. This threat model represents the most common
   Our protocol encodes 8 bits of payload into a 31-bit message,        scenario, where both the browser and the native sender run as
including the preamble, sequence numbers and error detecting            unprivileged processes in the OS. We evaluated our covert channel
code. This means that, with 𝑡𝑏𝑖𝑡 =1 ms, we can reach a maximal raw      by transmitting 10 kB of data from the native sender to the web-
throughput of 1 kbit/s, i.e., a theoretical maximum of data bit rate    based receiver. To compute the error rate, we compare the original
of 260 bit/s.                                                           and received bit sequences bit-by-bit.
Table 3: Evaluation of the port-contention covert channel in




                                                                               (SharedArrayBuffer increments)
different conditions.                                                                                           120

                                                                                                                110




                                                                                       Execution time
 Experimental setup      Bit rate   Packet Loss rate     Error rate
 Noiseless              200 bit/s          5.5%             1%                                                  100
 stress -c 2            170 bit/s           8%              3%
                                                                                                                 90
 stress -m 2            120 bit/s          15%              3%
 stress -c/-m 3          25 bit/s          80%              5%
                                                                                                                 80
 stress -c/-m 8         <1 bit/s           99%              5%                                                        0 10 20 30 40 50 60 70 80 90100110120130140150160170180190
                                                                                                                                                Time

                                                                         Figure 7: Transmitted square signal from Firefox 90 to
   Table 3 illustrates the bit rate and error rate of our channel        Chrome 94 with 𝑡𝑏𝑖𝑡 =1 ms
in different noise conditions. The transmission takes, on average,
slightly less than 7 min. During the transmission, on average 600
frames arrive incorrectly or are lost from the sender to the receiver,   insertion or deletion errors could greatly improve the performance
over a total of 10 600 frames. This represents a total frame loss rate   of the channel in noisy conditions.
of 5.5%. Most of the incorrect frames were the result of insertion or
                                                                         Virtualized sender. We also evaluate our channel in a virtualized
deletion errors. The lost frame rate from the receiver to the sender
                                                                         setup. In this scenario, the native sender runs inside of a virtual
is negligible. We achieve a bit rate of 200 bit/s. This is 80% of the
                                                                         machine running Ubuntu. The browser runs in the standard OS.
maximal bandwidth possible when using 𝑡𝑏𝑖𝑡 =1 ms. The difference
                                                                         The main change in the threat model is that the native sender has
between the bit rate upper bound and our implementation stems
                                                                         no control or knowledge of cores, physical or logical. However, by
from the loss of frames, which requires the sender to wait for some
                                                                         creating multiple sender threads and not pinning them, we managed
time before requesting the data again, as well as from the short
                                                                         to force at least one sender thread to run on a physical core shared
computation time required to handle the protocol.
                                                                         with a receiver. In this setup, our covert channel has a bit rate of
   In this setup, our covert channel presents a better bit rate than
                                                                         80 bit/s. This bit rate is still higher than that of many browser covert
previous web-based covert channels [21, 31, 33, 38, 40]. The only
                                                                         channels [21, 31, 33, 38, 40], and even equivalent to some native
covert channel with a better resolution is Prime+Probe by Oren et al.
                                                                         covert channels in the same setup [34].
[27]. However, recent countermeasures had a substantial negative
impact on the bit rate. To the best of our knowledge, no other Prime+
                                                                         6.3               Cross-Browser Covert Channel Bandwidth
Probe covert channel has been implemented since that allows us
to compare between the two approaches. The closest cache covert                            Estimation
channel is the one presented by van Schaik et al. in RIDL [39], with     Our covert channel can be extended to a cross-browser setup. As we
a bit rate of 8 bit/s.                                                   can create and detect contention on the browser, we can replace the
   We now evaluate our covert channel in the presence of noise.          native sender with a JavaScript sender. This has two major impacts
Noise can impact both the bit transmission through port contention,      on the effectiveness of the attack. First off, the web-based sender
and the SharedArrayBuffer clock. Indeed, we observe that when            loses access to powerful native timers, potentially creating new
stressing the physical core used by the SharedArrayBuffer clock,         errors on the request frames. Most importantly, the browser has no
the number of ticks we measure in each time period decreases,            knowledge of physical or logical cores. It cannot know nor control
in turn decreasing our resolution. However, our covert channel           on which core it is running. To circumvent this difficulty, the web-
shows strong resilience to sources of noises with a low thread           based sender creates a number of Web Workers equal to the number
count. That is because port contention depends on the physical           of physical cores of the machine. By doing so, the scheduler will
core. As our sender and receiver already use a major part of the core    spread these senders on different physical cores. When launching
computing capacities, the OS scheduler tends to move other noisy         the receiver, however, the senders are not the only processes using
processes to different physical cores, thus lowering their impact        a high workload, and we have noticed that launching the receiver
on our covert channel. For instance, when running stress with            and the SharedArrayBuffer clock after the sender results in a
square root (-s) or malloc (-m) on two threads, the bit rate remains     physical core running both the clock and the receiver, and the
on the same order of magnitude. The loss of performance stems            senders sharing the remaining core. We overcome this limitation by
from a higher rate of lost frames due to clock outliers. Our channel     initializing the clock and receiver before the sender. As a result, the
also shows better resilience to sources of noise with a low thread       scheduler assigns a physical core shared by a receiver and a sender,
count than cache covert channels, as the LLC is shared between           effectively allowing the implementation of our covert channel.
cores [24]. However, if a noisy thread runs on a physical core shared       Using this technique, we were able to transmit bits of informa-
either by the clock or the receiver, the performance significantly       tion across browsers through port contention with 𝑡𝑏𝑖𝑡 = 1 ms. i.e.,
drops, as illustrated in the stress -c 3 case. In that case, the lost    conditions equivalent to the native-to-web covert channel. We were
frame rate increases drastically because of lower resolution from        able to demonstrate data transfer at the physical layer from Chrome
our timer. Introducing specific error-correcting codes to correct        to Firefox, from Firefox to Chrome, and between two instances of
the same browser. Figure 7 shows the transmitted square signal               More recently, Taram et al. proposed SecSMT [36], focusing on
from Firefox to Chrome. We did not re-implement the data-link             more secured shared resources against contention-based side chan-
layer to this threat model, as it represents significant engineering      nels. Their approach introduces, at the hardware level, different
work, and leave it to future work. However, this proof of concept         ways to share resources. In a static partitioning, the resources are
solves all scientific and technical challenges, including the most        statically shared between logical cores. In an adaptive partitioning,
difficult, i.e., core management (C2), by its ability to transmit bits.   the partition of resources evolves according to the workload of
As the physical layer offers similar bit and error rates to the na-       logical cores to enhance parallelization. However, the resources
tive sender, even for a long duration of transmission, it is safe to      are never used by both cores at the same time. More interestingly,
estimate that this cross-browser covert channel can reach a final         asymmetric partitioning relies on different levels of trust. This
bandwidth on-par with the native-to-web covert channel, i.e., in          model gains even more performance by letting a low level security
the order of 200 bit/s.                                                   thread leak information to a high-security thread, but not letting
                                                                          high-security information leak to other threads. This is particularly
7     Discussion                                                          interesting in a browser-based scenario. It is unsafe to leak infor-
In this section, we discuss the limitations of our approach, potential    mation to the sandbox, whereas leaking sandboxed information to
countermeasures, as well as future work.                                  other threads presents less threats. Their asymmetric partitioning
                                                                          presents almost no overhead compared to traditional SMT.
7.1    Limitations
The WebAssembly implementation of port contention offers a lower          OS and applications. Software mitigations, outside of the browser,
spatial resolution than the native PortSmash attack proposed by           have also been suggested. First, similarly to cache-attacks mitiga-
Aldaya et al. [3]. Most of this performance loss originates from the      tions, static or dynamic analysis has been suggested in the original
challenges introduced by the JavaScript sandbox. In particular, C3 is     PortSmash article [3]. In particular, a process could try to differenti-
the most challenging aspect. Although auxiliary timers offer a very       ate malicious port usage from legitimate usage by using Hardware
high resolution, they are still inaccurate compared to native cycle-      Performance Counters. However, to the best of our knowledge,
accurate timers. This difference particularly impacts the attack’s        static or dynamic analysis of contention-based side channels has
spatial resolution, as timer imprecision prevents us from measuring       not been studied in the literature.
small time differences.                                                      Port-independent code has also been suggested [3]. If the port
    Another limitation, inherent to port contention and SMT attacks,      usage does not vary accordingly to the secret information, then
is that this attack cannot run in a cross-core setting. We can effec-     port-contention-based side channel attacks are ineffective. However,
tively circumvent C2 by creating more threads to share a core with        such a solution requires to detect and correct all sensitive code in
the victim, but the attack still depends on the OS scheduler. If the      existing sensible implementations, and does not apply to covert
attacker cannot run code on the victim’s physical core, the attack        channels.
does not succeed.                                                            At the operating system level, the scheduler can be aware of
                                                                          SMT attacks, and provide more isolation between processes. For in-
7.2    Countermeasures                                                    stance, allowing highly sensitive operations, such as computations
Many countermeasures have been proposed to mitigate microarchi-           depending on a secret, to run on a different physical core than other
tectural attacks. However, most of these propositions are heavily         applications could reduce the risk of leaking private information in
focused on cache-based side channels. In this section, we provide         a side-channel attack. Similarly, only sharing hardware resources
an overview on existing academic work or other suggestions that           between processes owned by the same user could provide more
focus on mitigating contention-based side channels.                       isolation, especially in cloud environments.

Hardware. One pre-requisite of port contention attacks is sharing
CPU ports between a victim and an attacker. SMT is therefore              Browsers. After the publications of microarchitectural attacks in-
at the core of the attack. To prevent SMT-based side channels,            side the JavaScript sandbox [18, 27], browser vendors studied miti-
including port contention, some have suggested disabling SMT              gations against timing attacks. A popular solution in browsers is
altogether. For instance, SMT is disabled by default in OpenBSD [20]      to remove access to high-resolution timers. By not granting access
or Google’s ChromeOS [12]. However, this proposition represents           to a timer able to identify port contention, the side channel would
a major performance degradation of up to 15% [5], as SMT allows           be mitigated. In particular, by disabling SharedArrayBuffer, the
for a highly efficient use of hardware resources.                         threat posed by port contention side channels would be diminished.
   Townley and Ponomarev [37] proposed SMT-COP, a hybrid ap-              However, this would only reduce the resolution of the side channel
proach based on partitioning the use of resources between threads.        and lower the bitrate of our covert channel, but not fully prevent
This partitioning could be either temporal, each thread accessing         attacks, as other high-resolution timers have been implemented
the resource after the other, or spatial, each thread having their        [30, 33]. Browser vendors recently shifted their mitigation paradigm
execution units. Their approach must be supported by the hardware         from timer-based countermeasures to isolation-based countermea-
and introduces a performance overhead of 8% compared to standard          sures. However, proposed isolation-based countermeasures [29]
SMT, while preventing most contention-based side channels on the          focus on memory isolation, and therefore do not apply to port
execution units or ports.                                                 contention side channels.
7.3     Future Work                                                                 [2] Andreas Abel and Jan Reineke. uops.info: Characterizing latency, throughput,
                                                                                        and port usage of instructions on intel microarchitectures. In ASPLOS, 2019.
This work paves the way to future work on the threat posed by                       [3] Alejandro Cabrera Aldaya, Billy Bob Brumley, Sohaib ul Hassan, Cesar Pereida
contention-based side channels in the browser. First, the security                      García, and Nicola Tuveri. Port contention for fun and profit. In S&P, 2019.
                                                                                    [4] Jay M Berger. A note on error detection codes for asymmetric channels. Infor-
implications of WebAssembly are not properly evaluated yet, es-                         mation and control, 4(1):68–73, 1961.
pecially in the field of microarchitectural attacks. Studying the                   [5] Atri Bhattacharyya, Alexandra Sandulescu, Matthias Neugschwandtner, Alessan-
compilation of WebAssembly and the resulting threats on microar-                        dro Sorniotti, Babak Falsafi, Mathias Payer, and Anil Kurmus. Smotherspectre:
                                                                                        Exploiting speculative execution through port contention. In CCS, 2019.
chitecture would bring a more systematized approach to this field.                  [6] Feng Cao, Martin Estert, Weining Qian, and Aoying Zhou. Density-based clus-
A benchmark, similar to Abel and Reineke’s uops.info [2] could                          tering over an evolving data stream with noise. In Proceedings of the 2006 SIAM
clarify the execution pipeline, from high level JavaScript code to na-                  international conference on data mining, 2006.
                                                                                    [7] MDN contributors. Cross-origin-embedder-policy. https://developer.mozilla.
tive code, including WebAssembly instructions. Moreover, a more                         org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy. Accessed:
generic study of contention-based side channel in the browser, not                      2021-19-11.
                                                                                    [8] MDN contributors. Cross-origin-opener-policy. https://developer.mozilla.org/en-
only ports, could widen the attack surface to other types of victims                    US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy. Accessed: 2021-19-
or other threat models. Finally, we presented a covert channel and                      11.
an artificial example exploiting port contention. Since our attack has              [9] Ghada Dessouky, Tommaso Frassetto, and Ahmad-Reza Sadeghi. Hybcache:
                                                                                        Hybrid side-channel-resilient caches for trusted execution environments. In
a temporal resolution at least in the order of Prime+Probe, we infer                    USENIX Security Symposium, 2020.
it can be used as the fundamental building block of many future                    [10] ECMA. Standard ecma-262. https://www.ecma-international.org/publications/
attacks, e.g., on cryptographic implementations or monitoring.                          standards/Ecma-262.htm. Accessed: 2021-10-11.
                                                                                   [11] Daniel Genkin, Lev Pachmanov, Eran Tromer, and Yuval Yarom. Drive-by key-
                                                                                        extraction cache attacks from portable code. In ACNS, 2018.
                                                                                   [12] Google. Product status: Microarchitectural data sampling (mds). https://support.
8     Conclusion                                                                        google.com/faqs/answer/9330250?hl=en. Accessed: 2021-19-11.
We presented the first implementation of port contention in the                    [13] Google. V8 javascript engine. https://v8.dev/. Accessed: 2021-10-11.
                                                                                   [14] Ben Gras, Cristiano Giuffrida, Michael Kurth, Herbert Bos, and Kaveh Razavi.
browser. We showed that port contention side channels have a                            Absynthe: Automatic blackbox side-channel synthesis on commodity microar-
performance on-par or better than previous microarchitectural                           chitectures. In NDSS, 2020.
side channels in the browser, and a more generic threat model.                     [15] Ben Gras, Kaveh Razavi, Erik Bosman, Herbert Bos, and Cristiano Giuffrida. Aslr
                                                                                        on the line: Practical cache attacks on the mmu. In NDSS, 2017.
We demonstrated the genericity of this attack by building several                  [16] Daniel Gruss, Clémentine Maurice, and Stefan Mangard. Rowhammer. js: A
types of exploits, including a 200 bit/s covert channel, as well as                     remote software-induced fault attack in javascript. In DIMVA, 2016.
                                                                                   [17] Richard W Hamming. Error detecting and error correcting codes. The Bell system
a concrete example illustrating a side-channel attack with a spa-                       technical journal, 29(2):147–160, 1950.
tial resolution of 1024 instructions. We further demonstrated the                  [18] Paul Kocher, Jann Horn, Anders Fogh, Daniel Genkin, Daniel Gruss, Werner Haas,
portability of web-based port contention by testing instructions                        Mike Hamburg, Moritz Lipp, Stefan Mangard, Thomas Prescher, et al. Spectre
                                                                                        attacks: Exploiting speculative execution. In S&P, 2019.
on different Intel CPUs, and we showed that our attack also works                  [19] Jingfei Kong, Onur Aciiçmez, Jean-Pierre Seifert, and Huiyang Zhou. Hardware-
in cross-browser and Host-to-VM settings, while being more re-                          software integrated approaches to defend against software cache-based side
silient to noise than cache attacks. We consider port contention                        channel attacks. In HPCA, 2009.
                                                                                   [20] Michael Larabel. Openbsd disabling smt / hyper threading due to security con-
side channels, and hardware contention side channels in general,                        cerns. https://www.phoronix.com/scan.php?page=news_item&px=OpenBSD-
to be a generic class of attacks that can be used as a building block                   Disabling-SMT. Accessed: 2021-19-11.
                                                                                   [21] Moritz Lipp, Daniel Gruss, Michael Schwarz, David Bidner, Clémentine Maurice,
for future microarchitectural attacks in the browser. This work                         and Stefan Mangard. Practical keystroke timing attacks in sandboxed javascript.
illustrates the difficulty to isolate the JavaScript sandbox from mi-                   In ESORICS, 2017.
croarchitectural attacks, as currently deployed countermeasures                    [22] Fangfei Liu and Ruby B. Lee. Random fill cache architecture. In MICRO, 2014.
                                                                                   [23] Fangfei Liu, Yuval Yarom, Qian Ge, Gernot Heiser, and Ruby B Lee. Last-level
fail to mitigate contention-based side channels.                                        cache side-channel attacks are practical. In S&P, 2015.
                                                                                   [24] Clémentine Maurice, Manuel Weber, Michael Schwarz, Lukas Giner, Daniel Gruss,
                                                                                        Carlo Alberto Boano, Stefan Mangard, and Kay Römer. Hello from the other side:
Acknowledgments                                                                         SSH over robust cache covert channels in the cloud. In NDSS, 2017.
                                                                                   [25] MDN. Navigator.hardwareconcurrency. https://developer.mozilla.org/en-US/
This work benefited from the support of Intel and of the project                        docs/Web/API/Navigator/hardwareConcurrency. Accessed: 2021-19-11.
ANR-19-CE39-0007 MIAOUS of the French National Research Agency                     [26] Mozilla. Spidermonkey javascript engine. https://spidermofnkey.dev/. Accessed:
(ANR).                                                                                  2021-10-11.
                                                                                   [27] Yossef Oren, Vasileios P. Kemerlis, Simha Sethumadhavan, and Angelos D.
                                                                                        Keromytis. The spy in the sandbox: Practical cache attacks in javascript and their
Artifact Availability                                                                   implications. In CCS, 2015.
                                                                                   [28] Antoon Purnal, Lukas Giner, Daniel Gruss, and Ingrid Verbauwhede. Systematic
To ensure the repeatability of our findings and assist defensive                        analysis of randomization-based protected cache architectures. In S&P, 2021.
research, we will publicly release all developed code and data ar-                 [29] Charles Reis, Alexander Moshchuk, and Nasko Oskov. Site isolation: Process
                                                                                        separation for web sites within the browser. In USENIX Security Symposium,
tifacts. This includes the documented source code of PC-detector,                       2019.
our covert channel, and the artificial example, as well as the data                [30] Thomas Rokicki, Clémentine Maurice, and Pierre Laperdrix. Sok: In search of
                                                                                        lost time: A review of javascript timers in browsers. In EuroS&P, 2021.
and results of our experiments. In particular, we hope that public                 [31] Michael Rushanan, David Russell, and Aviel D Rubin. Malloryworker: stealthy
access to PC-detector on a larger scale will help assess the whole                      computation and covert channels using web workers. In International Workshop
picture of the threat posed by port contention side channels.                           on Security and Trust Management. Springer, 2016.
                                                                                   [32] Gururaj Saileshwar and Moinuddin K. Qureshi. MIRAGE: mitigating conflict-
                                                                                        based cache attacks with a practical fully-associative design. In USENIX Security
References                                                                              Symposium, 2021.
                                                                                   [33] Michael Schwarz, Clémentine Maurice, Daniel Gruss, and Stefan Mangard. Fan-
 [1] Andreas Abel and Jan Reineke. Tzcnt uops.info page. https://uops.info/html-        tastic timers and where to find them: High-resolution microarchitectural attacks
     instr/TZCNT_R16_R16.html. Accessed: 2021-11-11.                                    in javascript. In International Conference on Financial Cryptography and Data
                                                                                         Percentage of occurrences
     Security, 2017.
[34] Benjamin Semal, Konstantinos Markantonakis, Raja Naeem Akram, and Jan                                           100
     Kalbantner. Leaky controller: cross-vm memory controller covert channel on                                                                         Control experiment
     multi-core systems. In IFIP International Conference on ICT Systems Security and                                 80
     Privacy Protection. Springer, 2020.                                                                                                                  P1 contention
[35] Anatoly Shusterman, Ayush Agarwal, Sioli O’Connell, Daniel Genkin, Yossi                                         60                                  P5 contention
     Oren, and Yuval Yarom. Prime+probe 1, javascript 0: Overcoming browser-based                                     40
     side-channel defenses. In USENIX Security Symposium, 2021.
[36] Mohammadkazem Taram, Xida Ren, Ashish Venkat, and Dean Tullsen. Secsmt:                                          20
     Securing SMT processors against contention-based covert channels. In USENIX
     Security Symposium, 2022.                                                                                         0
[37] Daniel Townley and Dmitry Ponomarev. SMT-COP: defeating side-channel                                                   8        8.2   8.4   8.6    8.8    9        9.2
     attacks on execution units in SMT processors. In PACT, 2019.
[38] Tom van Goethem and Wouter Joosen. One side-channel to bring them all and in                                                          Execution time (ms)
     the darkness bind them: Associating isolated browsing sessions. In 11th USENIX
     Workshop on Offensive Technologies (WOOT), 2017.
[39] Stephan van Schaik, Alyssa Milburn, Sebastian Österlund, Pietro Frigo, Giorgi      Figure 8: P1 contention experiment on f64.floor for
     Maisuradze, Kaveh Razavi, Herbert Bos, and Cristiano Giuffrida. RIDL: rogue        1 000 000 instructions.
     in-flight data load. In S&P, 2019.
[40] Pepe Vila and Boris Köpf. Loophole: Timing attacks on shared event loops in
     chrome. In USENIX Security Symposium, 2017.




                                                                                         Percentage of occurrences
[41] W3C. Index of standardized webassembly instructions. https://webassembly.
     github.io/spec/core/appendix/index-instructions.html. Accessed: 2021-19-11.                                     100
[42] W3C. Webassembly. https://webassembly.org/. Accessed: 2021-10-11.                                                                                  Control experiment
[43] Yuval Yarom and Katrina Falkner. FLUSH+RELOAD: A high resolution, low
                                                                                                                      80
                                                                                                                                                          P1 contention
     noise, L3 cache side-channel attack. In USENIX Security Symposium, 2014.                                         60
[44] Yinqian Zhang and Michael K. Reiter. Düppel: retrofitting commodity operating                                                                        P5 contention
     systems to mitigate cache side channels in the cloud. In CCS, 2013.                                              40
                                                                                                                      20
A     Port Contention on Other WebAssembly                                                                             0
      Instructions                                                                                                              20         25          30          35
Figures 8 to 10 show port contention on the following WebAssembly                                                                          Execution time (ms)
instructions: f64.floor, the pair f32.convert_i32_u and i32.
trunc_f32_u, and i64.rem_u. We can clearly distinguish the three                        Figure 9: P1 contention experiment on i64.rem_u for
outcomes of a PC-detector usage:                                                        1 000 000 instructions.
     • Figure 8 illustrates an instruction that do not cause con-
       tention. The P1 and P5 distributions have a similar mean
                                                                                         Percentage of occurrences




       and standard deviation, making them difficult to distinguish.                                                 100
       However, they are still distinguishable from the control ex-                                                                                     Control experiment
                                                                                                                      80
       periment.                                                                                                                                          P1 contention
     • Figure 10 illustrates a pair of instructions causing contention                                                60                                  P5 contention
       on P5. The distribution P5 has a higher mean than P1 and                                                       40
       the control experiment.                                                                                        20
     • Figure 9 illustrates an instruction causing contention on
                                                                                                                       0
       P1. The distribution P1 has a higher mean than P5 and the                                                           14 14.5 15 15.5 16 16.5 17 17.5 18 18.5
       control experiment.
                                                                                                                                      Execution time (ms)

                                                                                        Figure 10: P5 contention experiment on paired
                                                                                        f32.convert_i32_u and i32.trunc_f32_u for 1 000 000
                                                                                        instructions.
