Bug 2148125
| Summary: | annocheck reports /usr/sbin/grub2-set-bootflag not compiled C/C++ code | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Jan Pazdziora <jpazdziora> | |
| Component: | grub2 | Assignee: | Bootloader engineering team <bootloader-eng-team> | |
| Status: | POST --- | QA Contact: | Release Test Team <release-test-team> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 9.0 | CC: | bootloader-eng-team, jpazdziora, mhaicman, mlewando, nickc, raravind | |
| Target Milestone: | rc | Keywords: | Triaged, ZStream | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2221173 2221174 (view as bug list) | Environment: | ||
| Last Closed: | Type: | Bug | ||
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 2221173, 2221174 | |||
|
Description
Jan Pazdziora
2022-11-24 13:01:01 UTC
Checking with readelf -Ws /usr/sbin/grub2-set-bootflag | grep '__stack_chk_fail' does not find anything, meaning the function to be called when the stack protection detects a corrupted stack is not referenced. So it seems to suggest -fstack-protector-strong was indeed not used. Given grub2-set-bootflag is setuid (bug 2007431), the potential lack of standard compiler hardening is even more worrying. (In reply to Jan Pazdziora from comment #0) > Description of problem: > Hardened: /usr/sbin/grub2-set-bootflag: skip: stack-prot test because not > compiled C/C++ code Just to explain further here. This message means that annocheck was unable to prove that the file being checked was created by compiling C or C++ source code. Since code written in other high level languages does not need stack protection (at least as an optionally enabled security feature) failing the test would be inappropriate. On the other hand, being unable to prove that the source code was written in C/C++ when in fact this is the case indicates a problem with how the program is being compiled. In particular it means that annobin annotation has not been enabled, and probably that the security hardening options and debug info generation options have not been enabled either. |