HackerPapers

arXiv:2209.12993cs.CR

Device Tracking via Linux's New TCP Source Port Selection Algorithm (Extended Version)

Moshe Kol, Amit Klein, Yossi Gilad

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

We describe a tracking technique for Linux devices, exploiting a new TCP source port generation mechanism recently introduced to the Linux kernel. This mechanism is based on an algorithm, standardized in RFC 6056, for boosting security by better randomizing port selection. Our technique detects collisions in a hash function used in the said algorithm, based on sampling TCP source ports generated in an attacker-prescribed manner. These hash collisions depend solely on a per-device key, and thus the set of collisions forms a device ID that allows tracking devices across browsers, browser privacy modes, containers, and IPv4/IPv6 networks (including some VPNs). It can distinguish among devices with identical hardware and software, and lasts until the device restarts. We implemented this technique and then tested it using tracking servers in two different locations and with Linux devices on various networks. We also tested it on an Android device that we patched to introduce the new port selection algorithm. The tracking technique works in real-life conditions, and we report detailed findings about it, including its dwell time, scalability, and success rate in different network types. We worked with the Linux kernel team to mitigate the exploit, resulting in a security patch introduced in May 2022 to the Linux kernel, and we provide recommendations for better securing the port selection algorithm in the paper.

arXiv comments
This is an extended version of a paper with the same name that will be presented in the 32nd Usenix Security Symposium (USENIX 2023). UPDATE (2022-10-08): We revised some bibliography entries and clarified some aspects of the mathematical analysis. UPDATE (2022-12-22): Added Usenix 2023 artifact badges and fixed some typos
Journal reference
DOI
Subjects
cs.CRCryptography and Security

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jun 2024 to Jun 2024. Found in 1 HN submission from Oct 2022 to Oct 2022. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • A whitepaper detailing this CVE-2022-32296 attack. Vulnerability is in Double-Hash Port Selection (DHPS, IETF RFC 6056) Fixed in Linux 5.17.9 and above using a variant of DHPS. Linux sysctl: net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 Also Firefox Only…

      egberts1View on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.