Skip to content

libntech: pre-existing bugs found during the #27 reviews #35

Open

Description

@djbclark

Two libntech issues found during the Fable review of #27. They are outside that PR.

  1. ReadLenPrefixedString(): a non-numeric length prefix gives length -1, then xmalloc(0) and a read of data[-1]; it would also write data[-1] if that byte were a newline. The old and new change-record readers both depend on it.
  2. safe_open_create_perms() declares p_uid as bool (file_lib.c around line 738), so its exemption for symlinks "owned by the running user" is wrong for non-root euids. A root cf-agent is unaffected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions