Bug 906804 - SpamAssassin does not detect HTTP(S) URL multiline mismatches in base64 encoded e-mail
SpamAssassin does not detect HTTP(S) URL multiline mismatches in base64 encod...
Status: NEW
Product: Fedora
Classification: Fedora
Component: spamassassin (Show other bugs)
rawhide
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
: Patch
: 905847 (view as bug list)
Depends On: 892348 1017136 1017138
Blocks: 893614
  Show dependency treegraph
 
Reported: 2013-02-01 09:24 EST by Filip Krska
Modified: 2016-11-28 11:44 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 892348
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Comment 1 Petr Lautrbach 2013-03-14 08:46:10 EDT
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 08:48:16 EDT
--- 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 14:00:57 EDT
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 08:31:23 EDT
Reported upstream:

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6977
Comment 5 Fedora Admin XMLRPC Client 2014-08-08 03:43:11 EDT
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 03:45:39 EDT
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 12:38:35 EST
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 10:23:49 EST
Could somebody please re-assign this to Fedora 21 or Rawhide? This issue is
IMHO still valid.
Comment 9 Filip Krska 2015-01-12 04:44:41 EST
Thanks, Kevin.
Comment 10 Jan Kurik 2015-07-15 10:52:19 EDT
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 05:55:11 EST
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 16:58:01 EST
Could somebody please re-assign this to Fedora 25 or Rawhide? This issue is
IMHO still valid.
Comment 13 Kevin Fenzi 2016-11-24 17:25:52 EST
*** Bug 905847 has been marked as a duplicate of this bug. ***
Comment 15 Kevin Fenzi 2016-11-28 11:44:29 EST
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.

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