Bug #12096 Add line for non-executable stack in .s files
Submitted: 21 Jul 2005 21:40 Modified: 3 Jul 2006 19:03
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:MySQL 5.0 OS:Any (All)
Assigned to: Antony Curtis CPU Architecture:Any

[21 Jul 2005 21:40] Peter Gulutzan
Description:
See bug#11642 [Patch]es x86 Assembler and text relocations.
The makers of gentoo linux supplied, and
have already tested, a patch which includes:
Add this line at the end of three x86 .s (assembly source) files:
.section        .note.GNU-stack,"",@progbits 
The GNU assembler will recognize the line, it's a signal
for the linker that the program does not require an
executable stack, and that information is useful for
"hardened" linux. For information which mentions the
bug, see the comments by the gentoo expert in the bug#11642
comments, or this Red Hat article:
http://people.redhat.com/drepper/nonselsec.pdf

The affected files are strings/longlong2str-x86.s,
strings/my_strtoll10-x86.s (MySQL 5.0 only), and
/strings/strings-x86.s. The affected versions are: 4.0, 4.1, 5.0.

For most people, adding one line in three files is easy.
For me, it's impossible because I live in fear that on
some platform (extremely old Linux/BSD? Solaris-x86? sco?)
the line will not be accepted. So consider the alternatives
that the gentoo expert describes in the bug#11642 comments,
particularly: passing --noexecstack for the as assembler.

How to repeat:
Look for:

.section        .note.GNU-stack,"",@progbits 

at end of .x86 s files in /strings directory.
[1 Aug 2005 19:03] Peter Gulutzan
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

http://lists.mysql.com/internals/27779

I do not recommend acceptance of this patch.
[31 May 2006 7:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/7074
[28 Jun 2006 17:08] Antony Curtis
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://www.mysql.com/doc/en/Installing_source_tree.html
[28 Jun 2006 17:10] Antony Curtis
pushed to repositories bk/mysql-5.0 (5.0.23) and bk/mysql-5.1 (5.1.12-beta)
[3 Jul 2006 19:03] Paul DuBois
No changelog entry needed.