-
Notifications
You must be signed in to change notification settings - Fork 51
fix: add noexecstack linker flag for security hardening #172
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
Conversation
The change adds the `-z,noexecstack` flag to the linker options in the Debian build rules. This flag marks the stack as non- executable, providing additional security hardening against stack- based buffer overflow attacks. The flag is added conditionally for all architectures except mips64el, maintaining the existing security flags (-z,relro,-z,now,-pie) while enhancing protection. Influence: 1. Verify the binary is built with the new linker flags by checking the ELF program headers (e.g., using `readelf -l`) 2. Ensure the stack is marked as non-executable in the built executable 3. Test that the application functions correctly with the new security hardening 4. Confirm the build process completes successfully for all supported architectures except mips64el fix: 为安全加固添加 noexecstack 链接器标志 此更改在 Debian 构建规则中向链接器选项添加了 `-z,noexecstack` 标志。该 标志将堆栈标记为不可执行,针对基于堆栈的缓冲区溢出攻击提供了额外的安全 加固。该标志有条件地添加到除 mips64el 外的所有架构,在保持现有安全标志 (-z,relro,-z,now,-pie)的同时增强了保护。 Influence: 1. 通过检查 ELF 程序头(例如使用 `readelf -l`)验证二进制文件是否使用新 的链接器标志构建 2. 确保构建的可执行文件中堆栈被标记为不可执行 3. 测试应用程序在新的安全加固下功能正常 4. 确认除 mips64el 外所有支持的架构的构建过程成功完成 PMS: BUG-339571
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds the -z,noexecstack linker flag to the Debian build rules to mark the stack as non-executable for all architectures except mips64el, while preserving existing hardening flags. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fly602, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
The change adds the
-z,noexecstackflag to the linker options in the Debian build rules. This flag marks the stack as non- executable, providing additional security hardening against stack- based buffer overflow attacks. The flag is added conditionally for all architectures except mips64el, maintaining the existing security flags (-z,relro,-z,now,-pie) while enhancing protection.Influence:
readelf -l)fix: 为安全加固添加 noexecstack 链接器标志
此更改在 Debian 构建规则中向链接器选项添加了
-z,noexecstack标志。该标志将堆栈标记为不可执行,针对基于堆栈的缓冲区溢出攻击提供了额外的安全
加固。该标志有条件地添加到除 mips64el 外的所有架构,在保持现有安全标志
(-z,relro,-z,now,-pie)的同时增强了保护。
Influence:
readelf -l)验证二进制文件是否使用新 的链接器标志构建PMS: BUG-339571
Summary by Sourcery
Build: