Task Todo List Prepare packages for -D_FORTIFY_SOURCE=3

2023-09-05 - kpcyrd

As specified in the RFC[1] we need to check packages that make use of `malloc_usable_size`:

> Some applications use malloc_usable_size (despite the glibc manual stating it is for diagnostic purposes only). This is currently incompatible with _FORTIFY_SOURCE=3, so these packages will need to continue using level 2 by modifying C{,XX}FLAGS in the PKGBUILD. A TODO list will be created for all such packages on adoption of this proposal.

This list was generated using a scanner[2] that runs `readelf -Ws <path>` on all ELF binaries and checks the output for mentions of `malloc_usable_size@GLIBC`.

A possible fix looks like this:
```
# this uses malloc_usable_size, which is incompatible with fortification level 3
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
```

[1]: https://gitlab.archlinux.org/archlinux/rfcs/-/blob/master/rfcs/0017-increase-fortification-level.rst
[2]: https://github.com/kpcyrd/archlinux-scan-malloc-usable-size
[3]: https://gitlab.archlinux.org/archlinux/devtools/-/merge_requests/191

Link to lists of pkgbase values:

Filter Todo List Packages

Select filter criteria
67 packages displayed out of 67 total packages.
Arch Repository Name Current Version Staging Version Maintainers Status Last Touched By
x86_64 Extra 0ad a27.1-3 svenstaro Complete kpcyrd (2 years ago)
any Extra aarch64-linux-gnu-glibc 2.41-3 anatolik Complete kpcyrd (1 year, 8 months ago)
x86_64 Extra anura svenstaro Complete kpcyrd (2 years ago)
x86_64 Extra bcachefs-tools 3:1.31.7-1 freswa Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra blender 17:4.5.3-6 svenstaro, alerque Complete kpcyrd (2 years ago)
x86_64 Extra cardinal-clap 25.06-1 dvzrv Complete kpcyrd (2 years ago)
x86_64 Extra cardinal-lv2 25.06-1 dvzrv Complete kpcyrd (2 years ago)
x86_64 Extra cardinal-standalone 25.06-1 dvzrv Complete kpcyrd (2 years ago)
x86_64 Extra cardinal-vst 25.06-1 dvzrv Complete kpcyrd (2 years ago)
x86_64 Extra cardinal-vst3 25.06-1 dvzrv Complete kpcyrd (2 years ago)
x86_64 Extra cuda-tools 13.0.2-1 svenstaro, Lahwaacz, kgizdov Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra cuneiform Complete kpcyrd (2 years, 1 month ago)
x86_64 Extra deno 2.5.3-1 felixonmars Complete kpcyrd (2 years ago)
x86_64 Extra dotnet-runtime 9.0.9.sdk110-1 alucryd Complete kpcyrd (2 years ago)
x86_64 Extra dotnet-runtime-6.0 6.0.36.sdk136-2 alucryd Complete kpcyrd (2 years ago)
x86_64 Extra dotnet-runtime-7.0 7.0.20.sdk120-2 alucryd Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra dotnet-targeting-pack 9.0.9.sdk110-1 alucryd Complete kpcyrd (2 years ago)
x86_64 Extra dotnet-targeting-pack-6.0 6.0.36.sdk136-2 alucryd Complete kpcyrd (2 years ago)
x86_64 Extra dotnet-targeting-pack-7.0 7.0.20.sdk120-2 alucryd Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra dovecot 2.3.21.1-3 demize, foxxx0, grawlinson, carsme Complete blakkheim (1 year, 10 months ago)
x86_64 Extra emptyepsilon 2024.08.09-1 anthraxx Complete blakkheim (1 year, 10 months ago)
x86_64 Extra firefox 143.0.4-1 heftig Complete heftig (2 years, 1 month ago)
x86_64 Extra firefox-developer-edition 144.0b9-1 andrewSC Complete blakkheim (1 year, 10 months ago)
x86_64 Extra giac 2.0.0.12-5 arojas Complete kpcyrd (2 years ago)
x86_64 Core glibc 2.42+r17+gd7274d718e6f-1 grazzolini, freswa Complete freswa (2 years, 1 month ago)
x86_64 Extra gnustep-base 1.31.1-1 grawlinson Complete kpcyrd (2 years, 1 month ago)
x86_64 Extra goxel 0.15.1-1 arodseth Complete arodseth (2 years ago)
x86_64 Extra intel-oneapi-basekit 2025.0.1.46-1 kgizdov, tpkessler Complete tpkessler (2 years ago)
x86_64 Extra js102 heftig Complete heftig (2 years, 1 month ago)
x86_64 Extra js115 115.28.0-1 heftig Complete heftig (2 years, 1 month ago)
x86_64 Extra js91 heftig Complete heftig (2 years, 1 month ago)
x86_64 Core lib32-glibc 2.42+r17+gd7274d718e6f-1 grazzolini, freswa Complete freswa (2 years, 1 month ago)
x86_64 Multilib lib32-nvidia-utils 580.95.05-1 svenstaro, felixonmars, dbermond, ptr1337 Complete kpcyrd (1 year, 7 months ago)
x86_64 Multilib lib32-sqlite 3.50.4-1 lcarlier Complete kpcyrd (2 years ago)
x86_64 Multilib lib32-systemd 258-1 eworm Complete eworm (2 years, 1 month ago)
x86_64 Extra libreoffice-fresh 25.8.2-1 andyrtr Complete andyrtr (2 years, 1 month ago)
x86_64 Extra libreoffice-still 25.2.6-2 andyrtr Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra libtorrent-rasterbar 1:2.0.11-4 dbermond Complete kpcyrd (2 years ago)
x86_64 Extra libwebsockets 4.4.1-1 jelle, dvzrv Complete kpcyrd (2 years ago)
x86_64 Extra mariadb 12.0.2-1 eworm Complete eworm (2 years, 1 month ago)
x86_64 Extra mosquitto 2.0.22-2 jelle, grawlinson Complete kpcyrd (2 years ago)
x86_64 Extra ncdu 2.9.1-1 anthraxx, daurnimator Complete daurnimator (2 years, 1 month ago)
x86_64 Extra neovide 0.15.2-1 alerque Complete alerque (2 years ago)
x86_64 Extra networkmanager 1.54.1-1 heftig Complete heftig (2 years, 1 month ago)
x86_64 Extra nodejs 24.9.0-1 felixonmars, polyzen Complete kpcyrd (2 years ago)
x86_64 Extra nodejs-lts-iron 20.19.5-1 jelle Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra nvidia-utils 580.95.05-1 svenstaro, felixonmars, dbermond, ptr1337 Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra nvme-cli 2.15-1 Foxboron, gromit Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra openucx 1.19.0-2 Lahwaacz Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra osquery 5.19.0-1 anatolik, carsme Complete kpcyrd (2 years ago)
x86_64 Extra qbs 3.1.0-1 arojas Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra qt5-webengine 5.15.19-3 felixonmars, arojas Complete kpcyrd (1 year, 7 months ago)
x86_64 KDE-Unstable qt6-webengine 6.10.0-1 arojas Complete kpcyrd (1 year, 7 months ago)
any Extra riscv64-linux-gnu-glibc 2.41-2 felixonmars, FFY00, kpcyrd Complete kpcyrd (1 year, 8 months ago)
x86_64 Extra river 0.3.13-1 andyrtr, daurnimator Complete daurnimator (2 years, 1 month ago)
x86_64 Extra ruby 3.4.5-1 bastelfreak, Segaja Complete kpcyrd (2 years ago)
x86_64 Extra ruby2.7 Complete kpcyrd (2 years ago)
x86_64 Extra singular 4.4.1-3 arojas Complete kpcyrd (2 years ago)
x86_64 Extra sqlcipher 4.6.1-1 jlichtblau, carsme Complete kpcyrd (2 years ago)
x86_64 Core sqlite 3.50.4-2 andyrtr, lfleischer Complete blakkheim (1 year, 10 months ago)
x86_64 Core sqlite-analyzer 3.50.4-2 andyrtr, lfleischer Complete andyrtr (2 years, 1 month ago)
x86_64 Core systemd 258-4 eworm Complete eworm (2 years, 1 month ago)
x86_64 Core systemd-libs 258-4 eworm Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra thunderbird 143.0.1-2 anthraxx, artafinde Complete artafinde (2 years ago)
x86_64 Extra warzone2100 4.6.1-2 lcarlier, grawlinson Complete kpcyrd (2 years ago)
x86_64 Extra waylock 1.5.0-1 dvzrv, daurnimator Complete kpcyrd (1 year, 7 months ago)
x86_64 Extra z3 4.15.1-1 anthraxx Complete kpcyrd (2 years ago)