The recent enablement of aarch64 PAC+BTI means that we need to: - Define policy for Fedora from the annobin side. - Decide on exactly what we need to check to validate that policy. This should be coordinated with Szabolcs Nagy <szabolcs.nagy> from Arm.
FYI - the annobin gcc plugin stores the setting of the -mbranch-protection= option, and annocheck examines this setting and generates a FAIL result if it was set to -mbranch-protection=none. At the moment it accepts any other setting as a PASS, but this could be changed. Also this option is not currently tracked for Clang/LLVM. To be honest I do not know if Clang//LVVM even support the option.
Tracking -mbranch-protection= is not sufficient. It is useful for diagnostics and static libraries. It is also necessary to check that the final link has the required markup, so that glibc or the kernel activates the functionality.
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle. Changing version to 33.
Hi Guys, I have checked in an update to rawhide's annobin (annobin-9.32-1.fc34) which adds some tests for PAC and BTI. Currently the code checks to see that a .gnu_property note section exists, containing a single NT_GNU_PROPERTY_TYPE_0 note with at least one GNU_PROPERTY_AARCH64_FEATURE_1_AND field with the GNU_PROPERTY_AARCH64_FEATURE_1_BTI and GNU_PROPERTY_AARCH64_FEATURE_1_PAC bits set. If dynamic tags are present, then the code also checks that the DT_AARCH64_BTI_PLT and DT_AARCH64_PAC_PLT tags are included. (I am not 100% sure that this is a requirement however...) Both of these tests are treated as "future features", so they do not generate FAIL results if the test does not pass. Instead they generate an informative message indicating that the test will fail in the future. For example: % annocheck /usr/lib/gcc/aarch64-redhat-linux/10/plugin/annobin.so.0.0.0 annocheck: Version 9.32. Hardened: annobin.so.0.0.0: PASS: Both the BTI and PAC properties are present in the GNU Property note. Hardened: annobin.so.0.0.0: check: The BTI and PAC dynamic tags are missing. Hardened: annobin.so.0.0.0: note: This test is not yet enabled, but if it was enabled, it would fail... Does this match your expectations ? Cheers Nick
(In reply to Nick Clifton from comment #4) > Currently the code checks to see that a .gnu_property note section exists, > containing a single NT_GNU_PROPERTY_TYPE_0 note with at least one > GNU_PROPERTY_AARCH64_FEATURE_1_AND field with the > GNU_PROPERTY_AARCH64_FEATURE_1_BTI and GNU_PROPERTY_AARCH64_FEATURE_1_PAC > bits set. > > If dynamic tags are present, then the code also checks that the > DT_AARCH64_BTI_PLT and DT_AARCH64_PAC_PLT tags are included. (I am not 100% > sure that this is a requirement however...) > > Both of these tests are treated as "future features", so they do not > generate FAIL results if the test does not pass. Instead they generate an > informative message indicating that the test will fail in the future. For > example: > > % annocheck /usr/lib/gcc/aarch64-redhat-linux/10/plugin/annobin.so.0.0.0 > annocheck: Version 9.32. > Hardened: annobin.so.0.0.0: PASS: Both the BTI and PAC properties are > present in the GNU Property note. > Hardened: annobin.so.0.0.0: check: The BTI and PAC dynamic tags are > missing. > Hardened: annobin.so.0.0.0: note: This test is not yet enabled, but if it > was enabled, it would fail... > > Does this match your expectations ? That sounds reasonable to me.
This message is a reminder that Fedora 33 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '33'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 33 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.