# Reproducer for titlecase POSIX lower/upper overlap

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

- `03-titlecase-posix-mutex.tar.gz`
- `README.md`

Archive SHA-256:

```text
58ea0181c8b8730abb9e022ab03cf8f1fdeae2e8cb29a925b61dd3cc77417a84
```

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

```text
poc/ctype/Dockerfile
poc/ctype/caseclass-probe.c
poc/ctype/run-caseclass.sh
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 03-titlecase-posix-mutex.tar.gz
./prepare.sh
cd musl-1.2.5
./poc/ctype/run-caseclass.sh
```

Observed output excerpt (intermediate fields abbreviated):

```text
U+01C5 ... lower=1 upper=1 ctype-lower=1 ctype-upper=1
U+01C8 ... lower=1 upper=1 ctype-lower=1 ctype-upper=1
CTYPE_TITLECASE_POSIX_MUTEX_BUG_REPRODUCED=1
```

The probe selects `C.UTF-8` before testing. A reproduction must show both
`lower=1` and `upper=1` for U+01C5 and U+01C8, while the POSIX class rule says
those classes are mutually exclusive.

## 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
