Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536724 - >=sys-apps/proot-5.0.0: has RWX sections
Summary: >=sys-apps/proot-5.0.0: has RWX sections
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sergey Popov
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-15 18:15 UTC by Sergey Popov
Modified: 2018-08-01 14:27 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Popov gentoo-dev 2015-01-15 18:15:03 UTC
While building Proot 5.0.0 and 5.1.0 at Gentoo Linux i have this warning from portage:

 * QA Notice: The following files contain writable and executable sections
 *  Files with such sections will not work properly (or at all!) on some
 *  architectures/operating systems.  A bug should be filed at
 *  http://bugs.gentoo.org/ to make sure the issue is fixed.
 *  For more information, see http://hardened.gentoo.org/gnu-stack.xml
 *  Please include the following list of files in your report:
 *  Note: Bugs should be filed for the respective maintainers
 *  of the package in question and not hardened@g.o.
 * RWX --- --- usr/bin/proot

It seems very likely returning of the bug #493416 in some other form, but i am not really hardened expert, so i can not say for sure...
Comment 1 Cédric Vincent 2015-01-15 20:13:06 UTC
Hello Sergey,

I did some experiments to understand why this happens again.  It
appears that this comes from the way the loader is embedded into the
final executable, that is, using objcopy to transform the loader (a
freestanding program) into an object file which is then linked to the
proot binary.  In this case the GNU linker marks the final executable
(ie. proot) as requiring an executable stack, maybe because the linker
can't assume anything from this foreign object (not generated by a
compiler).

I'll do more tests before acknowledging that the current fix
(ie. adding "-Wl,-z,noexecstack" to LDFLAGS) is the right one.  I'll
keep you informed.

Thanks for this bug report,
Cédric.
Comment 2 Cédric Vincent 2015-02-17 12:15:51 UTC
Hello Sergey,

This has been fixed upstream, but not released yet:

https://github.com/cedric-vincent/PRoot/commit/cba29af9c8f361e32858406652438b4b2b60e660

Regards,
Cédric.
Comment 3 Larry the Git Cow gentoo-dev 2018-08-01 14:27:10 UTC
The bug has been closed via the following commit(s):

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

commit fe0b876d4e8abf8f9c28b365886fbbafdf9be14f
Author:     Sergey Popov <pinkbyte@gentoo.org>
AuthorDate: 2018-08-01 14:23:02 +0000
Commit:     Sergey Popov <pinkbyte@gentoo.org>
CommitDate: 2018-08-01 14:26:59 +0000

    sys-apps/proot: revision bump
    
    Backport patches to make PRoot work under newer kernels
    and to remove RWX code sections
    
    Closes: https://bugs.gentoo.org/536724
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 .../proot/files/proot-2.3.1-lib-paths-fix.patch    |   4 +-
 sys-apps/proot/files/proot-5.1.0-loader.patch      | 272 +++++++++++++++++++++
 sys-apps/proot/files/proot-5.1.0-makefile.patch    |  22 ++
 sys-apps/proot/proot-5.1.0-r1.ebuild               |  73 ++++++
 4 files changed, 369 insertions(+), 2 deletions(-)