Bug 6880 - Redhat/Fedora Shellshock Fix Leads To oe_terminal breakage
Summary: Redhat/Fedora Shellshock Fix Leads To oe_terminal breakage
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.8 M2
Assignee: Richard Purdie
QA Contact: Lucian Musat
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-10-23 22:22 UTC by Christopher Kilgour
Modified: 2014-12-18 13:20 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Kilgour 2014-10-23 22:22:59 UTC
Fedora/Redhat have adopted a particular fix to cve-2014-7169, commonly known as a part of the shellshock bug, which includes the patches here [1].

As a consequence, terminal spawning is broken for commands like "bitbake virtual/kernel -c menuconfig".

The reason is the environment variables exported via poky/meta/classes/terminal.bbclass include names like "BASH_FUNC_xxx()" which bash itself will not interpret.

An example offending line in run.do_terminal.<PID> is

...
export BASH_FUNC_module()="() {  eval `/usr/bin/modulecmd bash $*` \
}"
...

Since the bash that is launched in the spawned terminal cannot interpret the offending line, it fails to run.  The user is briefly met with a spawned terminal that immediately closes with no indication of the problem.

[1] http://www.openwall.com/lists/oss-security/2014/09/25/13
Comment 1 Richard Purdie 2014-12-08 15:03:59 UTC
I tried to reproduce this on fedora 20 and whilst I see that bitbake exits early, menuconfig is launched successfully. Did fedora change the bash patchsets they were applying?
Comment 2 Richard Purdie 2014-12-08 16:32:56 UTC
FWIW I've figured this out and will send out a patch to fix things shortly.