HomeClusterLabs Projects
Diffusion LibQB e26ad0dae18a

Make it impossible to truncate or overflow the connection description

Description

Make it impossible to truncate or overflow the connection description

It's hard to predict the length of formatted output, so we'd better
notice (and abort) if the description is truncated. Incidentally,
mkdtemp() does this for us in the shared memory branch, but do an
explicit check there as well for consistency, and get rid of the wrongly
parametrized strncat() risking a buffer overflow (CONNECTION_DESCRIPTION
is not the length of the source "/qb").

Similar truncation checks should be added to qb_ipcs_{shm,us}_connect()
where they build the request/response names, and possibly to other
places using snprintf().

Details

Provenance
wferiAuthored on Apr 18 2019, 8:32 AM
chrissie-cCommitted on May 1 2020, 7:54 AM
Parents
rQ08806c530104: master: Issue 390: Clarify documentation of qb_loop_timer_expire_time_get and…
Branches
Unknown
Tags
Unknown

Event Timeline