Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardened build flags #218

Closed
krille-chan opened this issue Jul 15, 2023 · 2 comments
Closed

Hardened build flags #218

krille-chan opened this issue Jul 15, 2023 · 2 comments
Labels
stale The item is going to be closed soon because of inactivity

Comments

@krille-chan
Copy link
Owner

Description

According to flutter/flutter#4368, it should be possible to pass some compiler flags to Flutter's build system. This means that it should be possible to get a PIE binary with hardening measures such as RELRO, no RUNPATH, and stack canaries.

Proposed changes: add -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection=full -fPIC -fPIE -fvisibility=hidden to the compiler flags, and add -pie to the LDFLAGS.

To Reproduce

Use checksec.sh on the Fluffychat binary to get the following output:

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      Symbols         FORTIFY Fortified       Fortifiable     FILE
Partial RELRO   No canary found   NX enabled    No PIE          No RPATH   RUNPATH     No Symbols         No    0               0               fluffychat/fluffychat

Additional information:

  • Device: HP Elitebook 840 G1
  • OS and OS version: Fedora 35, kernel 5.15.6
  • Installed version of FluffyChat: 1.1.0 (Flatpak)
Copy link

github-actions bot commented Mar 6, 2024

This issue is stale because it has been open for 120 days with no activity.

@github-actions github-actions bot added the stale The item is going to be closed soon because of inactivity label Mar 6, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The item is going to be closed soon because of inactivity
Projects
None yet
Development

No branches or pull requests

1 participant