[OE-core] [PATCH 0/5] Improve isELF, gets triggered by ELF anywhere in pathname

Olof Johansson olof.johansson at axis.com
Fri Dec 1 15:50:19 UTC 2017


If the substring "ELF" is found anywhere in the pathname, the isELF function
would identify the file as an ELF file. The function could also be used to
execute arbitrary shell commands as the user running bitbake, since the file
execution allows processing of shell meta characters like variable expansion.

The isELF function has been copied and was until this patchset available from
two locations, one in lib/oe/package.py and one in package.bbclass. The two
functions had diverged. This is changed so that one common implementation is
used.

Olof Johansson (5):
  lib/oe/package.py: Expose is_elf
  package.bbclass: Make use of common is_elf function
  lib/oe/package.py: is_elf: Don't let filename influence filetype
  lib/oe/package.py: is_elf: Disallow shell specials to be expanded
  lib/oe/package.py: is_elf: Make it less prone to false positives

 meta/classes/package.bbclass | 40 +++++---------------
 meta/lib/oe/package.py       | 88 +++++++++++++++++++++++++++-----------------
 2 files changed, 63 insertions(+), 65 deletions(-)

-- 
2.11.0



More information about the Openembedded-core mailing list