Bug #121164 8.4 LTS: `gcs_xcom_networking.cc` `inet_ntop()` buffer-length bug (Bug #38021787) not backported
Submitted: 23 Aug 15:31
Reporter: Simon Mudd (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:8.4.11 OS:Any
Assigned to: CPU Architecture:Any

[23 Aug 15:31] Simon Mudd
Description:
`sock_descriptor_to_string()` in
`plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_networking.cc`
passes `inet_ntop()` a length of `sizeof(sockaddr_storage)` (128 bytes)
for a 46-byte destination buffer (`char saddr[INET6_ADDRSTRLEN]`).

Already fixed as Bug #38021787 (commit `9f40f3e`, MySQL 9.4.0 release
notes: "Removed a warning in gcs_xcom_networking.cc"), but never
cherry-picked to the 8.4 branch: `mysql-8.4.11`, the current LTS
release, still has the broken code, unchanged.

FWIW: related to https://github.com/villagesql/villagesql-server/pull/1040

How to repeat:
Found while trying to build MySQL 8.4.11 RPMS on OL10 but using the -Werror flag to trigger errors rather than warnings which is the default behaviour according to packages/rpm-oel/mysql.spec.in file for MySQL.  This lead the build to fail.

Suggested fix:
Requesting commit `9f40f3e` be cherry-picked onto 8.4.

Given this is fixed in 9.4.0 and from that 9.7 LTS and 26.7.0 it would be good to fix 8.4 LTS too.