Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: devel

[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin

 

 

SpamAssassin devel RSS feed   Index | Next | Previous | View Threaded


bugzilla-daemon at bugzilla

Oct 9, 2009, 6:03 AM

Post #1 of 10 (898 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin

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

--- Comment #1 from Patrick Monnerat <pm [at] datasphere> 2009-10-09 06:03:29 PDT ---
Created an attachment (id=4548)
--> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4548)
Configuration file for the buggy.pm plugin

Configuration file for the buggy.pm plugin

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Oct 9, 2009, 6:07 AM

Post #2 of 10 (868 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin [In reply to]

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

--- Comment #2 from Patrick Monnerat <pm [at] datasphere> 2009-10-09 06:07:23 PDT ---
Created an attachment (id=4549)
--> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4549)
Patch to avoid definitive $/ corruption

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Oct 9, 2009, 6:12 AM

Post #3 of 10 (867 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin [In reply to]

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

Patrick Monnerat <pm [at] datasphere> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #4548|application/octet-stream |text/plain
mime type| |

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Oct 15, 2009, 10:09 AM

Post #4 of 10 (820 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin [In reply to]

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

Mark Martinec <Mark.Martinec [at] ijs> changed:

What |Removed |Added
----------------------------------------------------------------------------
Priority|P5 |P3
Platform|Other |All
Target Milestone|Undefined |3.3.0

--- Comment #3 from Mark Martinec <Mark.Martinec [at] ijs> 2009-10-15 10:09:04 UTC ---
> Created an attachment (id=4549)
--> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4549) [details]
> Patch to avoid definitive $/ corruption

I don't think spamd is the right place to fix this problem. If some
underlying module leaves a global $/ changed, this can wreak havoc
in places much earlier than in the top-level spamd code, so it
should be fixed as close as possible to the source of trouble.
The solution is a: local($/) in places where it is likely that
an underlying module would change the $/ .

I know that Razor agents used to do it, and there is some workaround
code for this in Dns.pm, although again I think the fix belongs to
the Razor plugin (and not to Dns.pm) in that particular case.

Perhaps all calls to plugin methods should be prefixed by a local($/),
although this is a bit drastic approach. It would be nice to locate
the source of the $/ change in your particular case, and at least
fix that. Any chance you could track this down?

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Oct 15, 2009, 11:01 AM

Post #5 of 10 (820 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin [In reply to]

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

--- Comment #4 from Mark Martinec <Mark.Martinec [at] ijs> 2009-10-15 11:01:17 UTC ---
> Perhaps all calls to plugin methods should be prefixed by a local($/),

I wonder, would it suffice to add a local($/) into the
sub Mail::SpamAssassin::call_plugins(), just before it calls
the $self->{plugins}->callback ?

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Oct 15, 2009, 11:08 AM

Post #6 of 10 (819 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin [In reply to]

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

Patrick Monnerat <pm [at] datasphere> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |pm [at] datasphere

--- Comment #5 from Patrick Monnerat <pm [at] datasphere> 2009-10-15 11:08:24 UTC ---
Don't know !
In fact, I do not know Perl programming at all :-(
I did in my patch what I would have done in a language like C.
I don't know what is the scope of a variable declared with local(), but I will
try your proposal with my "buggy" test plugin very soon ! I'll keep you
informed.

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Oct 16, 2009, 6:01 AM

Post #7 of 10 (800 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin [In reply to]

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

--- Comment #6 from Patrick Monnerat <pm [at] datasphere> 2009-10-16 06:01:20 UTC ---
> I wonder, would it suffice to add a local($/) into the sub Mail::SpamAssassin::call_plugins(), just before it calls the $self->{plugins}->callback ?

This seems to do the trick. I did not note any bad side effect on other
plugins.

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Oct 16, 2009, 6:45 AM

Post #8 of 10 (798 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin [In reply to]

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

Mark Martinec <Mark.Martinec [at] ijs> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED

--- Comment #7 from Mark Martinec <Mark.Martinec [at] ijs> 2009-10-16 06:44:59 UTC ---
> This seems to do the trick. I did not note any bad side effect on other
> plugins.

Thanks! Applying to 3.3 trunk:

Bug 6218 - input delimiter $/ can be corrupted by a plugin,
localize $/ and $\ (and possibly others) before calling a plugin
Sending lib/Mail/SpamAssassin.pm
Committed revision 825892.

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Oct 16, 2009, 12:08 PM

Post #9 of 10 (793 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin [In reply to]

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

--- Comment #8 from Mark Martinec <Mark.Martinec [at] ijs> 2009-10-16 12:07:59 UTC ---
Actually the inserted statement should have been: local $/ = $/;
(and not just plain: local($/), which leaves a local copy at undef).
Fixed in CVS. Patrick, please fix also your copy.

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Oct 19, 2009, 1:02 AM

Post #10 of 10 (743 views)
Permalink
[Bug 6218] spamd input delimiter $/ can be corrupt by a tainted error in a plugin [In reply to]

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

--- Comment #9 from Patrick Monnerat <pm [at] datasphere> 2009-10-19 01:02:13 UTC ---
Done. Thanks for folding it up here.

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

SpamAssassin devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.