[pve-devel] applied: [PATCH cluster 2/2] clusterlog: fix segfault / wrong iteration bounds
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Dec 15 15:56:24 CET 2021
On 14.12.21 11:19, Fabian Grünbichler wrote:
...
> note that the actual sizes of the entries are not relevant, the
> requirements are:
> - entry before last wrap-around must be big enough that entry of current
> index can overtake it without another wrap-around
> - method that does iteration must be called before next wrap-around
>
> the fix is obviously trivial once the issue became apparent - when
> wrapping around during iteration, additionally check that we are not
> jumping across the red zone into already invalidated parts of data.
>
> clusterlog_merge is technically not affected since it aborts before a
> wrap-around anyway, but it doesn't hurt to have the checks consistently
> in case this ever changes.
>
> thanks to @kev1904 on our community forums for reporting and providing the data
> to nail the cause down fast!
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
> data/src/logger.c | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
>
applied, many thanks!!
More information about the pve-devel
mailing list