Skip to content

3.3 format string vulnerabilities #103

@normster

Description

@normster

I think this paragraph could be explained a bit more clearly:

When the printf() function executes, it looks for a format string modifier denoted by a “%” in its first argument located 4 bytes above the RIP of printf(). If it finds the modifier, it then looks 8 bytes above the RIP for the “actual” argument (i.e. what the format modifier will be acting upon).

  1. The address of the first argument, not the first argument itself, is located 4 bytes above the RIP
  2. "actual" is a little vague, would it be more accurate to say second argument or first modifier argument?
  3. In this case 8 bytes above RIP coincidentally points to the (middle of the) first argument to printf but this isn't generally true.

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