-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insecure dependency using IPC::Cmd in Perl 5.16.1 #12504
Comments
From @jkeenanOn 10/19/12 10:07 PM, George Clark wrote:
This sounds like a bug report, so I have moved it into the RT system. Thank you very much. |
From @jkeenanCreated by @jkeenan[Reported on perl-perl5porters by George Clark <geoperl@fenachrone.com>.] We've been looking at using IPC::Cmd in the Foswiki project. The IPC::Cmd fails with any use, when it attempts to perl -T -e'use Carp; $SIG{ __DIE__ } = sub { Carp::confess( @_ ) };use Insecure dependency in eval while running with -T switch at Module::Metadata::_parse_fh('Module::Metadata=HASH(0x8435458)', Module::Metadata::_init('Module::Metadata', undef, Module::Metadata::new_from_handle('Module::Metadata', Module::Load::Conditional::check_install('module', Module::Load::Conditional::can_load('modules', Perl Info
|
From @jkeenanOn Fri Oct 19 19:42:48 2012, jkeen@verizon.net wrote:
I was unable to reproduce this on either Darwin/PPC or Linux/i386: ##### |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Fri Oct 19 19:50:47 2012, jkeenan wrote:
I should have added that I'm running Perl 5.16.0 on both of those Thank you very much. |
From [email protected]On 10/19/2012 10:54 PM, James E Keenan via RT wrote:
Here are the details on the perl version where I've recreated it on Summary of my perl5 (revision 5 version 16 subversion 1) configuration: Characteristics of this binary (from libperl): |
From @b2gillsOn Fri, Oct 19, 2012 at 9:54 PM, James E Keenan via RT
I have been able to reproduce this with 5.14.1 5.16.0 and 5.16.1 None of the tests pass with taint mode enabled for these modules: IPC::Cmd ( The last one reports the failure as coming from Test::Builder ) I keep them up-to-date with CPAN, so that may be where the discrepancy
|
From @jkeenanOn Fri Oct 19 20:17:27 2012, brad wrote:
And I have now been able to reproduce the errors with blead: [same error output as originally reported] ./perl -I./lib -v Thank you very much. |
From @jkeenanOn Sat Oct 20 06:49:05 2012, jkeenan wrote:
I should add that the errors came with taint mode; untainted worked |
From @jkeenanOn Fri Oct 19 20:17:27 2012, brad wrote:
I looked at this ticket again this morning. To recap: ##### Still present in blead. IPC::Cmd->can_use_ipc_open3() relies on this chain of functions: Module::Load::Conditional::can_load And _evaluate_version_line contains a string 'eval' at what is now line 671 of lib/Module/Metadata.pm (v1.000019). Something tainted is causing that 'eval' to blow up. My hunch is that the insecure dependency is being introduced *above* the call to Module::Metadata::new_from_handle, but I haven't figured out how to write a test case for that. Ideas? Thank you very much. |
From @jkeenanOn Sat Dec 14 07:54:10 2013, jkeenan wrote:
The relevant code is this part of cpan/Module-Metadata/lib/Module/Metadata.pm, starting at line 514 in the version in blead: ##### $line is being read from a filehandle and is, therefore, tainted at this point. It is eventually passed to Module::Metadata::_evaluate_version_line(), inside of which the 'eval string' occurs, which is the point where the program fails due to the insecure dependency. To resolve the problem in this ticket we would have to untaint $line after reading from the filehandle. Whether we *should* do that is something we'll have to discuss. Will ping the maintainer. Thank you very much. |
From @jkeenanOn Sat Dec 14 12:59:03 2013, jkeenan wrote:
[snip]
Cross-filed this today: |
From @jkeenanOn Sat Dec 14 07:54:10 2013, jkeenan wrote:
With recent updates to Module-Metadata, I believe this problem has been fixed in perl 5.20.0. ##### Can the contributors to this RT please confirm this finding? Once confirmed, we can close this ticket, and probably also: Perl-Toolchain-Gang/Module-Metadata#9 Thank you very much. |
From @karenetheridgeOn Tue Jun 03 15:05:12 2014, jkeenan wrote:
Using the reproduction case in the first post to this ticket, I did a git commit 5ae49e269f33276abfc59fe5446aa3e02fa8699f detaint version, if needed (RT#88576, Chris Williams) ...which is in Module-Metadata-1.000017, first shipped with perl 5.19.5. |
@jkeenan - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#115370 (status was 'resolved')
Searchable as RT115370$
The text was updated successfully, but these errors were encountered: