[chrony-dev] chrony 3.5.1 and PATH_MAX

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Greetings,

being the FreeBSD packager of chrony, I have recently become aware of
the 3.5.1 security fix release, and reviewed the change.

Looking at
<https://git.tuxfamily.org/chrony/chrony.git/commit/?h=3.5-stable&id=f00fed20092b6a42283f29c6ee1f58244d74b545>,
I see that it is using char foo[PATH_MAX] - note that PATH_MAX is the
maximum path length for  a path *COMPONENT* so strictly speaking
join_path() into some buffer that is PATH_MAX large can fail. I'd say it
would be untypical though, conventionally, PID file path names would fit
in 64 bytes (/var/run/chronyd/chronyd.pid is about the longest I fancy).

Note also that some systems (GNU Hurd) do NOT define PATH_MAX at all. So
a join_path that uses a realloc() loop with exponential but bounded
growth, and starts maybe at 256 bytes a buffer size, might be a more
portable approach.

Having said that, I don't currently foresee issues with supported
FreeBSD versions. We have a PATH_MAX that should fit chrony's bill.

I've learned some lessons between fetchmail 6.4.0-rc4 and fetchmail
6.4.5 in particular (repo available on Gitlab) and concluded to exclude
some corner cases explicitly, in fetchmail.

Regards,
Matthias



--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/