Bug 231250 - possible data type bug in security/amavisd-new
Summary: possible data type bug in security/amavisd-new
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-perl (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-09 02:22 UTC by dnewman
Modified: 2023-02-04 08:13 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (perl)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dnewman 2018-09-09 02:22:43 UTC
FreeBSD-11.2-p2, amavisd-new-2.11.0_3,1, p5-DBD-mysql-4.046 (also 4.037), mysql57-server-5.7.23_1

When using p5-DBD-mysql releases after 4.037, amavisd-new creates false positives and erroneously adds a "tagged_above=0" label to message headers.

This is due to a change in p5-DBD-mysql-4.038 and later releases so that p5-DBD-mysql "now returns mysql doubles as perl doubles and mysql floats as perl floats (and not as a string anymore)." 

Due to this change in data types, the p5-DBD-mysql client obtains erroneous '0' results from queries. The MySQL client obtains the correct values.

This thread describes the problem in more detail and includes a link with configuration files and debug logs:

https://lists.amavis.org/pipermail/amavis-users/2018-August/005399.html

The changelog for p5-DBD-mysql describes the changes instituted with its 4.038 release:

https://fastapi.metacpan.org/source/CAPTTOFU/DBD-mysql-4.046/Changes

Please let me know if you need further info.
Comment 1 Martin Matuska freebsd_committer freebsd_triage 2019-01-05 11:39:41 UTC
I am experiencing the same problem but with all versions higher than 4.0.38. This is why I keep a patched private port for now.
Comment 2 dnewman 2019-01-18 05:46:26 UTC
This issue is still present in p5-DBD-mysql-4.050, released this week. Other amavisd users report seeing the same issue.
Comment 3 Florian Smeets freebsd_committer freebsd_triage 2019-07-20 13:43:33 UTC
The current conclusion seems to be that it needs to be fixed in p5-DBD-mysql. OpenBSD uses the following patch, not sure if we want to include it. That's up to perl@

https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/databases/p5-DBD-mysql/patches/patch-dbdimp_c?rev=1.4&content-type=text/x-cvsweb-markup

More info:
https://github.com/perl5-dbi/DBD-mysql/issues/78
Comment 4 Florian Smeets freebsd_committer freebsd_triage 2023-02-04 08:13:41 UTC
It looks like a patch for this has been committed upstream, there hasn't been a release in > 3 years however.

https://github.com/perl5-dbi/DBD-mysql/commit/b20d572e5661efa319ec7f4c08629be16d6b4aa9