capricious wrote:If I understand, the execution option is set because there are not enough information about correct options in build process. So it simply puts in all options to be "safe". Is this right?
well, yes and no, depending on which part of the build process we're talking about. the PT_GNU_STACK stuff is affected by three components: gcc (as in, compiler), 'as' (the assembler) and ld (the linker). the first two are responsible for producing object files with the appropriately flagged .note.GNU-stack section. normally gcc does the job properly as it will request an executable stack only when it knows that the given code uses a nested function trampoline (of course it assumes gcc 3.3.x, older gcc versions won't emit .note.GNU-stack, see below how ld handles that). now on the other hand 'as' is not that smart and cannot deduce from the assembly code whether an executable stack will be needed, so unless the code itself emits/specifies a .note.GNU-stack section or 'as' is forced one way via command line switches, 'as' won't emit one itself - you could call this a 'to be safe' option because of how ld will handle it. finally comes ld that produces an executable/library and emits a PT_GNU_STACK program header based on all the .note.GNU-stack sections in the object files. the rule here is again that you could call 'to be safe', that is, PT_GNU_STACK will request an non-executable stack if every single object file had a non-executable .note.GNU-stack section. so if an object file is missing this section or has an executable one, the end result will be an executable PT_GNU_STACK.
Can you say that it is a failure that the exec bit is set in stack header?
by itself, no.
Can you say that the libraries are defect if the exec bit is set when it is not needed?
well, 'defect' is a relative term, from a security point of view it is a defect, otherwise it doesn't (shouldn't) affect anything.
So can you say that SUSE people has done something wrong in the build process?
well, if there's anything 'wrong' in their build process then it's that they may not have manually verified each library that had an executable stack request. but even then you'd end up with libraries that do need an executable stack because they generate nested function trampolines.