Skip to content

lack of security awareness #17

@jreiser

Description

@jreiser

I can find no concise documentation relating to the security awareness of this code. Delta .rpms often are part of a supply chain for software that should be resistant to tampering. What threats against integrity of results (or their efficient creation and consumption) have been considered, and what design strategies and implementation techniques have been used to counter, deter, or mitigate such threats?

One recent post on suspected security problem areas within the deltarpm package by Demi Marie Obenour on 2022-03-06:
https://lists.fedoraproject.org/archives/list/[email protected]/message/42I5IQEHRBLKUIB6KIHTE46RYTUVNPHU/

Specific items for makedeltarpm:

  1. Diagnosis of incoming security state: Is each .rpm input file signed and verified? By a trusted key? By the same trusted key for both old and new .rpm? Any answer of "No" should be referred to a security policy subsystem, with command-line options for overriding the default of highest security, which requires an exit status of Failure (and no output file created) from makedeltarpm.
  2. Is each input a S_IFREG file with (stat.n_links == 1)? A symlink often enables an easy tampering attack, and a hard link is by definition an alias that can be exploited.
  3. Does the code lock each input file against writing for the duration of makedeltarpm?
  4. Each datum that is read from an input file and then consumed by any operation except copying, should be considered suspect. In particular, embedded byte counts and the implied or explicit substring of an input file must be checked against the [remaining] byte length in the file. Also, probably any two such substrings must not overlap.
  5. The recently-added command-line flag -m to limit memory usage must be a global limit that applies to peak memory usage for the entire duration of makedeltarpm, including all compression and de-compression subsystems. Also, either the same limit, or some other adjustable limit, must enable applydeltarpm to succeed.

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