Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 445962

Summary: media-video/dvdauthor-0.7.2-r3: mpeg2desc contains writable and executable sections due to nested function usage
Product: Gentoo Linux Reporter: Markus Rathgeb <maggu2810>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: UNCONFIRMED ---    
Severity: QA CC: atoth, vapier
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: remove nested function resulting in RWX section

Description Markus Rathgeb 2012-12-04 18:49:23 UTC
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/mpeg2desc

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2013-08-14 21:03:36 UTC
it's because of this fun guy:

src/mpeg2desc.c:
                  /* GCC extension! nested routine */
                    void bufread(void *ptr, int len, bool required)
Comment 2 Attila Tóth 2015-07-08 16:48:14 UTC
Some more info on this:

This is the commit introducing the nested function:
https://github.com/ldo/dvdauthor/commit/3dcfc72831cdd3f9d86432db2dacc33a01116dba

Later on makefile changes were made to detect whether the compiler supports it:
https://github.com/ldo/dvdauthor/commit/3d7b6ad07a9c00d2f0309b839ac0194444ecb551
Comment 3 Attila Tóth 2017-02-25 10:04:24 UTC
Created attachment 465098 [details, diff]
remove nested function resulting in RWX section

Use this patch to copy in /etc/portage/patches/media-video/dvdauthor-{version}/ directory to get rid of the RWX section.
Comment 4 SpanKY gentoo-dev 2017-03-01 21:32:23 UTC
(In reply to Attila Tóth from comment #3)

that's one way of doing it, but it means losing functionality
Comment 5 Agostino Sarubbo gentoo-dev 2021-11-01 20:42:03 UTC
tinderbox has reproduced this issue with version 0.7.2-r2 - Updating summary.
Comment 6 Attila Tóth 2021-11-01 22:33:13 UTC
(In reply to Agostino Sarubbo from comment #5)
> tinderbox has reproduced this issue with version 0.7.2-r2 - Updating summary.

Getting rid of the nested section still corrects the executable sections - although at the cost of performance as it was perviously pointed out by Vapier...
Comment 7 Agostino Sarubbo gentoo-dev 2024-01-01 14:31:25 UTC
gcc14_tinderbox has reproduced this issue with version 0.7.2-r3 - Updating summary.