You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2015/02/17 16:37:56 UTC
[Bug 7140] New: DKIM/SPF Insecure dependency in require
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7140
Bug ID: 7140
Summary: DKIM/SPF Insecure dependency in require
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: spamassassin
Assignee: dev@spamassassin.apache.org
Reporter: mysqlstudent@gmail.com
Receiving "Insecure dependency in require while running with -T switch at
/usr/share/perl5/vendor_perl/Mail/SPF/Server.pm line 28." when running
spamassassin from the command-line on an mbox:
# spamassassin -t --mbox -D < mymbox 2>&1 | less
Feb 15 18:44:41.340 [16434] dbg: spf: checking to see if the message has a
Received-SPF header that we can use
Feb 15 18:44:41.383 [16434] dbg: spf: cannot load Mail::SPF module or create
Mail::SPF::Server object: Insecure dependency in require while running with -T
switch at /usr/share/perl5/vendor_perl/Mail/SPF/Server.pm line 28.
Feb 15 18:44:41.383 [16434] dbg: spf: [...] BEGIN failed--compilation aborted
at /usr/share/perl5/vendor_perl/Mail/SPF/Server.pm line 28.
Feb 15 18:44:41.383 [16434] dbg: spf: [...] Compilation failed in require at
/usr/share/perl5/vendor_perl/Mail/SPF.pm line 29.
Feb 15 18:44:41.383 [16434] dbg: spf: [...] BEGIN failed--compilation aborted
at /usr/share/perl5/vendor_perl/Mail/SPF.pm line 29.
Feb 15 18:44:41.383 [16434] dbg: spf: [...] Compilation failed in require at
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/SPF.pm line 500.
Feb 15 18:44:41.383 [16434] dbg: spf: attempting to use legacy Mail::SPF::Query
module instead
Feb 15 18:44:41.383 [16434] dbg: spf: cannot load Mail::SPF::Query module:
Can't locate Mail/SPF/Query.pm in @INC (you may need to install the
Mail::SPF::Query module) (@INC contains: lib /usr/share/perl5/vendor_perl
/usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/lib64/perl5 /usr/share/perl5) at
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/SPF.pm line 528.
Feb 15 18:44:41.383 [16434] dbg: spf: one of Mail::SPF or Mail::SPF::Query is
required for SPF checks, SPF checks disabled
However, if I run it on a non-mbox message, it invariably passes without any
problems loading SPF and DKIM support.
Feb 15 18:54:55.121 [22868] dbg: spf: checking to see if the message has a
Received-SPF header that we can use
Feb 15 18:54:55.175 [22868] dbg: spf: using Mail::SPF for SPF checks
Feb 15 18:54:55.176 [22868] dbg: spf: already checked for Received-SPF headers,
proceeding with DNS based checks
Feb 15 18:54:55.224 [22868] dbg: rules: ran eval rule SPF_HELO_PASS ======> got
hit (1)
Feb 15 18:54:54.923 [22868] dbg: rules: ran header rule __DKIM_EXISTS ======>
got hit: "<YES>"
Feb 15 18:54:54.923 [22868] dbg: rules: ran header rule __HAS_DKIM_SIGHD
======> got hit: "<YES>"
Feb 15 18:54:55.090 [22868] dbg: dkim: using Mail::DKIM version 0.4
Feb 15 18:54:55.113 [22868] dbg: dkim: VALID DKIM, i=@sendreceivenow.com,
d=sendreceivenow.com, s=lm2, a=rsa-sha256, c=relaxed/relaxed, key_bits=1024,
pass
Looks like it may be related to this:
http://www.gossamer-threads.com/lists/spamassassin/users/190609?do=post_view_threaded#190609
Bug originated with this post:
http://www.gossamer-threads.com/lists/spamassassin/users/191192?search_string=dkim%20dependency;#191192
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7140] DKIM/SPF Insecure dependency in require
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7140
Kevin A. McGrail <km...@pccc.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kmcgrail@pccc.com
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #3 from Kevin A. McGrail <km...@pccc.com> ---
Good catch!
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7140] DKIM/SPF Insecure dependency in require
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7140
Dave Wreski <dw...@guardiandigital.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dwreski@guardiandigital.com
--- Comment #4 from Dave Wreski <dw...@guardiandigital.com> ---
Nice job. Appears to have fixed it here. Thanks.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7140] DKIM/SPF Insecure dependency in require
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7140
--- Comment #1 from Mark Martinec <Ma...@ijs.si> ---
> Receiving "Insecure dependency in require while running with -T switch at
> /usr/share/perl5/vendor_perl/Mail/SPF/Server.pm line 28." when running
> spamassassin from the command-line on an mbox:
>
> However, if I run it on a non-mbox message, it invariably passes without
> any problems loading SPF and DKIM support.
Could you please try the following workaround:
--- lib/Mail/SpamAssassin/ArchiveIterator.pm (revision 1660694)
+++ lib/Mail/SpamAssassin/ArchiveIterator.pm (working copy)
@@ -417,7 +417,10 @@
sub _run_mailbox {
my ($self, $class, $format, $where, $date) = @_;
- my ($file, $offset) = ($where =~ m/(.*)\.(\d+)$/);
+ my ($file, $offset);
+ { local($1,$2); # Bug 7140 (avoids perl bug)
+ ($file, $offset) = ($where =~ m/(.*)\.(\d+)$/);
+ }
my @msg;
my $header;
if (!_mail_open($file)) {
The perl bug seems to be fixed in 5.20.2, likely related
to [perl #122669]
https://rt.perl.org/Public/Bug/Display.html?id=122669
which is reported in perldelta as fixed with 5.20.2 :
Tainted constants evaluated at compile time no longer
cause unrelated statements to become tainted. [perl #122669]
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7140] DKIM/SPF Insecure dependency in require
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7140
Mark Martinec <Ma...@ijs.si> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|Undefined |3.4.1
--- Comment #6 from Mark Martinec <Ma...@ijs.si> ---
This particular bullet dodged, closing.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7140] DKIM/SPF Insecure dependency in require
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7140
--- Comment #2 from Mark Martinec <Ma...@ijs.si> ---
Actually may not be [perl #122669], but is a [perl #123880]:
[perl #123880] perlbug AutoReply: utf8::SWASHNEW messes taint state
when $1,$2,$3 are tainted
The two bugs may be related, but are not the same.
Both perl bugs are fixed with perl 5.20.2 .
The [perl #123880] fails on 5.16.*, 5.18.*, 5.20.0, 5.20.1,
but is fine with 5.12 and 5.14, and again since 5.20.2.
Bug 7140: DKIM/SPF Insecure dependency in require
Sending lib/Mail/SpamAssassin/ArchiveIterator.pm
Committed revision 1660859.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7140] DKIM/SPF Insecure dependency in require
Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7140
--- Comment #5 from Mark Martinec <Ma...@ijs.si> ---
> Nice job. Appears to have fixed it here. Thanks.
Thanks for confirming. I could only reproduce the SPF failure case,
not the DKIM, although I suppose the underlying problem was the same.
Note that the change here only affects the code path which lead to a
failure in my test case (and Dave's I hope). The underlying perl bug
is still there, so it is conceivable that something similar could
pop up elsewhere / in some other use case.
It is also quite possible that the mls's case (using perl 5.18.2):
| Mail::SpamAssassin::Plugin::Check::_head_tests_0_1, skipping:
| Jan 17 08:00:12.091 [2891] warn: (Insecure dependency in require
| while running with -T switch at (eval 1037) line 9
(which went away by disabling the Rule2XSBody plugin) could have
been caused either by [perl #122669] or [perl #123880].
The workaround as applied here on ArchiveIterator.pm won't have
any effect on a spamd use case.
--
You are receiving this mail because:
You are the assignee for the bug.