# Reproducer for `PT_TLS p_align=0`

This directory is the complete material for one Openwall report. The email
attachments are:

- `02-tls-p-align-zero.tar.gz`
- `README.md`

Archive SHA-256:

```text
2236793ef879c29308e973cef4fce483b05f4ed0b7c93702aee87bd151344c25
```

The archive contains only this report's PoC files and `prepare.sh`:

```text
poc/linux/Dockerfile
poc/linux/run-tls-noalign.sh
poc/linux/tls-noalign-target.c
poc/linux/zero-tls-align.c
prepare.sh
```

`prepare.sh` downloads the official musl 1.2.5 source archive from
`https://musl.libc.org/releases/musl-1.2.5.tar.gz`, verifies its SHA-256, and
places this report's `poc/` directory into the source tree.

Official source SHA-256:

```text
a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4
```

## Requirements

- Docker with Linux-container support and BuildKit.
- `curl` or `wget`, `tar`, and a SHA-256 utility.
- ARM64 container support, either native or through emulation.
- Network access for the official source and first base-image pull.
- About 2 GB of free Docker storage.
- No host musl toolchain is required.

## Reproduce

```sh
tar xzf 02-tls-p-align-zero.tar.gz
./prepare.sh
cd musl-1.2.5
./poc/linux/run-tls-noalign.sh
```

Observed output:

```text
tls_one=0x12 tls_two=0x34 tls_zero=0
BASELINE_STATUS=0 PATCH_STATUS=0 PATCHED_STATUS=139
```

## Tested environment

- Docker client/server 29.3.1
- Docker Desktop 4.68.0
- Host: macOS ARM64 (`darwin/arm64`)
- Docker server: `linux/arm64`
- Kernel: `6.12.76-linuxkit`
- Storage: overlayfs, cgroup v2
- CPUs: 12
- Docker memory: 7.652 GiB
- Base image: `gcc:12-bookworm` pinned by digest

The ARM64 container ran natively on the tested host. An AMD64 host must
provide ARM64 emulation or use an equivalent ARM64 machine.
