You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the 2020Q4 release, it is impossible to use the SQL / auxprop plugin of Cyrus-SASL. The bug affects all daemons using Cyrus-SASL for authentication. Specifically, attached are the steps to reproduce the problem on a minimal configuration of Postfix.
we can see why it's crashing, the function is being called with cset set to NULL, but there is no check in the function for it being valid and it immediately tries to deference it with cset->char_maxlen.
It's likely setting a valid charset will resolve the problem. An open question is why this has changed, and maybe we're no longer specifying a default or something.
utf8mb4 is related to MySQL 8.x. I have tested everything using MySQL 5.7 and found that the bug lies elsewhere. The SQL plugin was not loaded in Q4 for the years 2023, 2022, and 2021, and no queries were executed on the database (I have already debugged every query in the database).
One issue is that the cy2-sql package is not multi-mysql aware, so it will always be built against whatever the default MySQL implementation is for the branch, so in the case of 2023Q4 that is mariadb 10.6. I'll look at fixing this, so that I can also test against MySQL 5.7.
In the meantime please provide details of how the build against MySQL 5.7 is failing for you. Thanks.
FWIW I just built custom versions of cy2-sql and postfix-mysql that explicitly link against mysql-client-5.7, as well as rebuilding mysql 5.7 with the charset fix, and that is able to authenticate successfully too.
I confirm that the charset fix works. It would probably be advisable to modify cy2-sql to make it multi-MySQL aware, so that people can install postfix-mysql/cy2-sql and Percona MySQL on the same machine. As soon as I find five minutes, I will investigate whether the fix also resolves the MySQL client crash in the Percona cluster.
Activity
jperkin commentedon Apr 11, 2024
Some initial notes:
smtpd.conflocation needs to be/opt/local/etc/sasl2/smtpd.conf.smtpdprocess crashes.The stack is as follows:
Looking at the source for
mysql_cset_escape_slashes():we can see why it's crashing, the function is being called with
csetset toNULL, but there is no check in the function for it being valid and it immediately tries to deference it withcset->char_maxlen.It's likely setting a valid charset will resolve the problem. An open question is why this has changed, and maybe we're no longer specifying a default or something.
jperkin commentedon Apr 11, 2024
Ok, I've found the problem. We have an historical setting in our builds of:
However, this is no longer a valid character set:
I'll get that setting removed so that we use the default, which is set as:
xmerlin commentedon Apr 13, 2024
utf8mb4 is related to MySQL 8.x. I have tested everything using MySQL 5.7 and found that the bug lies elsewhere. The SQL plugin was not loaded in Q4 for the years 2023, 2022, and 2021, and no queries were executed on the database (I have already debugged every query in the database).
xmerlin commentedon Apr 13, 2024
I've tried also with /opt/local/etc/sasl2/smtpd.conf same results
jperkin commentedon Apr 15, 2024
With the change to the default charset, and using all of the configuration files you've provided above, it now works for me:
One issue is that the
cy2-sqlpackage is not multi-mysql aware, so it will always be built against whatever the default MySQL implementation is for the branch, so in the case of 2023Q4 that is mariadb 10.6. I'll look at fixing this, so that I can also test against MySQL 5.7.In the meantime please provide details of how the build against MySQL 5.7 is failing for you. Thanks.
jperkin commentedon Apr 15, 2024
FWIW I just built custom versions of
cy2-sqlandpostfix-mysqlthat explicitly link against mysql-client-5.7, as well as rebuilding mysql 5.7 with the charset fix, and that is able to authenticate successfully too.xmerlin commentedon Apr 15, 2024
I confirm that the charset fix works. It would probably be advisable to modify cy2-sql to make it multi-MySQL aware, so that people can install postfix-mysql/cy2-sql and Percona MySQL on the same machine. As soon as I find five minutes, I will investigate whether the fix also resolves the MySQL client crash in the Percona cluster.
thank you
xmerlin commentedon Apr 23, 2024
I just tested MySQL Percona 8.0.36-28 and can confirm that after changing the encoding, the MySQL client no longer crashes.
misc/tui-journal: update to 0.8.3
py-gwcs: update to 0.21.0.
graphics/oculante: update to 0.8.23
py-terminator: update to 2.1.4.
www/xh: update to 0.23.0
(textproc/R-dtplyr) Updated 1.2.1 to 1.3.1
(finance/R-quantmod) Updated 0.4.22 to 0.4.26, NEWS.md not recent
20 remaining items
(finance/R-quantmod) Updated 0.4.22 to 0.4.26, NEWS.md not recent
textproc/inlyne: update to 0.5.0
net/ruby-net-imap: update to 0.5.6
devel/ruby-async: update to 2.23.1
(www/R-bslib) Updated 0.3.1 to 0.4.2
nghttp3: update to 1.11.0.
devel/bacon: update to 3.17.0
Update to 1.67
p5-Image-ExifTool: update to 13.50.
p5-Image-ExifTool: update to 13.50.
www/ruby-sass-embedded: update to 1.100.0
p5-ack: update to 3.10.0.
devel/ruby-iruby: update to 0.8.3
py-sphinx-autoapi: update to 3.8.1.
misc/rozi: update to 0.0.49