Skip to content

Access to previously freed memory #704

@FilipeMaia

Description

@FilipeMaia

As full_fname returns a static pointer when it's used twice in the same print message the second call will free the space allocated for by the first full_fname call, causing rsyserr to read freed memory, as in here:

rsync/generator.c

Lines 2044 to 2045 in dacadd5

rsyserr(FERROR_XFER, errno, "rename %s -> \"%s\" failed",
full_fname(tmpname), full_fname(fname));

This may cause gibberish output or potentially even a SIGSEV.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions