Mailing List Archive

Use of uninitialized value $r in scalar chomp at /usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 224
Since upgrading my Ubuntu 18.04.3 to ClamAV version 0.102.1 yesterday
I've been seeing this in my syslog:

spamd[2455]: Use of uninitialized value $r in scalar chomp at
/usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 224

spamd[2455]: Use of uninitialized value $r in pattern match (m//) at
/usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 227

Line 224 - chomp(my $r = $conn->getline);
Line 227 - if($r =~ /stream:\ (.+)\ FOUND/ix){

Is this an issue with ClamAV.pm or with ClamAV itself?

Chris

--
Chris
31.11972; -97.90167 (Elev. 1092 ft)
16:27:34 up 38 days, 7:10, 1 user, load average: 1.15, 0.71, 0.51
Description: Ubuntu 18.04.3 LTS, kernel 5.0.0-37-generic
Re: Use of uninitialized value $r in scalar chomp at /usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 224 [ In reply to ]
On 9 Jan 2020, at 17:32, Chris wrote:

> Since upgrading my Ubuntu 18.04.3 to ClamAV version 0.102.1 yesterday
> I've been seeing this in my syslog:
>
> spamd[2455]: Use of uninitialized value $r in scalar chomp at
> /usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 224
>
> spamd[2455]: Use of uninitialized value $r in pattern match (m//) at
> /usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 227
>
> Line 224 - chomp(my $r = $conn->getline);
> Line 227 - if($r =~ /stream:\ (.+)\ FOUND/ix){

How is this a SpamAssassin question?

Note that the "ClamAV Plugin" on the SA Wiki is not a supported
component of SA. It is decade-old sample code of unclear provenance.
Virus scanning really does not belong inside SA, so it isn't. SA is
designed to aggregate a lot of independent imperfect criteria for
judging mail as spam or ham into a single numeric score, while AV is
designed to make a highly accurate binary judgment.


> Is this an issue with ClamAV.pm or with ClamAV itself?

ClamAV.pm AND either ClamAV itself or its config.

Looking at
https://metacpan.org/source/ESAYM/File-Scan-ClamAV-1.95/lib/File/Scan/ClamAV.pm#L208,
it seems that those lines are in a subroutine which does inadequate
error handling. The underlying problem is something subtly wrong with
the communication between the Perl module and clamd. I'm not sure if
that Perl module is still maintained, but you could try opening an issue
against it and see. The testing matrix at
http://matrix.cpantesters.org/?dist=File-Scan-ClamAV+1.95 is not
encouraging...

However, fixing the Perl error handling won't solve the connection
issue. I have no idea what the specifics of that might be. If you can
find a source of support for File::Scan::ClamAV or ClamAV itself, you
might be able to get a deeper answer.



--
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not For Hire (currently)
Re: Use of uninitialized value $r in scalar chomp at /usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 224 [ In reply to ]
On Fri, Jan 10, 2020 at 12:56:30AM -0500, Bill Cole wrote:
>
> SA is designed to aggregate a lot of independent imperfect criteria for
> judging mail as spam or ham into a single numeric score, while AV is
> designed to make a highly accurate binary judgment.

That's a bit binary way to look at it (pun intended).

What are third party Sanesecurity etc signatures for ClamAV, if not
"imperfect criteria"? They are no different from any other rules or
blacklists.

Though personally I use ClamAV with Amavisd-new that converts only specific
signatures to SA scores, while keeping the "official" rules as poison pill..
Re: Use of uninitialized value $r in scalar chomp at /usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 224 [ In reply to ]
On Fri, 2020-01-10 at 00:56 -0500, Bill Cole wrote:
> On 9 Jan 2020, at 17:32, Chris wrote:
>
> > Since upgrading my Ubuntu 18.04.3 to ClamAV version 0.102.1
> > yesterday
> > I've been seeing this in my syslog:
> >
> > spamd[2455]: Use of uninitialized value $r in scalar chomp at
> > /usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 224
> >
> > spamd[2455]: Use of uninitialized value $r in pattern match (m//)
> > at
> > /usr/local/share/perl/5.26.1/File/Scan/ClamAV.pm line 227
> >
> > Line 224 - chomp(my $r = $conn->getline);
> > Line 227 - if($r =~ /stream:\ (.+)\ FOUND/ix){
>
> How is this a SpamAssassin question?
>
> Note that the "ClamAV Plugin" on the SA Wiki is not a supported
> component of SA. It is decade-old sample code of unclear provenance.
> Virus scanning really does not belong inside SA, so it isn't. SA is
> designed to aggregate a lot of independent imperfect criteria for
> judging mail as spam or ham into a single numeric score, while AV is
> designed to make a highly accurate binary judgment.
>
>
> > Is this an issue with ClamAV.pm or with ClamAV itself?
>
> ClamAV.pm AND either ClamAV itself or its config.
>
Thanks Bill, I'll ask over on the ClamAV users list then.

--
Chris
31.11972; -97.90167 (Elev. 1092 ft)
09:22:53 up 39 days, 5 min, 1 user, load average: 1.41, 0.73, 0.78
Description: Ubuntu 18.04.3 LTS, kernel 5.0.0-37-generic