Description of problem: Attempting to test if mdevctl binaries were properly built with stack protection via -fstack-protector-strong yields info: Written in a language other than C/C++/Go/Rust. But the source looks like Rust, and the package was built with rustc. Version-Release number of selected component (if applicable): annobin-annocheck-10.54-2.el9.x86_64 mdevctl-1.1.0-4.el9.x86_64 How reproducible: Deterministic. Steps to Reproduce: 1. dnf install -y annobin-annocheck mdevctl 2. dnf -y --nogpgcheck debuginfo-install mdevctl 3. rpm -ql mdevctl | grep -E '/usr/s?bin/' | while read f ; do test -L $f || echo $f ; done | xargs -- annocheck --verbose --skip-all --test-stack-prot Actual results: annocheck: Version 10.54. Hardened: /usr/sbin/mdevctl: info: Written in a language other than C/C++/Go/Rust. Hardened: /usr/sbin/mdevctl: info: Command line options not recorded in DWARF DW_AT_producer variable. Hardened: /usr/sbin/mdevctl: skip: stack-prot test because not compiled C/C++ code Hardened: /usr/sbin/mdevctl: Overall: PASS. Expected results: If annocheck understands C, C++, Go, and Rust, it should recognize this binary as built from Rust source. Additional info:
I see the same issue with nispor-1.2.3-1.el9.x86_64 and Hardened: /usr/bin/npc: info: Written in a language other than C/C++/Go/Rust. Hardened: /usr/bin/npc: info: Command line options not recorded in DWARF DW_AT_producer variable. Hardened: /usr/bin/npc: skip: stack-prot test because not compiled C/C++ code Hardened: /usr/bin/npc: Overall: PASS. sevctl-0.2.0-4.el9.x86_64 and Hardened: /usr/bin/sevctl: info: Written in a language other than C/C++/Go/Rust. Hardened: /usr/bin/sevctl: info: Command line options not recorded in DWARF DW_AT_producer variable. Hardened: /usr/bin/sevctl: skip: stack-prot test because not compiled C/C++ code Hardened: /usr/bin/sevctl: Overall: PASS. stratisd-2.4.2-3.el9.x86_64 and Hardened: /usr/bin/stratis-min: info: Written in a language other than C/C++/Go/Rust. Hardened: /usr/bin/stratis-min: info: Command line options not recorded in DWARF DW_AT_producer variable. Hardened: /usr/bin/stratis-min: skip: stack-prot test because not compiled C/C++ code Hardened: /usr/bin/stratis-min: Overall: PASS. Hardened: /usr/bin/stratis-predict-usage: info: Written in a language other than C/C++/Go/Rust. Hardened: /usr/bin/stratis-predict-usage: info: Command line options not recorded in DWARF DW_AT_producer variable. Hardened: /usr/bin/stratis-predict-usage: skip: stack-prot test because not compiled C/C++ code Hardened: /usr/bin/stratis-predict-usage: Overall: PASS. and even for rust-1.58.1-1.el9.x86_64 itself Hardened: /usr/bin/rustc: info: Written in a language other than C/C++/Go/Rust. Hardened: /usr/bin/rustc: info: Command line options not recorded in DWARF DW_AT_producer variable. Hardened: /usr/bin/rustc: skip: stack-prot test because not compiled C/C++ code Hardened: /usr/bin/rustc: Overall: PASS. Hardened: /usr/bin/rustdoc: info: Written in a language other than C/C++/Go/Rust. Hardened: /usr/bin/rustdoc: info: Command line options not recorded in DWARF DW_AT_producer variable. Hardened: /usr/bin/rustdoc: skip: stack-prot test because not compiled C/C++ code Hardened: /usr/bin/rustdoc: Overall: PASS. and rustfmt's Hardened: /usr/bin/cargo-fmt: info: Written in a language other than C/C++/Go/Rust. Hardened: /usr/bin/cargo-fmt: info: Command line options not recorded in DWARF DW_AT_producer variable. Hardened: /usr/bin/cargo-fmt: skip: stack-prot test because not compiled C/C++ code Hardened: /usr/bin/cargo-fmt: Overall: PASS. Hardened: /usr/bin/rustfmt: info: Written in a language other than C/C++/Go/Rust. Hardened: /usr/bin/rustfmt: info: Command line options not recorded in DWARF DW_AT_producer variable. Hardened: /usr/bin/rustfmt: info: ALSO written in Assembler (source: DW_AT_language string). Hardened: /usr/bin/rustfmt: skip: stack-prot test because not compiled C/C++ code Hardened: /usr/bin/rustfmt: Overall: PASS.
Investigating....
This looks like a duplicate of: https://bugzilla.redhat.com/show_bug.cgi?id=2057737 Essentially what is happening is that annocheck was built in an environment that does not know about the DWARF value used to identify Rust binaries. So it displays the message shown. The problem was fixed with annobin 10.58, so using that version, or a later one, should solve the problem. Note - whilst RHEL 9.0 uses annobin 10.54, RHEL 9.1 will use annobin 10.73
Oh and GTS 9.1 uses annobin 10.76, so it should be OK as well.
(In reply to Nick Clifton from comment #4) > Oh and GTS 9.1 uses annobin 10.76, so it should be OK as well. Doh - I meant GTS 12 for RHEL 9.1....
Thanks Jan, closing.