On 2026-12-04 17:25:56 [+0800], Otto Kekäläinen wrote:
> While reviewing the latest xz-utils 5.8.5-1 I noticed that it has now
> started emitting these Lintian nags:
> 
> X: liblzma5: hardening-no-fortify-functions
> [usr/lib/x86_64-linux-gnu/liblzma.so.5.8.5]
> X: liblzma5-udeb udeb: hardening-no-fortify-functions
> [usr/lib/x86_64-linux-gnu/liblzma.so.5.8.5]
> 
> This might be a regression from the previous version (unless the
>…
> Considering the wide use uf liblzma I think it would make sense to
> ensure it is fully hardened. I haven't checked yet the details of what
> happened here or what flags need to be applied.

Yes. And I don't see it in liblzma5_5.8.4-1_amd64.deb. So it looks like
a regression.

| $ hardening-check --verbose liblzma.so.5.8.4
| liblzma.so.5.8.4:
|  Position Independent Executable: no, regular shared library (ignored)
|  Stack protected: yes
|  Fortify Source functions: no, only unprotected functions found!
|         unprotected: memcpy
|         unprotected: memset
|         unprotected: memmove
|  Read-only relocations: yes
|  Immediate binding: yes
|  Stack clash protection: unknown, no -fstack-clash-protection instructions 
found
|  Control flow integrity: no, not found!
|  Branch Protection: no, not found!
| $ hardening-check --verbose liblzma.so.5.8.5
| liblzma.so.5.8.5:
|  Position Independent Executable: no, regular shared library (ignored)
|  Stack protected: yes
|  Fortify Source functions: yes (some protected functions found)
|         unprotected: read
|         unprotected: memmove
|         unprotected: memcpy
|         unprotected: memset
|         protected: memcpy
|  Read-only relocations: yes
|  Immediate binding: yes
|  Stack clash protection: unknown, no -fstack-clash-protection instructions 
found
|  Control flow integrity: no, not found!
|  Branch Protection: no, not found!

"Fortify Source" seems to be more happy with 5 than with 4. We got one
read which probably tipped it off.
We do have 
|export DEB_BUILD_MAINT_OPTIONS = hardening=+all
and this is picked up so *either* there is one file which does not pick
it up and blhc does not catch it or the compiler is sure about the
boundaries and skips the fortified version.
-fstack-clash-protection might look interresting if we are at it.

I would suggest to let it migrate and then look into this + autopkgtest.

Sebastian

Reply via email to