Bug 906804 - SpamAssassin does not detect HTTP(S) URL multiline mismatches in base64 encoded e-mail
Summary: SpamAssassin does not detect HTTP(S) URL multiline mismatches in base64 encod...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: spamassassin
Version: 26
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 905847 (view as bug list)
Depends On: 892348 1017136 1017138
Blocks: 893614
TreeView+ depends on / blocked
 
Reported: 2013-02-01 14:24 UTC by Filip Krska
Modified: 2018-05-29 11:25 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 892348
Environment:
Last Closed: 2018-05-29 11:25:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
HTTPSMismatch.pm patch - avoid using array of cleaned uris (1.92 KB, patch)
2013-02-01 14:24 UTC, Filip Krska
fkrska: review?
Details | Diff

Comment 1 Petr Lautrbach 2013-03-14 12:46:10 UTC
Description of problem:
SpamAssassin does unfortunately not always detect HTTP(S) URL multiline 
mismatches in base64 encoded e-mail. Two compressed spam samples attached.
One is proper detected, the other is not.

How reproducible:
Everytime, see above and below.

xzcat sample1.eml.xz | spamassassin
xzcat sample2.eml.xz | spamassassin
  
Actual results:
Only sample1.eml.xz results in HTTPS_HTTP_MISMATCH, sample2.eml.xz does
somehow not match.

Expected results:
Both sample files should match/result in HTTPS_HTTP_MISMATCH.

--- Additional comment from  Filip Krska

Reproduced also on F18.

I've reproduced the reported behaviour with following lines added to /etc/mail/spamassassin/local.cf:

body HTTPS_HTTP_MISMATCH eval:check_https_http_mismatch('1','10')
describe HTTPS_HTTP_MISMATCH HTTPSMismatch
score HTTPS_HTTP_MISMATCH 2.0

Current HTTPSMismatch.pm uses array (seems random sorted and contains uri-like substrings) of cleaned uris in uri_detail.

Mail::SpamAssassin::Plugin::URIDetail(3) says:

       "cleaned" is a list including the raw URI and various cleaned versions of the raw URI (http://spamassassin.apache%2Eorg/, http://spamassassin.apache.org/).

In our case sample2.eml.xz leads to following uri_detail:

'http://www.xx21z.cn/images/?http://us.battle.net/login/en/?ref=http%3A%2F%2Fdwthtylus.battle.net%2Fd3%2Fen%2Findex&app=com-d3' => {
                            'anchor_text' => [
                           'https://us.battle.net/login/en/?ref=http%3A%2F%2Fus.battle.net%2Fd3%2Fen%2Findex&app=com-d3'
                              ],
                            'domains' => {
                            'xx21z.cn' => 1,
                            'battle.net' => 1
                          },
                            'types' => {
                          'a' => 1
                             },
                            'cleaned' => [
                            'http://dwthtylus.battle.net/d3/en/index&app=com-d3',
                            'http://us.battle.net/login/en/?ref=http://dwthtylus.battle.net/d3/en/index&app=com-d3',
                            'http://www.xx21z.cn/images/?http://us.battle.net/login/en/?ref=http://dwthtylus.battle.net/d3/en/index&app=com-d3',
                            'http://www.xx21z.cn/images/?http://us.battle.net/login/en/?ref=http%3A%2F%2Fdwthtylus.battle.net%2Fd3%2Fen%2Findex&app=com-d3'
                          ]
                          },

and first 'cleaned' uri has equal domain (battle.net) to the one in anchor text, so it is wrongly treated as OK, although original uri has domain xx21z.cn.

IMHO check_https_http_mismatch should use $permsgstatus->{html}->{uri_detail} keys instead of arrays of 'cleaned' values.

I've proposed a patch, it needs thorough review, testing and discuss with upstream. (Perhaps it is a bug in code generating 'cleaned' array which may not be supposed to contain such substrings, then it should be fixed there...)

BR

Filip

Comment 2 Petr Lautrbach 2013-03-14 12:48:16 UTC
--- Additional comment from Robert Scheck on 2013-01-06 14:52:06 EST ---

Created attachment 673463 [details] https://bugzilla.redhat.com/attachment.cgi?id=673463 
sample1.eml.xz

--- Additional comment from Robert Scheck on 2013-01-06 14:52:42 EST ---

Created attachment 673464 [details] https://bugzilla.redhat.com/attachment.cgi?id=673464
sample2.eml.xz

Comment 3 Fedora End Of Life 2013-04-03 18:00:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 4 Filip Krska 2013-10-02 12:31:23 UTC
Reported upstream:

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6977

Comment 5 Fedora Admin XMLRPC Client 2014-08-08 07:43:11 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Admin XMLRPC Client 2014-08-08 07:45:39 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Fedora End Of Life 2015-01-09 17:38:35 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Robert Scheck 2015-01-10 15:23:49 UTC
Could somebody please re-assign this to Fedora 21 or Rawhide? This issue is
IMHO still valid.

Comment 9 Filip Krska 2015-01-12 09:44:41 UTC
Thanks, Kevin.

Comment 10 Jan Kurik 2015-07-15 14:52:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 11 Fedora End Of Life 2016-11-24 10:55:11 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Robert Scheck 2016-11-24 21:58:01 UTC
Could somebody please re-assign this to Fedora 25 or Rawhide? This issue is
IMHO still valid.

Comment 13 Kevin Fenzi 2016-11-24 22:25:52 UTC
*** Bug 905847 has been marked as a duplicate of this bug. ***

Comment 15 Kevin Fenzi 2016-11-28 16:44:29 UTC
What information are you requesting from me here? 

Yes, it seems like a bug, no I haven't had time to look further into it.

Comment 16 Fedora End Of Life 2017-02-28 09:33:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 17 Fedora End Of Life 2018-05-03 08:50:38 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 18 Fedora End Of Life 2018-05-29 11:25:09 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.