Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 679504 - sys-apps/sysvinit does not respect CFLAGS (stack-protection)
Summary: sys-apps/sysvinit does not respect CFLAGS (stack-protection)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-05 09:52 UTC by Agostino Sarubbo
Modified: 2019-03-15 13:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch (sysvinit.patch,1016 bytes, patch)
2019-03-10 03:10 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2019-03-05 09:52:01 UTC
While SSP is really good for security purpose, I'd expect that with CFLAGS="-fno-stack-protector" the package should not have stack protection.
In this case the file /sbin/init has stack protection.
To check you can use: checksec --file /sbin/init
Comment 1 Arfrever Frehtes Taifersar Arahesis 2019-03-10 03:09:24 UTC
src/Makefile has this line:
override CFLAGS += -ansi -fomit-frame-pointer -fstack-protector-strong -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE -DVERSION=\"$(VERSION)\"


Some users might want to use -fstack-protector-all, so forcing -fstack-protector-strong decreases stack protection level for them :( .
Comment 2 Arfrever Frehtes Taifersar Arahesis 2019-03-10 03:10:37 UTC
Created attachment 568370 [details, diff]
Patch
Comment 3 Larry the Git Cow gentoo-dev 2019-03-15 13:19:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ea715e600364ec22e461a4ca77536004ed6a0b8

commit 6ea715e600364ec22e461a4ca77536004ed6a0b8
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2019-03-10 03:04:27 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2019-03-15 13:19:09 +0000

    sys-apps/sysvinit: Do not force -fstack-protector-strong.
    
    Fixes: https://bugs.gentoo.org/679504
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 sys-apps/sysvinit/sysvinit-2.94.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)