UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply
Highlighted
Visitor
Posts: 25
Registered: ‎03-12-2018

BuG: Vivado: shared objects are not executable and should *not* have +x flag

 

See:

 

    cd {{vivado_prefix}} && find -type f -executable -name "*.so*"

 

ELF shared objects are not executable and therefore shall not have +x flag set.

The +x flag is meant only for files which can be directly loaded/executed via exec*() syscalls.

 

Scholar
Posts: 1,852
Registered: ‎03-22-2016

Re: BuG: Vivado: shared objects are not executable and should *not* have +x flag

@metux Oh wow. This is a horrible bug. Just imagine if someone executes a shared library by accident.

Thanks for reporting.

btlabs.us --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Moderator
Posts: 3,204
Registered: ‎11-09-2015

Re: BuG: Vivado: shared objects are not executable and should *not* have +x flag

Hi @metux,

 

I general, this is not an issue for most files.  For example, if someone attempts to execute a readme file, nothing will happen even though it has x permissions.  Giving x permission is a system default and unless the umask is set to turn it off or Xilinx explicitly turns it off for a specific file it will be set.  Xilinx does not typically restrict any file permissions unless there is a need.

Florent
Product Application Engineer - Xilinx Technical Support EMEA
------------------------------------------------------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
Visitor
Posts: 25
Registered: ‎03-12-2018

Re: BuG: Vivado: shared objects are not executable and should *not* have +x flag

> I general, this is not an issue for most files.  For example, if someone attempts to execute a readme file, nothing will happen even

> though it has x permissions

 

Okay, if you really believe that, then just execute the attached Readme file.

 

> Giving x permission is a system default and unless the umask is set to turn it off 

 

No, it's not. The Linux kernel doesn't automatically set +x on non-directories even w/ umask=0 - you'll have explicitly chmod() it.

And distros set the umask to some sane value (eg. 022, or 002 when using per-user groups) - see /etc/login.defs.

 

I'd suggest making yourself confident w/ the essiential basics of the operating system.

https://www.amazon.de/Linux-Pocket-Guide-Daniel-Barrett/dp/1491927577/ref=pd_cp_14_3?_encoding=UTF8&psc=1&refRID=TD8P9Q4H1G5YGCD9GY4F

Scholar
Posts: 1,852
Registered: ‎03-22-2016

Re: BuG: Vivado: shared objects are not executable and should *not* have +x flag

@metux 

I am confused. Are you saying there is harmful code in text files distributed with vivado?

btlabs.us --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Visitor
Posts: 25
Registered: ‎03-12-2018

Re: BuG: Vivado: shared objects are not executable and should *not* have +x flag

[ Edited ]

Haven't checked everything ... but there easily can be if arbitrary text/data is interpreted as a script. That's exactly the reason why the x flags exist.

 

EDIT: and that's exactly the reason why the kernel doesn't set the +x flag automatically.

Scholar
Posts: 1,852
Registered: ‎03-22-2016

Re: BuG: Vivado: shared objects are not executable and should *not* have +x flag

Very unlikely. I have submitted Vivado to Amazon and they have a super strict quality control with several anti-virus and security checks. They never caught anything. 

 

If these files had setuid set, I would be concerned though.

btlabs.us --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Visitor
Posts: 25
Registered: ‎03-12-2018

Re: BuG: Vivado: shared objects are not executable and should *not* have +x flag

> I have submitted Vivado to Amazon and they have a super strict quality control with several anti-virus and security checks. They

> never caught anything. 

 

Anti-Virus. *LOL*

 

> If these files had setuid set, I would be concerned though.

 
I never talked about setuid - that's a whole different topic.
 
Scholar
Posts: 1,852
Registered: ‎03-22-2016

Re: BuG: Vivado: shared objects are not executable and should *not* have +x flag

@metux this type of language is perhaps more appropriate to a teenager on Reddit. Be professional. 

 

btlabs.us --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.