Re: [Bug 264848] mpr0: mpr_user_pass_thru: user reply buffer (64) smaller than returned buffer (68)

From: Mark Johnston <markj_at_freebsd.org>
Date: Tue, 05 Jul 2022 16:41:26 UTC
On Tue, Jul 05, 2022 at 08:42:20AM -0600, Scott Long wrote:
> I’ve lost my bugzilla password, and it seems that the “Forgot Password” functionality doesn’t work.

I think it works differently for @freebsd.org accounts, you have to
reset your cluster password:
https://docs.freebsd.org/en/articles/committers-guide/#kerberos-ldap

> Anyways...
> 
> The problems is here in mps_get_iocfacts()
> 
>         snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%d.msg_version",
>             is_mps ? "mps" : "mpr", mps_unit);
> 
>         factslen = sizeof(MPI2_IOC_FACTS_REPLY);
>         len = sizeof(msgver);
>         error = sysctlbyname(sysctlname, msgver, &len, NULL, 0);
>         if (error == 0) {
>                 if (strncmp(msgver, "2.6", sizeof(msgver)) == 0)
>                         factslen += 4;
>         }
> 
> I haven’t been keeping track, but I’ll guess that msgver has numerically advanced past “2.6” for this system.

Thanks, that makes perfect sense.  I attached a patch to the PR but
can't test it myself.

Julian, if you're able to test patches, could you please try the one in
the PR and confirm that the warnings stop appearing?  It'd also be
useful to see the value of the dev.mpr.0.msg_version sysctl.