Skip to content

Soundness bug with unconstrained pointers #2617

Open
@qaphla

Description

@qaphla

The handling of writes to unconstrained pointers treats all writes, regardless of offset, as writing to a single object. This can result in soundness issues. See, for example, the following program, which CBMC verifies:

#include <assert.h>

void main()
{
  int *x;
  x[0] = 1;
  x[1] = 2;
  assert(x[0] == 2);
}

While unconstrained pointers are unlikely to occur in actual C code, some goto-instrument passes (in particular, the code-contracts passes) create unconstrained variables for checking purposes, and are unsound as a result of this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Version 6Pull requests and issues requiring a major version bumpenhancement

    Type

    No type

    Projects

    Status

    Candidates

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions