Skip to content

Multiple buffer overflows #440

@hweimer

Description

@hweimer

The game still contains a number of possible sources for buffer overflows, mostly related to the handling of save games from untrusted sources (like PBEM opponents or bug submitters on GitHub):

  • strcpy/strcat with Data->... or Mev as the source (cf. grep 'strc.,.(Data|Mev)' *.cpp)
  • strlen and using the result as an index for updating an array element
  • Overflowing the History struct by setting PastMissionCount to 100 or above

Exploiting the latter might be tricky because you have relatively little control to what gets written, but you never know.

Additionally, the whole Num array thing is also pretty scary when you have (or claim to have) more than 30 missions per capsule (seeing that in a game right now). However, that looks just like an out-of-bounds read.

After fixing these, we should also apply some fuzzing to save game files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAn issue that causes a crash or an invalid or undesirable game state.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions